A webpage page parameter generation method and a webpage page parameter generation device
By combining large language models and prompt word templates, the page parameters of web pages are automatically generated, solving the problems of low efficiency and inconsistent quality of manually generated SEO information. This achieves efficient and accurate SEO information generation, improving the website's search engine optimization performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, the generation of SEO information mainly relies on manual operation, which leads to a large workload, low efficiency, and inconsistent quality, making it difficult to meet the requirements of real-time performance and consistency, thus affecting website optimization results and user experience.
By combining a large language model and prompt word templates, page parameters for web pages are automatically generated. Prompt words are generated by obtaining page content information and prompt word templates, and page parameters are generated using a large language model.
It enables precise and standardized generation of page parameters, reduces manual intervention, significantly improves generation efficiency and accuracy, and enhances the website's search engine optimization performance.
Smart Images

Figure CN120256703B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to network data processing technology, and in particular to a webpage page parameter generation method and a webpage page parameter generation device. BACKGROUND
[0002] With the rapid development of Internet technology, search engines have become one of the main ways for users to obtain information. SEO (Search Engine Optimization) as a technical means to improve the natural ranking of websites in search engines is crucial to improving the visibility and traffic of websites. In order to ensure that search engines can quickly and accurately crawl and index webpage content, website administrators usually need to configure corresponding SEO information for each page, including title, description and keywords, etc. These information not only helps search engines understand page content, but also directly affects the ranking of pages in search results.
[0003] However, the generation of these SEO information currently mainly relies on manual operation, that is, professionals summarize and refine according to page content. This method not only has large workload and low efficiency, but also due to the differences in refining ability and experience of different personnel, the quality of generated SEO information is uneven. In addition, with the rapid update and iteration of Internet information, the manual generation of SEO information is difficult to meet the real-time and consistency requirements, thereby affecting the overall optimization effect and user experience of the website. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a webpage page parameter generation method and a webpage page parameter generation device, which realize the automatic generation of webpage page parameters by combining a large language model and a prompt word template, the generated page parameters are more accurate and standardized, the manual participation is reduced, and the efficiency and accuracy of page parameter generation are greatly improved.
[0005] In a first aspect, the embodiments of the present application provide a webpage page parameter generation method, which comprises:
[0006] obtaining a target page and determining a prompt word template corresponding to the target page from a preset template library;
[0007] obtaining page content information corresponding to the target page, and generating a prompt word of the target page based on the page content information and the prompt word template;
[0008] inputting the prompt word into a pre-trained large language model to generate a page parameter corresponding to the target page.
[0009] Further, the obtaining of the page content information corresponding to the target page comprises:
[0010] When the target page is a picture page, input a first picture in the target page into a picture recognition model, and determine first picture content information output by the picture recognition model as page content information corresponding to the target page; and / or,
[0011] When the target page is a video page, input a video in the target page into a video recognition model, and determine video content information output by the video recognition model as page content information corresponding to the target page, or obtain at least one second picture in the video, input each second picture into the picture recognition model, and determine second picture content information output by the picture recognition model as page content information corresponding to the target page; and / or,
[0012] When the target page is a description page or a question and answer page, identify a page element in the target page to obtain page content information corresponding to the target page, or obtain a parameter value corresponding to the target page through a server, and obtain page content information corresponding to the target page based on the parameter value.
[0013] Further, the generating the prompt word of the target page based on the page content information and the prompt word template comprises:
[0014] determining at least one hot word information from the page content information;
[0015] obtaining at least one hot spot information, and matching the at least one hot word information with the at least one hot spot information to determine at least one target hot word information;
[0016] generating the prompt word based on the prompt word template, the page content information, and the at least one target hot word information.
[0017] Further, the determining at least one hot word information from the page content information comprises:
[0018] performing word segmentation on the page content information to obtain at least one word group, and / or obtaining at least one word group corresponding to a preset number of characters from the page content information, and determining a number of occurrences of each word group;
[0019] sorting the at least one word group based on the number of occurrences, and determining a preset number of word groups from a sorting result as the hot word information;
[0020] or,
[0021] For each phrase, when the number of occurrences of the phrase is greater than or equal to a preset threshold, the phrase is determined as the hot word information.
[0022] Further, the hot spot information is obtained by the following steps:
[0023] The hot spot information is determined according to search hot spots of a target search engine in a historical time period;
[0024] and / or,
[0025] The search hot spots of the target search engine in the historical time period are obtained;
[0026] The hot spot information is determined based on a search heat change trend of the search hot spots in the historical time period.
[0027] Further, before the target page is obtained, the page parameter generation method further includes:
[0028] A page generation requirement is obtained, and a corresponding target page template is determined from a plurality of preset page generation templates based on the page generation requirement;
[0029] A corresponding content generation model is determined based on a content requirement in the page generation requirement, and target content information corresponding to the page generation requirement is generated by using the content generation model;
[0030] A first page is generated based on the target page template and the target content information, and the first page is determined as the target page.
[0031] Further, the target page corresponding prompt word template is determined from the preset template library, including:
[0032] Page information of the target page is obtained; wherein the page information is at least one of page type information, search engine information and style preference information of the target page;
[0033] The prompt word template corresponding to the page information is determined from the preset template in the preset template library based on the page information.
[0034] Further, the target page corresponding prompt word template is determined from the preset template library, including:
[0035] Search optimization results of at least one preset template in the preset template library for historical pages are obtained;
[0036] The preset template with the best search optimization effect for historical pages is determined as the prompt word template.
[0037] Further, the preset template library is constructed through the following steps:
[0038] generating at least one reference prompt word based on the page parameters of the at least one first target reference page;
[0039] generating a preset template based on the reference prompt word, to constitute the preset template library; and / or,
[0040] generating reference page parameters for a second target reference page based on at least one reference prompt word;
[0041] determining at least one target reference prompt word based on the search optimization result of the reference page parameters of the second target reference page;
[0042] generating a preset template based on the target reference prompt word, to constitute the preset template library.
[0043] In a second aspect, the embodiments of the present application further provide a page parameter generation device of a webpage, and the page parameter generation device comprises:
[0044] a template determination module, configured to acquire a target page and determine a prompt word template corresponding to the target page from a preset template library;
[0045] a prompt word generation module, configured to acquire page content information corresponding to the target page, and generate a prompt word of the target page based on the page content information and the prompt word template;
[0046] a page parameter generation module, configured to input the prompt word into a pre-trained large language model to generate page parameters corresponding to the target page.
[0047] The embodiments of the present application provide a page parameter generation method and a page parameter generation device of a webpage. First, a target page is acquired, and a prompt word template corresponding to the target page is determined from a preset template library. Then, page content information corresponding to the target page is acquired, and a prompt word of the target page is generated based on the page content information and the prompt word template. Finally, the prompt word is input into a pre-trained large language model to generate page parameters corresponding to the target page.
[0048] The present application realizes the automatic generation of page parameters of a webpage by combining a large language model and a prompt word template. The prompt word of the target page is generated according to the prompt word template, and the corresponding page parameters are generated based on the prompt word by using the powerful summarization ability and language understanding ability of the large language model. In this way, the generated page parameters are more accurate and standardized, reducing the involvement of human beings and greatly improving the efficiency and accuracy of page parameter generation.
[0049] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the following will describe a preferred embodiment in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0051] Figure 1 A flow chart of a page parameter generation method of a web page provided by the embodiments of the present application;
[0052] Figure 2 A structural schematic diagram of a page parameter generation device of a web page provided by the embodiments of the present application;
[0053] Figure 3 A structural schematic diagram of a page parameter generation device of a web page provided by the embodiments of the present application;
[0054] Figure 4 A structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the embodiments of the present application more apparent, the following will describe the technical solutions of the embodiments of the present application in detail with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by those skilled in the art without creative labor belongs to the scope of protection of the present application.
[0056] First, the application scenarios applicable to the present application are introduced. The present application can be applied to network data processing technology.
[0057] With the rapid development of Internet technology, search engines have become one of the main ways for users to obtain information. SEO (Search Engine Optimization) as a technical means to improve the natural ranking of a website in search engines is crucial for improving the visibility and traffic of a website. In order to ensure that search engines can quickly and accurately crawl and index web page content, website administrators usually need to configure corresponding SEO information for each page, including title, description and keywords, etc. These information not only helps search engines understand page content, but also directly affects the ranking of pages in search results.
[0058] Research has found that the generation of these SEO information currently mainly relies on manual operation, that is, professionals summarize and extract according to page content. This method not only has a large workload and low efficiency, but also due to the differences in extraction ability and experience of different personnel, resulting in uneven quality of generated SEO information. In addition, with the rapid update and iteration of Internet information, the manual generation of SEO information is difficult to meet the real-time and consistency requirements, thereby affecting the overall optimization effect and user experience of the website.
[0059] Based on this, the embodiment of the present application provides a page parameter generation method of a web page, which combines a large language model and a prompt word template to realize the automatic generation of page parameters of a web page. The generated page parameters are more accurate and standardized, reducing manual participation and greatly improving the efficiency and accuracy of page parameter generation.
[0060] Please refer to Figure 1 , Figure 1 The flowchart of the page parameter generation method of the web page provided by the embodiment of the present application. As shown in Figure 1 The page parameter generation method provided by the embodiment of the present application comprises:
[0061] S101, obtaining a target page and determining a prompt word template corresponding to the target page from a preset template library.
[0062] Here, the preset template library stores a plurality of preset templates set in advance, and the preset template library can include preset templates corresponding to each page type, each search engine and each style preference, so that the large language model generates page parameters corresponding to the target page according to the prompt words. The prompt word template also includes requirements for the generated page parameters.
[0063] For the above step S101, in specific implementation, the target page is obtained, and the prompt word template corresponding to the target page is determined from the plurality of preset templates stored in the preset template library.
[0064] According to the page parameter generation method provided in the present application, the preset template library is constructed in the following two ways:
[0065] Way one: generating at least one reference prompt word based on the page parameters of at least one first target reference page; generating a preset template based on the reference prompt word to form the preset template library.
[0066] For the above two steps, in the specific implementation, first, at least one reference prompt word is generated based on the page parameters of the first target reference page. Here, a language model can be used to input the page parameters of the first target reference page into the language model, and the language model is used to inversely summarize the reference prompt word, for example, what kind of prompt word is needed to generate the page parameters of the first target reference page; or the reference prompt word can be generated by artificial summarization. Then, the preset template is generated using the reference prompt word, and the preset template library is constructed using the preset template.
[0067] Way two: generating reference page parameters for a second target reference page based on at least one reference prompt word; determining at least one target reference prompt word based on the search optimization results of the reference page parameters of the second target reference page; generating a preset template based on the target reference prompt word to form the preset template library.
[0068] For the above two steps, in the specific implementation, for the same second target reference page, multiple reference page parameters for the second target reference page are generated according to at least one reference prompt word. At least one target reference prompt word is determined based on the search optimization results of different reference page parameters, and then a prompt word template is extracted based on the target reference prompt word, and the preset template library is constructed using the preset template.
[0069] As an optional embodiment, for the above step S101, the prompt word template corresponding to the target page is determined from the preset template library, including:
[0070] A: obtaining the page information of the target page.
[0071] For the above step A, in the specific implementation, the page information of the target page is obtained. Here, as an optional embodiment, the page information of the target page that can be called externally can be obtained from the server side, or the page information of the target page with the evaluation parameters such as page call volume and browsing time at the end of a certain proportion can be obtained, or the page information of the target page that can be called externally but has not set page parameters can be obtained, and the present application does not make a specific limitation thereon.
[0072] According to the embodiments provided in the present application, the page information is at least one of page type information, search engine information, and style preference information of the target page.
[0073] Here, the page type information can be information used to describe the type of the target page, such as a video page, a picture page, a description page, a question and answer page, etc. The search engine information refers to information of a search engine for which the search optimization is performed. Different preset templates can be used to generate corresponding prompt words for different search engines. For example, some search engines require that the title be no more than 10 characters, the description be no more than 50 characters, and the keyword be no more than 20 characters; some other search engines require that the title be no more than 20 characters, the description be no more than 100 characters, and no keyword; and some other search engines have requirements for structured data in addition to the above requirements for the title, the description, and the keyword. The style preference information can be a summary of the above information, or a summary of information related to time, or a summary of information related to emotion, etc. Since different search engines, different page types, and different user groups can have different content style preferences, different preset templates are set, which is beneficial to generating page information that is more in line with the needs of users.
[0074] B: determining the prompt word template corresponding to the page information from the preset templates in the preset template library based on the page information.
[0075] For step B above, in specific implementation, after the page information of the target page is determined, the preset template corresponding to the page information is determined from the plurality of preset templates in the preset template library based on the page information, as the prompt word template corresponding to the target page. Here, the corresponding prompt word template can be obtained from the preset template library based on the page type information; the preset template library can also include preset templates for different search engines and different style preferences, so the corresponding prompt word template can also be obtained based on the search engine information and the style preference information.
[0076] As an optional embodiment, for step S101 above, the determination of the prompt word template corresponding to the target page from the preset template library includes:
[0077] a: obtaining a search optimization result of at least one preset template in the preset template library for a historical page.
[0078] b: determining the preset template with the optimal search optimization result for the historical page as the prompt word template.
[0079] For the above steps a-step b, in the specific implementation, first, the search optimization result of each preset template in the preset template library for the historical page is obtained. Specifically, for each preset template, the historical prompt word generated by using the preset template is obtained, and the historical page parameter generated according to the historical prompt word is obtained, and the search optimization effect of the historical page parameter for the historical page is taken as the search optimization result of the preset template for the historical page. Then the preset template with the optimal search optimization effect for the historical page in the plurality of preset templates is determined as the prompt word template. In this way, the prompt word template with the optimal optimization effect can be determined according to the search optimization effect of different preset templates for the historical page parameter.
[0080] S102, obtaining the page content information corresponding to the target page, and generating the prompt word of the target page based on the page content information and the prompt word template.
[0081] Here, the page content information of the page refers to the specific content carried in the web page and its related attributes, which can include user-visible text, multimedia resources, structured data and other parameters.
[0082] For the above step S102, in the specific implementation, the page content information corresponding to the target page is obtained, and the prompt word of the target page is generated based on the obtained page content information corresponding to the target page and the prompt word template corresponding to the target page obtained in step S101.
[0083] Here, as an example, when the target page is a question and answer type page, the corresponding prompt word template can be "XXX asks: XXXXX. XXX replies: XXXXXXXXXXXXXXXXX. Requirements: generate a title of 10 characters or less according to the above question and answer content; generate a description word to describe the question and answer content within 50 characters; extract a keyword within 20 characters from the question and answer content". Wherein "XXX" is a placeholder, after obtaining the page content information corresponding to the target page, the placeholders in the above prompt word template are replaced according to the page content information, so as to generate the prompt word. The "requirements" in the example of the above prompt word template are the requirements for the generated page parameter.
[0084] Here, for different types of target pages, there are different methods to obtain the corresponding page content information. According to the embodiments provided in the present application, the target page can be a video type page, a picture type page, a description type page or a question and answer type page. Specifically, for the above step S102, the page content information corresponding to the target page is obtained, including:
[0085] (1) When the target page is a picture page, input a first picture in the target page into a picture recognition model, and determine first picture content information output by the picture recognition model as the page content information corresponding to the target page.
[0086] For the above step (1), when the target page is a picture page, a first picture contained in the target page is obtained, and the first picture is input into a pre-trained picture recognition model. The picture recognition model can recognize the first picture to extract first picture content information corresponding to the first picture. The first picture content information corresponding to the first picture in the target page is determined as the page content information corresponding to the target page.
[0087] (2) When the target page is a video page, input a video in the target page into a video recognition model, and determine video content information output by the video recognition model as the page content information corresponding to the target page, or obtain at least one second picture in the video, input each second picture into the picture recognition model, and determine second picture content information output by the picture recognition model as the page content information corresponding to the target page.
[0088] For the above step (2), when the target page is a video page, a video contained in the target page is obtained, and the video is input into a pre-trained video recognition model. The video recognition model can recognize the video to extract video content information corresponding to the video. The video content information corresponding to the video in the target page is determined as the page content information corresponding to the target page. Alternatively, when the target page is a video page, at least one second picture is extracted from the video contained in the target page, and the second picture is input into a pre-trained picture recognition model. The picture recognition model can recognize the second picture to extract second picture content information corresponding to the second picture. The second picture content information corresponding to the second picture is determined as the page content information corresponding to the target page.
[0089] (3) When the target page is a description page or a question and answer page, identify a page element in the target page to obtain the page content information corresponding to the target page, or obtain a parameter value corresponding to the target page through a server, and obtain the page content information corresponding to the target page based on the parameter value.
[0090] For the step (3), in a specific implementation, when the target page is a description page or a question and answer page, page elements in the target page are recognized to obtain page content information corresponding to the target page. Here, in the description page or the question and answer page, the page elements are recognized and the content information is extracted through a process of analyzing page elements, code structure, semantic features and interaction mode of the page, and separating target content (such as text, question and answer pair, etc.) from the complex page. Specifically, for the description page, structured information such as title, paragraph and table can be extracted as page content information. For the question and answer page, content such as question title, best answer and answerer information can be extracted as page content information. Alternatively, when the target page is a description page or a question and answer page, a parameter value corresponding to the target page is obtained through a server, and page content information corresponding to the target page is obtained based on the parameter value of the target page.
[0091] As an optional embodiment, for the step S102, the generating the prompt word of the target page based on the page content information and the prompt word template comprises:
[0092] Step 1021, determining at least one hot word information from the page content information.
[0093] Here, the hot word information refers to a word group with a high frequency of occurrence in the page content information.
[0094] For the step 1021, in a specific implementation, at least one hot word information is extracted from the page content information of the target page.
[0095] According to the embodiments provided in the present application, for the step 1021, at least one hot word information is determined from the page content information through the following two ways:
[0096] Method one: performing word segmentation on the page content information to obtain at least one word group, and / or, obtaining at least one word group corresponding to a preset number of characters from the page content information according to the preset number of characters, and determining the occurrence times of each word group; sorting at least one word group based on the occurrence times, and determining a preset number of word groups from the sorting result as the hot word information.
[0097] For the above two steps, in specific implementation, first, at least one word group is obtained from the page content information. Specifically, at least one word group can be obtained by performing word segmentation on the page content information; or at least one word group corresponding to a preset number of characters can be obtained from the page content information according to the preset number of characters, for example, when the preset number of characters is 2, a word group composed of two characters in the page content information is determined; and the occurrence frequency of each word group is determined. Then, the at least one word group is sorted based on the occurrence frequency, and a preset number of word groups are determined as hot word information from the sorting result. Here, specifically, the at least one word group is sorted in descending order of occurrence frequency, and the top-ranked word groups in the sorting result are determined as hot word information, for example, when the preset number is 10, the top 10 word groups in the sorting result are determined as hot word information.
[0098] Method two: performing word segmentation on the page content information to obtain at least one word group, and / or obtaining at least one word group corresponding to a preset number of characters from the page content information according to the preset number of characters, and determining the occurrence frequency of each word group; for each word group, when the occurrence frequency of the word group is greater than or equal to a preset threshold, the word group is determined as the hot word information.
[0099] For the above two steps, in specific implementation, the way of determining at least one word group from the page content information is the same as the way of determining word groups in the above steps, which will not be described here. After at least one word group is determined, for each word group, when the occurrence frequency of the word group is greater than or equal to a preset threshold, the word group is determined as hot word information.
[0100] Step 1022: Obtain at least one hot spot information, and match the at least one hot word information with the at least one hot spot information to determine at least one target hot word information.
[0101] For the above step 1022, in specific implementation, at least one hot word information is obtained, and the at least one hot word information is matched with at least one hot spot information to determine at least one target hot word information. Here, when performing the matching, for each hot word information, when the hot word information exists in the same hot spot information, the hot word information is determined as target hot word information.
[0102] According to the embodiments provided in the present application, for the above step 1022, the following two methods are used to obtain multiple hot spot information:
[0103] Method one: determining the hot spot information according to the search hot spot of the target search engine in a historical time period.
[0104] Here, the historical time period can be a week or a month in the past, which is not limited in the present application. The search hotspots refer to keywords or topics searched by a large number of users in the historical time period.
[0105] For the above steps, in specific implementation, the hot information is determined according to the search hotspots of the target search engine in the historical time period. Here, as an optional embodiment, search terms searched by the target search engine in the historical time period can be obtained, and the search times of each search term can be determined. When the search times of a search term are greater than or equal to a threshold, or the search times are in the front, the search term is taken as a search hotspot to determine the hot information.
[0106] Method two: obtaining the search hotspots of the target search engine in the historical time period; determining the hot information based on the search heat change trend of the search hotspots in the historical time period.
[0107] For the above two steps, in specific implementation, first, the search hotspots of the target search engine in the historical time period are obtained. Here, the method of obtaining the search hotspots can refer to the description of the above steps, which is not repeated here. Then, the hot information is determined based on the search heat change trend of the search hotspots in the historical time period. Here, as an optional embodiment, for each search hotspot, the search heat change trend of the search hotspot in the historical time period is counted, and if the search heat change trend is an upward trend, the search hotspot is taken as the hot information.
[0108] Step 1023, generating the prompt word based on the prompt word template, the page content information, and at least one target hot word information.
[0109] For the above step 1023, in specific implementation, after the target hot word information is determined, the prompt word is generated based on the prompt word template, the page content information, and at least one target hot word information. Here, the prompt word template has multiple placeholders, and the placeholders are replaced by the page content information and the target hot word information, so as to generate the prompt word.
[0110] S103, inputting the prompt word into a pre-trained large language model to generate a page parameter corresponding to the target page.
[0111] In the step S103, the generated prompt word is input into the pre-trained large language model, and the page parameters corresponding to the target page are generated. Here, the page parameters can include the title, description, keywords, and the like of the target page, and can also include structured data, etc., which are not limited by the present application. According to the embodiments provided by the present application, the requirements for the generated page parameters are stored in the prompt word template, so that the large language model can generate corresponding page parameters according to the requirements by using its language understanding ability and summarization ability, reducing the manual participation and greatly improving the efficiency and accuracy of page parameter generation. Moreover, by using the powerful summarization ability and understanding ability of the large language model, the generated page parameters are more accurate and standardized.
[0112] After generating the page parameters corresponding to the target page, the website information of the target website can be adjusted according to the page parameters, so as to improve the search result ranking and exposure of the target website in the search results.
[0113] According to the page parameter generation method provided by the embodiments of the present application, before the target page is obtained, the page parameter generation method further includes:
[0114] I: Obtain a page generation requirement, and determine a corresponding target page template from a plurality of preset page generation templates based on the page generation requirement.
[0115] In the step I, the page generation requirement is obtained, and the corresponding target page template is determined from a plurality of preset page generation templates based on the page generation requirement. Here, for example, the page generation requirement can be "generate a picture class page containing a certain element picture", "generate a video class page containing a certain element video", or "generate a question and answer class page answering a certain question", etc., which are not limited by the present application. As an example, when the page generation requirement is "generate a picture class page containing a certain element picture", the target page template is the template of the picture class page.
[0116] II: Determine a corresponding content generation model based on the content requirement in the page generation requirement, and generate target content information corresponding to the page generation requirement by using the content generation model.
[0117] For the above step II, in specific implementation, the corresponding content generation model is determined based on the content requirement in the page generation requirement, and the target content information corresponding to the page generation requirement is generated by using the content generation model. Here, as an example, when the page generation requirement is a question and answer type page generation requirement, and the content requirement is "generate a question and answer type page with the question 'how to build a building?'", at this time, the agent more suitable for the building field is needed to answer the above question according to the content requirement, and multiple questions in a page can select different agents to answer. For example, the picture type page generation requirement, the content requirement is described as "pictures of a certain area, a certain house type and a certain decoration style", at this time, the picture generation model is selected according to the content requirement to generate pictures meeting the content requirements, and at the same time, the text expansion model or the agent suitable for decoration can be selected to generate more detailed picture description information according to the requirement description, and then the picture generation model is used to generate pictures meeting the content requirements; or, after the picture generation model generates pictures meeting the content requirements, the picture recognition model is used to generate description information of the corresponding pictures.
[0118] III: generating a first page based on the target page template and the target content information, and determining the first page as the target page.
[0119] For the above step III, in specific implementation, after the target content information is generated, the target content information is added to the position corresponding to the target page template, so as to generate the first page, and the first page is determined as the target page. In this way, not only the automatic generation of the page can be realized according to the page generation requirement of the user, but also the page parameters of the page can be automatically generated. After the page is generated, the page parameters corresponding to the page can be generated by using the above steps S101-S103, so as to realize the automatic generation and search optimization of the page and the page parameters.
[0120] The page parameter generation method of the web page provided by the embodiment of the present application first acquires a target page, and determines a prompt word template corresponding to the target page from a preset template library; then, acquires page content information corresponding to the target page, and generates a prompt word of the target page based on the page content information and the prompt word template; finally, inputs the prompt word into a pre-trained large language model to generate page parameters corresponding to the target page.
[0121] The present application realizes the automatic generation of the page parameters of the web page by combining the large language model and the prompt word template. The prompt word of the target page is generated according to the prompt word template, and the corresponding page parameters are generated based on the prompt word by using the powerful summarization ability and language understanding ability of the large language model. In this way, the generated page parameters are more accurate and standardized, the manual participation is reduced, and the efficiency and accuracy of the generation of the page parameters are greatly improved.
[0122] Please refer to Figure 2 、 Figure 3 , Figure 2 FIG. 1 is a structural schematic diagram of a page parameter generation device for a webpage provided by an embodiment of the present application, Figure 3 FIG. 2 is another structural schematic diagram of a page parameter generation device for a webpage provided by an embodiment of the present application. As shown in FIG. 2, the page parameter generation device 200 comprises: Figure 2
[0123] a template determination module 201 configured to obtain a target page and determine a prompt word template corresponding to the target page from a preset template library;
[0124] a prompt word generation module 202 configured to obtain page content information corresponding to the target page and generate a prompt word of the target page based on the page content information and the prompt word template;
[0125] a page parameter generation module 203 configured to input the prompt word into a pre-trained large language model to generate a page parameter corresponding to the target page.
[0126] Further, when the prompt word generation module 202 is configured to obtain the page content information corresponding to the target page, the prompt word generation module 202 is further configured to:
[0127] when the target page is a picture type page, input a first picture in the target page into a picture recognition model, and determine first picture content information output by the picture recognition model as the page content information corresponding to the target page; and / or,
[0128] when the target page is a video type page, input a video in the target page into a video recognition model, and determine video content information output by the video recognition model as the page content information corresponding to the target page, or obtain at least one second picture in the video, input each second picture into the picture recognition model, and determine second picture content information output by the picture recognition model as the page content information corresponding to the target page; and / or,
[0129] when the target page is a description type page or a question and answer type page, recognize a page element in the target page to obtain the page content information corresponding to the target page, or obtain a parameter value corresponding to the target page through a server, and obtain the page content information corresponding to the target page based on the parameter value.
[0130] Further, when the prompt word generation module 202 is configured to generate the prompt word of the target page based on the page content information and the prompt word template, the prompt word generation module 202 is further configured to:
[0131] determine at least one hot word information from the page content information;
[0132] obtain at least one hot spot information, and match the at least one hot word information with the at least one hot spot information to determine at least one target hot word information;
[0133] generate the prompt word based on the prompt word template, the page content information, and the at least one target hot word information.
[0134] Further, when the prompt word generation module 202 is used to determine at least one hot word information from the page content information, the prompt word generation module 202 is further used to:
[0135] perform word segmentation on the page content information to obtain at least one word group, and / or, for a preset number of characters, obtain at least one word group corresponding to the preset number of characters from the page content information, and determine the occurrence frequency of each word group;
[0136] sort at least one word group based on the occurrence frequency, and determine a preset number of word groups from the sorting result as the hot word information;
[0137] Alternatively,
[0138] for each preset number of characters, obtain a plurality of word groups corresponding to the preset number of characters from the page content information, and determine the occurrence frequency of each word group;
[0139] for each word group, when the occurrence frequency of the word group is greater than or equal to a preset threshold, the word group is determined as the hot word information.
[0140] Further, the prompt word generation module 202 is further used to obtain the hot spot information by the following steps:
[0141] determine the hot spot information according to the search hot spot of a target search engine in a historical time period;
[0142] and / or,
[0143] obtain the search hot spot of the target search engine in the historical time period;
[0144] determine the hot spot information based on the search hotness change trend of the search hot spot in the historical time period.
[0145] Please refer to Figure 3 , the page parameter generation apparatus 200 further includes a page generation module 204, before the target page of the target website is obtained, the page generation module 204 is used to:
[0146] Obtaining a page generation requirement, and determining a target page template corresponding to the page generation requirement from a plurality of preset page generation templates;
[0147] Determining a content generation model corresponding to the content requirement based on the content requirement in the page generation requirement, and generating target content information corresponding to the page generation requirement by using the content generation model;
[0148] Generating a first page based on the target page template and the target content information, and determining the first page as the target page.
[0149] Further, when the template determination module 201 is used to determine the prompt word template corresponding to the target page from a plurality of preset templates stored in the preset template library, the template determination module 201 is further used to:
[0150] Obtaining page information of the target page; wherein the page information is at least one of page type information, search engine information and style preference information of the target page;
[0151] Determining the prompt word template corresponding to the page information from the preset templates in the preset template library based on the page information.
[0152] Further, when the template determination module 201 is used to determine the prompt word template corresponding to the target page from the preset template library, the template determination module 201 is further used to:
[0153] Obtaining a search optimization result of at least one preset template for a historical page in the preset template library;
[0154] Determining the preset template with the optimal search optimization effect for the historical page as the prompt word template.
[0155] Please refer to Figure 3 The page parameter generation apparatus 200 further includes a template library construction module 205, which is used to construct the preset template library by the following steps:
[0156] Generating at least one reference prompt word based on page parameters of at least one first target reference page;
[0157] Generating a preset template based on the reference prompt word, and composing the preset template library; and / or,
[0158] Generating a reference page parameter for a second target reference page based on at least one reference prompt word;
[0159] Determining at least one target reference prompt word based on a search optimization result of the reference page parameter of the second target reference page;
[0160] generate a preset template based on the target reference prompt word, and constitute the preset template library.
[0161] Please refer to Figure 4 , Figure 4 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 4. Figure 4 As shown in FIG. 4, the electronic device 400 includes a processor 410, a memory 420 and a bus 430.
[0162] The memory 420 stores machine readable instructions executable by the processor 410, and when the electronic device 400 is running, the processor 410 and the memory 420 communicate through the bus 430. When the machine readable instructions are executed by the processor 410, the steps of the webpage page parameter generation method in the method embodiment shown in the above description can be performed. For specific implementation manners, refer to the method embodiment, which will not be described here. Figure 1 The processor 410, the memory 420 and the bus 430 can perform the steps of the webpage page parameter generation method in the method embodiment shown in the above description. For specific implementation manners, refer to the method embodiment, which will not be described here.
[0163] The present application also provides a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, the steps of the webpage page parameter generation method in the method embodiment shown in the above description can be performed. For specific implementation manners, refer to the method embodiment, which will not be described here. Figure 1 The processor 410, the memory 420 and the bus 430 can perform the steps of the webpage page parameter generation method in the method embodiment shown in the above description. For specific implementation manners, refer to the method embodiment, which will not be described here.
[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be described here.
[0165] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, and for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some communication interfaces, devices or units, and can be electrical, mechanical or other forms.
[0166] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0167] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0168] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application or the part of the present application that essentially contributes to the prior art or the part of the technical solutions of the present application can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0169] Finally, it should be noted that the above-described embodiments are merely specific embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit the same. The protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any skilled person familiar with the technical field can modify or easily think of changes to the technical solutions recorded in the foregoing embodiments within the technical range disclosed by the present application, or replace some technical features with equivalent replacements; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for generating page parameters for a webpage, characterized in that, The method for generating page parameters includes: The target page is obtained, and the prompt word template corresponding to the target page is determined from the preset template library; wherein, the prompt word template is obtained from the preset template library based on the page information of the target page, and the preset template library includes preset templates corresponding to each page type, each search engine, and each style preference; Obtain the page content information corresponding to the target page, and generate prompts for the target page based on the page content information and the prompt template; The prompt words are input into a pre-trained large language model to generate page parameters corresponding to the target page; The step of generating prompts for the target page based on the page content information and the prompt template includes: At least one hot word is identified from the page content information; Obtain at least one hot topic information, and match at least one hot word information with at least one hot topic information to determine at least one target hot word information; The prompt word is generated based on the prompt word template, the page content information, and at least one target hot word information; Before obtaining the target page, the page parameter generation method further includes: Obtain page generation requirements, and determine the corresponding target page template from a set of preset page generation templates based on the page generation requirements; wherein, the page generation requirements are image-based page generation requirements; Based on the content requirements in the page generation requirements, a corresponding content generation model is determined, and the target content information corresponding to the page generation requirements is generated using the content generation model. A first page is generated based on the target page template and the target content information, and the first page is determined as the target page; The step of determining the corresponding content generation model based on the content requirements in the page generation requirements, and using the content generation model to generate the target content information corresponding to the page generation requirements, includes: Select a text expansion model or intelligent agent to generate more detailed image description information according to the requirements, and determine the image description information as the page content information corresponding to the target page; The step of determining the prompt word template corresponding to the target page from the preset template library includes: For each preset template, obtain the historical suggestion words generated using the preset template, and obtain the historical page parameters generated based on the historical suggestion words. Use the search optimization effect of the historical page parameters on the historical page as the search optimization result of the preset template on the historical page. The preset template that provides the best search optimization effect for historical pages is determined as the prompt word template; The preset template library is constructed using the following steps: At least one reference prompt word is generated based on the page parameters of at least one first target reference page; wherein, the reference prompt word is obtained by inputting the page parameters of the first target reference page into a language model and performing reverse summarization using the language model; Based on the reference prompts, preset templates are generated to form the preset template library; and / or, Generate reference page parameters for the second target reference page based on at least one reference prompt word; Based on the search optimization results of the reference page parameters of the second target reference page, at least one target reference prompt word is determined; Based on the target reference prompts, preset templates are generated to form the preset template library.
2. The page parameter generation method according to claim 1, characterized in that, The step of obtaining the page content information corresponding to the target page includes: When the target page is an image page, the first image from the target page is input into the image recognition model, and the content information of the first image output by the image recognition model is determined as the page content information corresponding to the target page; and / or, When the target page is a video page, the video on the target page is input into a video recognition model, and the video content information output by the video recognition model is determined as the page content information corresponding to the target page; or, at least one second image frame from the video is obtained, each second image frame is input into an image recognition model, and the second image content information output by the image recognition model is determined as the page content information corresponding to the target page; and / or, When the target page is a descriptive page or a question-and-answer page, the page elements within the target page are identified to obtain the page content information corresponding to the target page; alternatively, the parameter values corresponding to the target page are obtained through the server, and the page content information corresponding to the target page is obtained based on the parameter values.
3. The page parameter generation method according to claim 1, characterized in that, Determining at least one hot word from the page content information includes: The page content information is segmented into words to obtain at least one word group, and / or, for a preset number of characters, at least one word group corresponding to the preset number of characters is obtained from the page content information, and the number of occurrences of each word group is determined; At least one word group is sorted based on the number of occurrences, and a preset number of word groups are determined from the sorting results as the hot word information. or, For each phrase, if the number of occurrences of the phrase is greater than or equal to a preset threshold, then the phrase is identified as the hot word information.
4. The page parameter generation method according to claim 1, characterized in that, The hotspot information is obtained through the following steps: The hotspot information is determined based on the search trends of the target search engine within a historical time period; And / or, Obtain the search hotspots of the target search engine within a historical time period; The hotspot information is determined based on the trend of search popularity changes within the historical time period.
5. The page parameter generation method according to claim 1, characterized in that, The step of determining the prompt word template corresponding to the target page from the preset template library includes: Obtain page information of the target page; wherein the page information is at least one of page type information, search engine information, and style preference information of the target page; Based on the page information, the prompt word template corresponding to the page information is determined from the preset templates in the preset template library.
6. A webpage parameter generation device, characterized in that, The page parameter generation device includes: The template determination module is used to acquire a target page and determine the prompt word template corresponding to the target page from a preset template library; wherein, the prompt word template is acquired from the preset template library based on the page information of the target page, and the preset template library includes preset templates corresponding to each page type, each search engine, and each style preference; The prompt word generation module is used to obtain page content information corresponding to the target page, and generate prompt words for the target page based on the page content information and the prompt word template; The page parameter generation module is used to input the prompt words into a pre-trained large language model to generate page parameters corresponding to the target page; When generating prompts for the target page based on the page content information and the prompt template, the prompt generation module is further configured to: At least one hot word is identified from the page content information; Obtain at least one hot topic information, and match at least one hot word information with at least one hot topic information to determine at least one target hot word information; The prompt word is generated based on the prompt word template, the page content information, and at least one target hot word information; The page parameter generation device further includes a page generation module, which, before obtaining the target page, is used to: Obtain page generation requirements, and determine the corresponding target page template from a set of preset page generation templates based on the page generation requirements; wherein, the page generation requirements are image-based page generation requirements; Based on the content requirements in the page generation requirements, a corresponding content generation model is determined, and the target content information corresponding to the page generation requirements is generated using the content generation model. A first page is generated based on the target page template and the target content information, and the first page is determined as the target page; When the page generation module determines the corresponding content generation model based on the content requirements in the page generation requirements, and uses the content generation model to generate the target content information corresponding to the page generation requirements, the page generation module is further configured to: Select a text expansion model or intelligent agent to generate more detailed image description information according to the requirements, and determine the image description information as the page content information corresponding to the target page; When determining the prompt word template corresponding to the target page from a preset template library, the template determining module is further configured to: For each preset template, obtain the historical suggestion words generated using the preset template, and obtain the historical page parameters generated based on the historical suggestion words. Use the search optimization effect of the historical page parameters on the historical page as the search optimization result of the preset template on the historical page. The preset template that provides the best search optimization effect for historical pages is determined as the prompt word template; The page parameter generation device further includes a template library construction module, which is used to construct the preset template library through the following steps: At least one reference prompt word is generated based on the page parameters of at least one first target reference page; wherein, the reference prompt word is obtained by inputting the page parameters of the first target reference page into a language model and performing reverse summarization using the language model; Based on the reference prompts, preset templates are generated to form the preset template library; and / or, Generate reference page parameters for the second target reference page based on at least one reference prompt word; Based on the search optimization results of the reference page parameters of the second target reference page, at least one target reference prompt word is determined; Based on the target reference prompts, preset templates are generated to form the preset template library.
Citation Information
Patent Citations
Search engine optimization method and device, equipment and storage medium
CN113449165A
Systems and methods for dynamic large language model prompt generation
US20240330579A1