Page generation method, device and equipment
By analyzing the description information and determining the target page component from the preset page component library, filling the entity into the component, and generating the target page, it solves the time-consuming and laborious problem of manually writing code during the development of existing web pages, and achieves efficient and accurate page generation.
Patent Information
- Application Number
- CN202510013422.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-18
AI Technical Summary
During the development of existing web pages, developers need to manually write code to generate pages, which is time-consuming and labor-intensive. The existing drag page generation system is cumbersome, the learning cost is high, and the use is difficult.
By analyzing the received description information, structured information is obtained, including business scenario types, multiple entities and page elements to which each entity belongs. According to the business scenario type, determine the target page component from the preset page component library, and populate the entity into the target page component to generate the target page.
It realizes the direct generation of pages of different business scenarios from the description information, improves page development efficiency, simplifies the page generation process, and improves the accuracy of page generation.
Smart Images

Figure CN119847524A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of page development, and in particular to a page generation method, device and equipment. Background Art
[0002] Currently, in the process of web page development, developers usually write codes manually to generate pages, which is time-consuming and labor-intensive. Summary of the invention
[0003] Based on the content of the background technology, the present disclosure proposes a page generation method, device and equipment.
[0004] In a first aspect, the present disclosure provides a page generation method, comprising:
[0005] In response to the received description information, the description information is parsed to obtain structured information, wherein the structured information includes a business scenario type, multiple entities, and a page element to which each entity belongs; wherein the description information includes information of at least one attribute, wherein the attribute includes a text attribute, a picture attribute, and a video attribute;
[0006] Based on the business scenario type, determining a target page component from a preset page component library;
[0007] Generate a target page based on the multiple entities, the page elements to which each entity belongs, and the target page component;
[0008] Part or all of the entities are filled into a plurality of different sections in the target page.
[0009] Optionally, the parsing the description information to obtain structured information includes:
[0010] Performing word segmentation processing on the description information to obtain a word segmentation sequence, wherein the word segmentation sequence includes a plurality of word segments arranged in an input order;
[0011] Each word segment in the word segment sequence is marked to obtain a plurality of entities and a label of each entity, each label representing a type of the page element or the business scenario.
[0012] Optionally, the tagging each word in the word segmentation sequence to obtain the multiple entities and a label of each entity includes:
[0013] Identify the word segmentation sequence to obtain a plurality of entities;
[0014] Predict the category to which each of the entities belongs and obtain the label of each of the entities.
[0015] Optionally, the tagging each word in the word segmentation sequence to obtain the multiple entities and a label of each entity includes:
[0016] Based on the position of each word in the word sequence, determine the label of each word in the word sequence, and generate a label sequence;
[0017] According to the tag sequence, a plurality of entities and a tag of each entity are obtained by recombining.
[0018] Optionally, when the description information includes information about picture attributes and / or information about video attributes, the response to the received description information is to parse the description information to obtain structured information, including:
[0019] In response to the received information on picture attributes and / or video attributes, image recognition is performed on the information on picture attributes and / or video attributes to obtain a demand description text;
[0020] The structured information is obtained based on the requirement description text.
[0021] Optionally, the preset component library includes multiple page components, each of the page components carries a type identifier, and determining a target page component from the preset page component library based on the business scenario type includes:
[0022] Acquire a target type identifier corresponding to the business scenario type from the multiple type identifiers;
[0023] According to the target type identifier, the target page component is determined from the preset component library.
[0024] Optionally, the preset component library includes a plurality of page components carrying the target type identifier; and determining the target page component from the preset component library according to the target type identifier includes:
[0025] Acquire historical usage information, wherein the historical usage information includes information of historically generated pages;
[0026] The target page component is determined from a plurality of page components carrying the target type according to the historical usage information.
[0027] Optionally, the method for constructing the preset component library includes:
[0028] Acquire multiple atomic components, where the atomic components represent the minimum units required to generate each section in the target page;
[0029] According to the business scenario type, multiple atomic components are combined to obtain multiple different types of page components.
[0030] Optionally, generating a target page based on the plurality of entities, the page elements to which each entity belongs, and the target page component includes:
[0031] Generate a preview interface of the target page according to the multiple entities, the page elements to which each entity belongs, and the target page component;
[0032] In response to a modification operation on the description information, adjusting the preview interface;
[0033] In response to a confirmation operation on the preview interface, the target page is generated.
[0034] Optionally, generating a target page based on the plurality of entities, the page elements to which each entity belongs, and the target page component includes:
[0035] Based on the page element to which each of the entities belongs, filling the plurality of entities into corresponding atomic components of the target page component;
[0036] Adjusting the size of the entity and / or a plurality of sections in the target page so that each of the entity fits the target page;
[0037] Based on the target page component filled with the entity, the target page is generated.
[0038] Optionally, when the description information includes information of picture attributes and / or video attributes, filling the multiple entities into corresponding atomic components of the target page component based on the page element to which each entity belongs includes:
[0039] Obtaining page elements corresponding to the information of picture attributes and / or video attributes in the description information;
[0040] The information of the image attributes and / or the information of the video attributes are filled into the atomic component corresponding to the page element.
[0041] A second aspect of the present disclosure provides a page generation device, comprising:
[0042] A parsing module, configured to parse the received description information in response to obtaining structured information, wherein the structured information includes a business scenario type, multiple entities, and a page element to which each entity belongs; wherein the description information includes information of at least one attribute, wherein the attribute includes a text attribute, a picture attribute, and a video attribute;
[0043] A determination module, used to determine a target page component from a preset page component library based on the business scenario type;
[0044] A generation module is used to generate a target page based on the multiple entities, the page elements to which each entity belongs, and the target page components; wherein some or all of the entities are filled into multiple different sections in the target page.
[0045] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the page generation method as described in the first aspect above when executing the computer program.
[0046] The page generation method provided by the present disclosure includes: in response to received description information, parsing the description information to obtain structured information, wherein the structured information includes a business scenario type, multiple entities, and a page element to which each of the entities belongs; wherein the description information includes information of at least one attribute, wherein the attribute includes a text attribute, a picture attribute, and a video attribute; based on the business scenario type, determining a target page component from a preset page component library; based on the multiple entities, the page element to which each of the entities belongs, and the target page component, generating a target page; wherein some or all of the entities are filled into multiple different sections in the target page;
[0047] The present disclosure obtains the business scenario applied by the page, the entities included in the page and the page elements to which they belong by directly parsing the description information when the description information is received, and then directly selects the target page component according to the business scenario. Thereafter, multiple entities are filled into the target page component and the target page is rendered. Thus, the user can directly generate the corresponding page after inputting the description information, thereby improving the efficiency of page development. In addition, since the description information can be information of text attributes, image attributes and video attributes, the present disclosure can parse user needs according to information of different attributes and improve the accuracy of generated pages.
[0048] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. It should be noted that the proportions in the drawings are only for illustration and do not represent the actual proportions.
[0050] Figure 1 A flowchart showing the steps of the page generation method provided by an embodiment of the present disclosure is shown;
[0051] Figure 2 A schematic diagram of a process for obtaining structured information in an embodiment of the present disclosure is shown;
[0052] Figure 3 Another schematic diagram of a process for obtaining structured information in an embodiment of the present disclosure is shown;
[0053] Figure 4 A schematic diagram of the construction process of a preset page component library in an embodiment of the present disclosure is shown;
[0054] Figure 5 A diagram showing the correspondence between atomic components and page components in an embodiment of the present disclosure is shown;
[0055] Figure 6 A schematic diagram showing a flow chart of a page generation method provided by an embodiment of the present disclosure;
[0056] Figure 7 A schematic diagram showing an input interface in a page generation method provided by an embodiment of the present disclosure is shown;
[0057] Figure 8 A schematic diagram of page filling in an embodiment of the present disclosure is shown;
[0058] Fig. 9 A schematic diagram showing a preview interface in an embodiment of the present disclosure is shown;
[0059] Fig.10 A schematic diagram of the structure of a page generating device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0060] In order to make the above-mentioned purposes, features and advantages of the present disclosure more obvious and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0061] In most business scenarios, all kinds of business pages are manually written by developers, which is the most primitive and time-consuming method. There are also some drag-and-drop page generation systems on the market to get rid of the original development method, but the system is still too cumbersome, with high learning costs and difficulty in use.
[0062] In view of this, the present disclosure provides a page generation method, device and equipment, which parses the received description information to determine the business scenario type corresponding to the page and the content included in the page, and then determines the target page component according to the business scenario type, and fills the content included in the page into the target page component, and renders the target page. In this way, pages for different business scenarios can be generated directly from the description information, thereby realizing rapid page generation and improving production efficiency.
[0063] Reference Figure 1 , Figure 1 A flow chart showing the steps of the page generation method provided by the embodiment of the present disclosure is shown as follows: Figure 1 As shown, the page generation method specifically includes:
[0064] S101, in response to received description information, parsing the description information to obtain structured information, where the structured information includes a business scenario type, multiple entities, and a page element to which each entity belongs.
[0065] Wherein, the description information includes information of at least one attribute, and the attribute includes text attribute, image attribute and video attribute. In the process of parsing the description information, different methods can be used for parsing according to different attributes. For example, for information of text attributes, keyword extraction can be used for text; for information of image attributes, image recognition technology can be used to identify the text in the image; for information of video attributes, key frame extraction technology can be used to extract key frames for analysis to obtain text information.
[0066] In this embodiment, the description information may be text, images, and videos that describe the type and content of the required page, such as "I need a technical page that is divided into three areas from top to bottom" and "the page title is ultra-high definition video enhancement". It may also be a picture including the page title and layout, a product introduction picture, and a product introduction video. The description information may be input by the user. For example, an input interface may be provided to the user, and the user may input the description information in the interface, such as inputting description text, uploading pictures and videos, and the like.
[0067] After receiving the description information, the description information is parsed to obtain structured information, which includes the business scenario type, entity, and page element to which the entity belongs corresponding to the page; wherein the entity represents the content to be filled into the page, such as the text of the title, the text of the introduction, an icon, a picture related to the page content, or an introduction video, etc. The page element is used to define the different contents in the page, and the page element can be a title element, a paragraph element, a picture, an interactive element, etc. After determining the page element to which each entity belongs, the entity can be filled into the corresponding position according to the page element to which it belongs. For example, if the page element to which the entity belongs is a title element, the entity can be filled into the input box of the title. The business scenario type is used to indicate the scenario of the final application of the page. Different application scenarios use different page layouts and page components. Determining the business scenario type through structured information can facilitate the subsequent determination of the required page components.
[0068] In one example, the input interface may include a demand form, which includes the names of multiple page elements. The user may enter an entity into a corresponding input box, and then the demand form may be directly parsed to obtain structured information. In this way, the entities in the structured information may be classified in advance to improve the accuracy of the generated page. When the input interface displays the demand form, the parsing result may be displayed in the demand form according to the description information entered by the user, so that the user can confirm whether the generated demand form meets the requirements. If it does not meet the user's requirements, the user can modify it.
[0069] S102: Determine a target page component from a preset page component library according to the business scenario type.
[0070] In this embodiment, the preset page component library can be a database that is constructed in advance and stores multiple page components. When constructing the preset page component library, page components for different business scenarios can be constructed first according to the components required by different business scenarios, and then in the process of generating pages, they can be directly selected according to the business scenario type without manually configuring components, thereby improving the efficiency of page generation. Among them, the business scenario type can include a business scenario for product introduction, a business scenario for technology introduction, or a business scenario for case introduction, etc.
[0071] Each page component includes all components required for the page under the business scenario. Therefore, when constructing a preset page component library, multiple components can be obtained first, and then the multiple components can be combined to obtain page components under multiple business scenarios. In order to facilitate the direct screening of required page components from the preset page component library according to the business scenario type, when constructing the preset page component library, a type identifier can be assigned to each page component, and a mapping relationship between the business scenario type and the type identifier can be established. Then, in the process of generating the page, the required target page component can be determined according to the corresponding relationship between the business scenario type and the type identifier.
[0072] S103: Generate a target page based on the multiple entities, the page elements to which each entity belongs, and the target page components.
[0073] Part or all of the entities are filled into a plurality of different sections in the target page.
[0074] In this embodiment, after determining multiple entities, the page elements to which each entity belongs, and the target page components, the entities can be filled into the corresponding input boxes according to the page elements to which each entity belongs, and then the target page is rendered. When filling some or all entities into the target page, the filling can be performed according to the page elements to achieve filling multiple entities into different sections of the target page.
[0075] Among them, if the description information also includes information on image attributes or video attributes, the filling position corresponding to the image attribute information or video attribute information can also be determined, and then when generating the target page, the image attribute information or video attribute information can also be displayed on the page.
[0076] In one example, before generating the target page, a preview interface of the target page can be generated and displayed to the user, so that the user can determine whether the target page meets the requirements based on the displayed preview interface. If it does not meet the requirements, the user can modify the description information, and then the preview interface is adjusted according to the description information. When the requirements are met, the target page is generated again. The preview interface can include a control, and when the control is triggered, it indicates that the page needs to be generated, and then the target page corresponding to the preview interface is generated.
[0077] The page generation method provided by the embodiment of the present disclosure obtains the content and filling position required for the page by parsing the received description information, and determines the business scenario of the required page, obtains the target page component according to the business scenario, and then fills the content required for the page into the corresponding position of the target page component. Therefore, the user can realize page generation by inputting the description information, thereby improving the efficiency of page generation; and, since the description information can be information of text attributes, image attributes and / or video attributes, the user needs can be determined according to information of different modalities, thereby improving the accuracy of generated pages.
[0078] In one embodiment, when the description information is information of text attributes, the description information can be subjected to keyword extraction and analysis to obtain structured information. When the description information is information of picture attributes or video attributes, the picture attributes or video attributes can be first analyzed to obtain text information, and then keyword extraction is performed together with the description information of the text attributes to obtain structured information. The process can specifically include: when the description information includes information of picture attributes and / or information of video attributes, first, in response to the received information of picture attributes and / or information of video attributes, image recognition is performed on the information of picture attributes, and / or key frame analysis is performed on the information of video attributes to obtain a demand description text; then, based on the demand description text, structured information is obtained.
[0079] In this embodiment, the description information of different attributes is parsed in different ways. For the information of picture attributes, computer vision can be used for image processing, such as analysis through a convolutional neural network, and OCR (Optical Character Recognition) can be used to extract text, labels, object recognition and other information in the image; for the information of video attributes, key frames can be extracted from the video by using action recognition, key frame extraction, etc., and text, object recognition and other information can be obtained through key frame analysis, thereby obtaining a demand description text, which can include text filled in the page, and can also include a description of the business scenario, etc.
[0080] Among them, when the description information also includes information on text attributes, the text attribute information and the requirement description text can be integrated to obtain structured information based on the integrated text information. In this case, keyword extraction can be performed on the requirement description text and the text information respectively to obtain two sets of structured information, and then the two sets of structured information can be integrated into the final structured information.
[0081] In one embodiment, the specific process of parsing the description information may be: first, the description information is segmented to obtain a segmentation sequence, where the segmentation sequence includes multiple segmentations arranged in the input order; then, each segmentation sequence is labeled to obtain multiple entities and a label for each entity, where each label represents a page element or business scenario type.
[0082] In this embodiment, the description information of text attributes, or the text obtained by parsing the description information of image attributes and video attributes is usually a long text, and NLP (Natural Language Processing) technology can be used to understand the semantic information. Specifically, the long text can be processed into multiple participles, and the type of each participle is determined. Then, entities can be filtered out according to the type of each participle, and the entities are labeled to obtain multiple entities and labels corresponding to each entity.
[0083] Among them, the process of obtaining multiple entities and the label of each entity according to the word segmentation sequence can be implemented by named entity recognition, using the NER (Named entity recognition) model to extract features of each word segment and predict its corresponding label, so as to obtain multiple entities and the label of each entity; the process can also be implemented by sequence labeling, using the sequence labeling model to predict the label corresponding to the position of each word, obtain the label sequence, and then obtain multiple entities and the label of each entity; the process can also be implemented by combining named entity recognition and sequence labeling, such as integrating the prediction results obtained by the two methods to obtain multiple entities and the label of each entity.
[0084] In one example, named entity recognition is used to obtain multiple entities and a label for each entity. The specific process may be: first, the word segmentation sequence is memorized and recognized to obtain multiple entities; then, the category to which each entity belongs is predicted to obtain a label for each entity.
[0085] Specifically, refer to Figure 2 , Figure 2 A schematic diagram of a specific process of named entity recognition in an embodiment of the present disclosure is shown. Figure 2 As shown, when named entity recognition is used to obtain multiple entities and the labels of each entity, the word segmentation sequence is first input into the NER model, and the NER model extracts features for each word segmentation and predicts the named entity label corresponding to the word segmentation. The NER model can be a BiLSMT-CRF model, and then outputs each entity and the label of each entity. Taking the input text "I need a technical page" as an example, during the word segmentation processing, the word segments such as "I", "need", "one", and "technical page" are processed, and the word segmentation sequence is input into the NER model, and "technical page" and the label are output as the type.
[0086] In another example, sequence labeling is used to obtain multiple entities and a label for each entity. The specific process may be: first, based on the position of each segmentation in the segmentation sequence, the label of each segmentation in the segmentation sequence is determined, and a label sequence is generated; then, according to the label sequence, multiple entities and a label for each entity are recombined.
[0087] Specifically, refer to Figure 3 , Figure 3 The specific process diagram of sequence labeling in the embodiment of the present disclosure is shown in FIG. Figure 3 As shown, when sequence labeling is used to obtain multiple entities and the labels of each entity, the word segmentation sequence is input into the sequence labeling model, and the position of each word segmentation or character is predicted by the sequence labeling model to predict its label in the sequence, and generate a label sequence; then, the starting position of each entity and the label of each entity are obtained by reorganizing the label sequence. Among them, the sequence labeling model can be obtained by combining the BERT model and the CRF (conditional random field) model. When the word segmentation sequence is input, the BERT model realizes named entity recognition, and the CRF model performs sequence labeling.
[0088] In another example, named entity recognition and sequence labeling are combined to obtain multiple entities and a label for each entity. The labeling results can be obtained according to named entity recognition and sequence labeling respectively, and then the results of the two are integrated to obtain multiple entities and a label for each entity.
[0089] Specifically, multiple first entities and a label for each first entity can be obtained based on named entity recognition, and then multiple second entities and a label for each second entity can be obtained based on sequence labeling. After that, the first entity and the second entity can be integrated, and duplicate entities can be deleted to obtain multiple entities and multiple entity labels. In this way, the structured information obtained by parsing can be made more complete, thereby improving the accuracy of the generated target page.
[0090] In one embodiment, the preset page component library includes multiple page components, each of which carries a type identifier. The target page component can be determined based on the type identifier carried by each page component. The process can specifically be: first, obtain the target type identifier corresponding to the business scenario type from multiple type identifiers; then, determine the target page component from the preset page component library based on the target type identifier.
[0091] In this embodiment, the type identifier carried by each page component is used to indicate the business scenario to which it is applied. Therefore, multiple type identifiers can be matched with the business scenario type first, and the type identifier matched with the business scenario type is used as the target type identifier, and then the target page component can be obtained in the preset page component library according to the target type identifier. For example, type identifier A represents a technical business scenario, type identifier B represents a product business scenario, and type identifier C represents a news business scenario. When the business scenario type is technical, type identifier A is determined to be the target type identifier, and then the page component carrying type identifier A is used as the target page component.
[0092] In one embodiment, the page components under the same business scenario type may include multiple, that is, the preset page components include multiple page components carrying the same type identifier, then the multiple page components carrying the target type identifier can be first screened out, and then the target page component can be determined from the multiple page components carrying the target type identifier. The process can specifically be: first, obtain historical usage information, wherein the historical usage information includes information of historically generated pages; then, determine the target page component from the multiple page components carrying the target type identifier based on the historical usage information.
[0093] Specifically, when there are multiple page components carrying the target type identifier, historical usage information can be obtained, and the historical usage information can record the information of the pages historically generated by the user, and then the target page component can be selected from the multiple page components carrying the target type identifier according to the user's historical habits. The historical usage information may include the page components included in the historically generated pages, the business scenario type corresponding to the page, etc., so that the page component corresponding to the historical usage information can be determined as the target page component based on the acquired historical usage information.
[0094] In one example, a preview interface corresponding to each page component can be generated according to multiple page components carrying target type identifiers, and the corresponding target page can be generated according to the user's selection. This makes it convenient for users to preview different pages and enables users to select a target page that meets their needs according to their own needs.
[0095] For any embodiment, the preset component library can be constructed by the following method: first, obtain multiple atomic components, which represent the minimum unit required to generate each section in the target page; then, according to the business scenario type, combine the multiple atomic components to obtain multiple different types of page components.
[0096] In this embodiment, an atomic component is the smallest unit of a page component. For example, an atomic component can be an input box or an icon. Multiple atomic components can be obtained from the atomic component library and combined to obtain different types of page components. In the web service, the atomic component is imported through vue / react or web components. After the import, the generated page is compatible with modern mainstream browsers.
[0097] The types and quantities of components required in each business scenario are different, so the atomic components can be combined according to the business scenario type to obtain multiple different types of page components. Figure 4 and Figure 5 , Figure 4 The schematic diagram of the construction process of the preset page component library is shown. Figure 5 A schematic diagram showing the relationship between atomic components and page components is shown in FIG. Figure 4 and Figure 5 As shown, when constructing a preset page component library, first obtain multiple atomic components from the atomic component library. The atomic components can be input boxes, icons, or controls, etc. After obtaining multiple atomic components, combine the multiple atomic components according to needs to obtain atomic component 1, atomic component 2, atomic component 3, and atomic component 4, etc. Atomic component 1, atomic component 2, and atomic component 4 can be combined to obtain one type of page component, and atomic component 1, atomic component 2, and atomic component 2 can be combined to obtain another type of page component. Thus, multiple atomic components can be combined to obtain multiple page components corresponding to different business scenario types.
[0098] In one embodiment, in order to improve the accuracy of the generated target page, a preview interface of the target page can be generated first, so that the user can confirm whether modification is required based on the page displayed on the preview interface, and then generate the target page when modification is not required. The process can be specifically: first, based on multiple entities, page elements belonging to each entity, and target page components, a preview interface of the target page is generated; then, in response to the modification operation on the description information, the preview interface is adjusted; thereafter, in response to the confirmation operation on the preview interface, the target page is generated.
[0099] Among them, the preview interface displays the target page generated according to the entity and the target page component, so that the user can determine whether it needs to be modified according to the style and content of the target page displayed on the preview interface. If modification is required, the user can modify the input description information and can monitor the user operation according to the monitoring function. When the input description information is modified, it is re-parsed according to the modified description information to obtain structured information, and then the preview interface is regenerated so that the preview interface displays the adjusted page, thereby realizing real-time feedback of the preview interface for the user's modification operation, facilitating the user to modify the description information in a targeted manner, and improving the accuracy of the target page finally generated; wherein, the input interface of the description information may also include a control, and the target page is generated when the control is triggered. After the preview interface is displayed, if the user triggers the control, it indicates confirmation to generate the target page. At this time, a target page consistent with the preview interface display is generated.
[0100] In one embodiment, the text size, text length, etc. of the content to be filled may not be compatible with the size of the section in the target page. Before generating the target page, the size of the filled content or section can be adjusted first, and then the target page can be generated. The specific process can be: first, based on the page elements to which each entity belongs, multiple entities are filled into the corresponding atomic components of the target page component; then, the size of the entities and / or multiple sections in the target page is adjusted to make each entity fit the target page; then, based on the page component with the filled entities, the target page is generated.
[0101] Specifically, when multiple entities and the page elements to which each entity belongs are obtained, the entity can be filled into the corresponding input box according to the page element to which it belongs. For example, if the page element to which the entity corresponds is a title element, the entity is filled into the input box corresponding to the title; if the page element to which the entity corresponds is a paragraph element, the entity is filled into the input box corresponding to the paragraph, etc. After the entity is filled, in order to avoid the situation where the page section size cannot be adapted to the filled content, it can be determined first whether the area size occupied by each section in the filled page can accommodate the filled content. If the filled content cannot be fully displayed due to the small section size or the long text length of the filled content, the size of the section can be adjusted or the text length of the filled content can be adjusted.
[0102] Among them, when the description information includes information on picture attributes and / or video attributes, the information on the picture attributes may be a picture related to the text content, and the information on the video attributes may also be a picture associated with the text content. In this case, the picture and / or video may also be filled in the page component to display the picture or video process in the generated page. The process may specifically include: first, obtaining the page element corresponding to the picture attribute information and / or the video attribute information in the description information; then, filling the picture attribute information and / or the video attribute information into the atomic component corresponding to the page element.
[0103] In this embodiment, when the description information includes pictures and videos, if the description information includes a description of the location of the pictures and videos, the corresponding page elements can be determined based on the location description, and then the pictures and videos can be filled into the atomic components corresponding to the page elements; if the description information does not include a description of the location of the pictures and videos, the corresponding text content can be determined based on the analysis results of the pictures and videos, and then the pictures and videos can be filled into the same position as the text content as supplementary information of the text content.
[0104] The page generation method provided by the embodiment of the present disclosure obtains structured information by parsing the description information when the description information is received, determines the target page component from the preset page component library through the structured information, generates a preview interface of the target page according to the target page component and the structured information, and then generates the target page based on the confirmation operation on the preview interface; thereby, the embodiment of the present disclosure can directly generate a page according to the description information, and can display the preview interface to the user before generating the page, and the user can modify the description information according to the preview interface to modify the generated page; in addition, because the description information includes information on text attributes, information on picture attributes and information on video attributes, the present disclosure can parse user needs according to information on different attributes and improve the accuracy of generated pages.
[0105] The page generation method of the embodiment of the present disclosure is specifically introduced below with reference to a specific example:
[0106] Reference Figure 6 , Figure 6 The schematic diagram of the page generation method provided in this example is shown as follows: Figure 6 As shown, when the user needs to generate a page, the description information can be entered in the interface, where reference Figure 7 , Figure 7 A schematic diagram of the input interface in this example is shown. Figure 7As shown, users can enter requirements in the long text description and upload pictures and videos. After receiving the input long text, pictures and videos, they can be parsed separately. For the long text, NLP natural language processing technology combines named entity recognition (NER) and sequence annotation to propose all key fields and content; for pictures, image recognition technology is used to identify text, objects and other content in the image, and key frame extraction or action analysis is used for videos to extract key frames, etc., to obtain the business scenario type, multiple entities and the page elements to which each entity belongs, and display them in the interface. Of course, you can also directly enter the content to be filled in each section.
[0107] After obtaining the structured information, the parsed results can be displayed in the interface to facilitate users to confirm whether they meet their needs. The results displayed in the interface can be displayed separately according to the page elements to which each entity belongs. Figure 6 For example, "Type" indicates the business scenario type of the page application, "Title" indicates the title of the page, and "Introduction", "Technical Description" and "Technical Advantages" indicate the content filled in different sections of the page. After obtaining this information, the required page components can be filtered out from the preset page component library according to the business scenario type of the page application. For example, if the business scenario type is technical, the technical page components are filtered out from the preset page component library. The process can be to match the business scenario type with the type identifier of each page component in the preset page component library, and use the page component with the matching type identifier as the target page component. Among them, the page component can be composed of multiple atomic components.
[0108] After determining the target page component, multiple entities are filled into the components corresponding to the page elements to which they belong. If the page element to which the entity belongs is a title element, the entity is filled into the input box corresponding to the title. Figure 8 , Figure 8 A schematic diagram of the filling interface is shown, such as Figure 8 As shown, according to the page element to which each entity belongs, multiple entities can be filled into different sections of the page to generate the target page. Among them, each title, picture, and description belongs to a page element, and each page element includes an input box. Then, according to the page element to which the entity belongs, the entity can be filled into the corresponding input box; for example, when the entity belongs to the title element, the entity is filled into the input box corresponding to the title element, and when the entity belongs to the picture element, the entity is filled into the input box corresponding to the picture element, etc. Among them, in the case of uploading pictures and videos, the pictures or videos can be filled into the corresponding positions according to the description information, or they can be filled into the corresponding positions according to the recognition results of the pictures and videos.
[0109] After filling the entity into the page component, a preview interface can be generated first, where the preview interface can be as follows Fig. 9 As shown in the figure, it shows the style and content of the generated page. The previewed page includes multiple sections. The filled page components are rendered in multiple different sections. Fig. 9 For example, the page title is located in section 1, subtitle 1 is located in section 2, and subtitle 2 is located in section 3. Thus, different entities are filled into page components of different sections. When the preview interface is displayed, the user can determine whether the page displayed in the preview interface meets their needs or whether there are any problems. If modification is required, the user can modify the description information in the input interface or add more detailed description information to adjust the content or style of the generated page; and when the user confirms that the preview interface displays the page the user needs, the user can select the preview interface, or trigger the control configured in the preview interface to perform a confirmation operation, thereby generating the target page.
[0110] Based on the same inventive concept, the present disclosure also provides a page generation device, referring to Fig.10 , Fig.10 A schematic diagram of the structure of a page generation device provided by an embodiment of the present disclosure is shown. Fig.10 As shown, the page generating device specifically includes:
[0111] The parsing module 201 is used to parse the description information in response to the received description information to obtain structured information, where the structured information includes a business scenario type, multiple entities, and a page element to which each entity belongs; wherein the description information includes information of at least one attribute, where the attribute includes a text attribute, a picture attribute, and a video attribute;
[0112] A determination module 202 is used to determine a target page component from a preset page component library based on the business scenario type;
[0113] The generation module 203 is used to generate a target page based on multiple entities, page elements to which each entity belongs, and target page components; wherein some or all of the entities are filled into multiple different sections in the target page.
[0114] In an optional embodiment, the parsing module 201 includes:
[0115] A word segmentation module is used to perform word segmentation processing on the description information to obtain a word segmentation sequence, where the word segmentation sequence includes multiple word segments arranged in the input order;
[0116] The tagging module is used to tag each word in the word segmentation sequence to obtain multiple entities and labels for each entity, and each label represents a page element or business scenario type.
[0117] In an optional embodiment, the annotation module includes:
[0118] The recognition module is used to recognize the word segmentation sequence and obtain multiple entities;
[0119] The prediction module is used to predict the category to which each entity belongs and obtain the label of each entity.
[0120] In an optional embodiment, the annotation module includes:
[0121] A first determination submodule is used to determine the label of each segmentation in the segmentation sequence based on the position of each segmentation in the segmentation sequence, and generate a label sequence;
[0122] The recombining module is used to recombinantly obtain multiple entities and the label of each entity according to the label sequence.
[0123] In an optional embodiment, when the description information includes information of picture attributes and / or information of video attributes, the parsing module 201 includes:
[0124] A parsing submodule, configured to perform image recognition on the information of picture attributes and / or video attributes in response to the received information of picture attributes and / or video attributes, and / or perform key frame analysis on the information of video attributes to obtain a demand description text;
[0125] The first acquisition submodule is used to obtain structured information based on the demand description text.
[0126] In an optional embodiment, the preset page component library includes multiple page components, each page component carries a type identifier, and the determination module 202 includes:
[0127] A second acquisition submodule is used to acquire a target type identifier corresponding to the business scenario type from multiple type identifiers;
[0128] The second determination submodule is used to determine the target page component from the preset page component library according to the target type identifier.
[0129] In an optional embodiment, the preset page component library includes multiple page components carrying target type identifiers, and the second determination submodule includes:
[0130] An acquisition unit, used to acquire historical usage information, wherein the historical usage information includes information of historically generated pages;
[0131] The determination unit is used to determine a target page component from a plurality of page components carrying target type identifiers according to historical usage information.
[0132] In an optional embodiment, the generating module 203 includes:
[0133] A first generating submodule, used for generating a preview interface of a target page according to a plurality of entities, a page element to which each entity belongs, and a target page component;
[0134] A first adjustment module, used for adjusting the preview interface in response to a modification operation on the description information;
[0135] The second generating submodule is used to generate a target page in response to a confirmation operation on the preview interface.
[0136] In an optional embodiment, the first generation submodule includes:
[0137] A filling unit, used for filling multiple entities into corresponding atomic components of a target page component based on the page element to which each entity belongs;
[0138] An adjustment unit, used to adjust the size of multiple sections in the entity and / or target page so that each entity fits the target page;
[0139] The generation unit is used to generate a target page based on the target page component filled with entities.
[0140] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, which implements the page generation method described in any of the above embodiments when executed by the processor.
[0141] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0142] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0143] The above is a detailed introduction to a page generation method, device and equipment provided by the present disclosure. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of the present disclosure, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
[0144] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0145] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0146] References herein to "one embodiment," "embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present disclosure. In addition, please note that examples of the term "in one embodiment" do not necessarily all refer to the same embodiment.
[0147] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0148] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A page generation method, characterized in that: The method comprises: In response to the received description information, the description information is parsed to obtain structured information, wherein the structured information includes a business scenario type, multiple entities, and a page element to which each entity belongs; wherein the description information includes information of at least one attribute, wherein the attribute includes a text attribute, a picture attribute, and a video attribute; Based on the business scenario type, determining a target page component from a preset page component library; Generate a target page based on the multiple entities, the page elements to which each entity belongs, and the target page component; Part or all of the entities are filled into a plurality of different sections in the target page.
2. The page generation method according to claim 1, characterized in that: The parsing of the description information to obtain structured information includes: Performing word segmentation processing on the description information to obtain a word segmentation sequence, wherein the word segmentation sequence includes a plurality of word segments arranged in an input order; Each word segment in the word segment sequence is marked to obtain a plurality of entities and a label of each entity, each label representing a type of the page element or the business scenario.
3. The page generation method according to claim 2, characterized in that: The step of labeling each word in the word sequence to obtain a plurality of entities and a label of each entity includes: Identify the word segmentation sequence to obtain a plurality of entities; Predict the category to which each of the entities belongs and obtain the label of each of the entities.
4. The page generation method according to claim 2, characterized in that: The step of labeling each word in the word sequence to obtain a plurality of entities and a label of each entity includes: Based on the position of each word in the word sequence, determine the label of each word in the word sequence, and generate a label sequence; According to the tag sequence, a plurality of entities and a tag of each entity are obtained by recombining.
5. The page generation method according to claim 1, characterized in that: When the description information includes information about picture attributes and / or information about video attributes, the response to the received description information is to parse the description information to obtain structured information, including: In response to the received information on picture attributes and / or video attributes, performing image recognition on the information on picture attributes and / or performing key frame analysis on the information on video attributes to obtain a demand description text; The structured information is obtained based on the requirement description text.
6. The page generation method according to claim 1, characterized in that: The preset page component library includes a plurality of page components, each of which carries a type identifier, and the target page component is determined from the preset page component library based on the business scenario type, including: Acquire a target type identifier corresponding to the business scenario type from the multiple type identifiers; According to the target type identifier, the target page component is determined from the preset page component library.
7. The page generation method according to claim 6, characterized in that: The preset page component library includes a plurality of page components carrying the target type identifier; and determining the target page component from the preset component library according to the target type identifier includes: Acquire historical usage information, wherein the historical usage information includes information of historically generated pages; The target page component is determined from a plurality of page components carrying the target type identifier according to the historical usage information.
8. The page generation method according to claim 1, characterized in that: The method for constructing the preset component library includes: Acquire multiple atomic components, where the atomic components represent the minimum units required to generate each section in the target page; According to the business scenario type, multiple atomic components are combined to obtain multiple different types of page components.
9. The page generation method according to claim 1, characterized in that: The generating a target page based on the plurality of entities, the page elements to which each entity belongs, and the target page component comprises: Generate a preview interface of the target page according to the multiple entities, the page elements to which each entity belongs, and the target page component; In response to a modification operation on the description information, adjusting the preview interface; In response to a confirmation operation on the preview interface, the target page is generated.
10. The page generation method according to claim 8, characterized in that: The generating a target page based on the plurality of entities, the page elements to which each entity belongs, and the target page component comprises: Based on the page element to which each of the entities belongs, filling the multiple entities into the corresponding atomic components of the target page component; Adjusting the size of the entity and / or a plurality of sections in the target page so that each of the entity fits the target page; Based on the target page component filled with the entity, the target page is generated.
11. The page generation method according to claim 10, characterized in that: When the description information includes information of picture attributes and / or video attributes, filling the multiple entities into corresponding atomic components of the target page component based on the page element to which each entity belongs includes: Obtaining page elements corresponding to the information of picture attributes and / or video attributes in the description information; The information of the image attributes and / or the information of the video attributes are filled into the atomic component corresponding to the page element.
12. A page generating device, characterized in that: include: A parsing module, configured to parse the received description information in response to obtaining structured information, wherein the structured information includes a business scenario type, multiple entities, and a page element to which each entity belongs; wherein the description information includes information of at least one attribute, wherein the attribute includes a text attribute, a picture attribute, and a video attribute; A determination module, used to determine a target page component from a preset page component library based on the business scenario type; A generation module is used to generate a target page based on the multiple entities, the page elements to which each entity belongs, and the target page components; wherein some or all of the entities are filled into multiple different sections in the target page.
13. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the page generation method according to any one of claims 1 to 11 when executing the program.