Page generation method, device and electronic device
By obtaining page samples of the filtered data samples and using the page generation model for multiple iterative training, the problem of low page generation efficiency in the existing technology is solved, and fast and accurate page output is achieved.
Patent Information
- Application Number
- CN202411047240.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In the prior art, page generation requires developers to write code separately, resulting in low efficiency.
By obtaining page samples of filtered data samples, using the page generation model for multiple iterative training, adjusting the network parameters, and directly generating the target page, the coding workload of developers is reduced.
It improves the efficiency of page generation, reduces the writing work of developers, and achieves fast and accurate page output.
Smart Images

Figure CN119025107B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a page generation method, device, and electronic device. Background Art
[0002] A page refers to a single display area that users see when browsing websites, applications, mini-programs, etc. A page can be part of a web page, document, or application interface. Each page has specific content, layout, and functions.
[0003] In the related art, for pages such as website pages and mini-program pages, the generation of each page requires developers to write corresponding codes separately, which is cumbersome and inefficient. Summary of the Invention
[0004] The purpose of the present disclosure is to provide a page generation method, device and electronic device to improve page output efficiency and reduce the coding workload of developers.
[0005] To achieve the above objectives, the present disclosure provides a page generation method, comprising:
[0006] Obtaining a page sample that meets a screening data sample; the screening data sample includes the industry, product category, and attributes indicated by the page sample;
[0007] Performing multiple iterative training on the page generation model using the screened data sample and the page sample, wherein one of the multiple iterative trainings includes: processing the screened data sample using the page generation model to obtain a first predicted page; adjusting network parameters of the page generation model based on a loss value between the first predicted page and the page sample;
[0008] The input screening data is input into the page generation model to obtain a target page.
[0009] Optionally, the performing multiple iterative training on the page generation model using the screened data samples and the page samples includes:
[0010] Filtering out pages to be corrected from the target pages generated by the page generation model, wherein the number of transactions is less than a first preset number of transactions and the number of target page generation is greater than a preset number of generation;
[0011] Correcting the page to be corrected using a preset first page or a second page matching the screening data to obtain a corrected page;
[0012] The page generation model is trained using the screening data and the revised page.
[0013] Optionally, the method further includes:
[0014] A page update model is subjected to multiple iterative training using the target page and a third page output by the page generation model, wherein one of the multiple iterative trainings comprises: processing the target page using the page update model to obtain a second predicted page; adjusting network parameters of the page update model based on a loss value between the second predicted page and the third page; the third page is a page that matches the screening data and has a user behavior count greater than a preset number, where the user behavior count is the number of times a user triggers the page that matches the screening data;
[0015] The page output by the page generation model in real time is input into the page update model to obtain an updated page.
[0016] Optionally, the performing multiple iterative training on the page generation model using the screened data samples and the page samples includes:
[0017] Filtering out target page samples having a transaction number greater than a second preset transaction number from the page samples, and target screening data samples corresponding to the target page samples;
[0018] The page generation model is trained iteratively multiple times using the target page sample and the target screening data sample.
[0019] Optionally, the page sample includes a page component; and obtaining the page sample that meets the screening data sample includes:
[0020] For each of the plurality of page components, filtering out a first page component that matches the screening data sample from the plurality of page components under the each page component; the plurality of page components include a header, a middle, and a tail of the page sample;
[0021] The first page components under the multiple page components are spliced together to obtain the page sample.
[0022] Optionally, the method further includes:
[0023] In the case where the plurality of page components have the same functional modules, establishing a mapping relationship between the functional modules and the plurality of page components;
[0024] For any second page component among the multiple page components, based on the mapping relationship, a functional module corresponding to the second page component is obtained, thereby constructing the second page component.
[0025] Optionally, the method further includes:
[0026] In the case where multiple application programs have a requirement to access the same function library, establishing a mapping relationship between the multiple application programs and the code packages that access the function library;
[0027] For any application program among the multiple application programs, obtaining a code package corresponding to the application program based on the mapping relationship;
[0028] The code package is run to access the function library to obtain the page sample.
[0029] Optionally, the step of splicing the first page components under the multiple page components to obtain the page sample includes:
[0030] splicing the first page components under the multiple page components to obtain a basic page;
[0031] The page sample is generated by adding page code on the basis of the basic page.
[0032] In order to achieve the above objectives, the present disclosure provides a page generation device, comprising:
[0033] An acquisition module is configured to acquire a page sample that meets a screening data sample; the screening data sample includes the industry, product category, and attributes indicated by the page sample;
[0034] a first training module configured to perform multiple iterative training on a page generation model using the screened data sample and the page sample, wherein one of the multiple iterative trainings comprises: processing the screened data sample using the page generation model to obtain a first predicted page; and adjusting network parameters of the page generation model based on a loss value between the first predicted page and the page sample;
[0035] The first application module is configured to input the input screening data into the page generation model to obtain a target page.
[0036] In order to achieve the above objectives, the present disclosure provides an electronic device, comprising:
[0037] a memory having a computer program stored thereon;
[0038] The processor is configured to execute the computer program in the memory to implement the steps of a page generation method proposed in the present disclosure.
[0039] The above technical solution can obtain page samples that match the filtered data samples, and use them to iteratively train the page generation model. When the page generation model is subsequently applied, the filtered data can be directly input into the page generation model to directly obtain the target page that matches the filtered data. The page generation model can generate a target page that matches the input filtered data without requiring developers to write code specifically for the filtered data entered by consumers, thus reducing developer coding workload and improving work efficiency.
[0040] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:
[0042] Figure 1 The figure is a flowchart of a page generation method according to an exemplary embodiment.
[0043] Figure 2 It is a schematic diagram of an input interface for filtering data according to an exemplary embodiment.
[0044] Figure 3 It is a schematic diagram of an industry selection interface proposed according to an exemplary embodiment.
[0045] Figure 4 It is a schematic diagram of a purchase interface proposed according to an exemplary embodiment.
[0046] Figure 5 It is a schematic diagram showing the head and the middle part according to an exemplary embodiment.
[0047] Figure 6 It is a schematic diagram showing the head, middle part and tail according to an exemplary embodiment.
[0048] Figure 7 It is a block diagram of a page generating device proposed according to an exemplary embodiment.
[0049] Figure 8 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0050] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0051] Figure 1 This is a flowchart of a page generation method according to an exemplary embodiment. The page generation method can be applied to electronic devices such as mobile phones, tablets, and computers. The page generation method includes the following steps:
[0052] In step S11 , a page sample that meets the screening data sample is obtained.
[0053] The screening data sample is used to filter out input data that meets consumer needs. The screening data sample includes the industry, product category and attributes indicated by the page sample.
[0054] The industry indicated by the page sample refers to the industry represented by the displayed page sample, for example, see Figure 3 As shown, it can be finance, manufacturing, hospitals, medicine, medical equipment, catering and food, hotel accommodation, tourism and education and training, etc.
[0055] The product category is used to indicate the type of page sample, which includes at least one of a website page, a mini-program page, and an application page. The website page includes the website page of a shopping mall website, the website page of an official website, and the website page of a public account, etc.
[0056] Attributes are used to indicate the style of a page sample, such as indicating the overall color of the page sample.
[0057] See also Figure 3 As shown, if the industry in the screening data sample input by the consumer is hospital, the product category is the website page of the official website, and the color in the attribute is green, then a page sample matching the screening data sample is obtained.
[0058] In step S12, the page generation model is iteratively trained multiple times using the screened data samples and the page samples.
[0059] Both the filtered data samples and the page samples are samples used to train the page generation model. The filtered data samples serve as the independent variables of the page generation model, and the page samples are accurate page samples that match the filtered data samples. They serve as the dependent variables or labels of the page generation model, thereby realizing iterative training of the page generation model.
[0060] Among them, one of the multiple iterative trainings includes: using the page generation model to process the screened data sample to obtain a first predicted page; and adjusting the network parameters of the page generation model according to the loss value between the first predicted page and the page sample.
[0061] Optionally, a loss function can be constructed based on the loss value between the first predicted page and the page sample, and the loss function can be used to adjust the network parameters of the page generation model, where the network parameters include the weights of the convolutional layer in the page generation model and / or the activation value of the activation function.
[0062] When the loss value between the first predicted page and the page sample is greater than the preset value, the loss function is used to adjust the network parameters to make the loss value smaller. In each round of training, the network parameters are adjusted to make the loss value between the first predicted page and the page sample less than or equal to the preset value.
[0063] For example, the difference between the first predicted page and the sample page can be used as the loss value. The greater the difference between the first predicted page and the sample page, the greater the loss value. The difference between the first predicted page and the sample page can be reflected in at least: color difference (e.g., the first predicted page is blue, while the sample page is green), functional difference (e.g., the first predicted page has a login function in its header, while the sample page does not), format difference (e.g., the middle of the first predicted page is horizontal, while the middle of the second predicted page is vertical), etc.
[0064] The importance of the difference between the first predicted page and the page sample can be defined, and different degrees of difference correspond to different weights. For example, the weight corresponding to the functional difference is greater, and the weight corresponding to the color difference is smaller. In this way, the loss function is constructed by different degrees of difference and the weights corresponding to different degrees of difference.
[0065] For example, the loss function it constructs is as follows:
[0066] Loss=Loss1*q1+Loss2*q2+Loss3*q3+…LossN*qN
[0067] Loss is the total loss value; Loss1~Loss3 are the functional difference, color difference and format difference between the first predicted page and the page sample respectively; q1~q3 are the weights corresponding to the functional difference, color difference and format difference between the first predicted page and the page sample.
[0068] In step S13, the input screening data is input into the page generation model to obtain a target page.
[0069] After the page generation model has been trained multiple times, a trained page generation model can be obtained. The trained page generation model has learned the potential response relationship between the screening data samples and the page samples. After the screening data entered by the consumer in real time is input into the page generation model, the target page can be predicted.
[0070] Alternatively, because page samples from different product categories vary significantly—for example, the formats of website pages, mini-program pages, and application pages vary significantly—training a single page generation model with all of these samples would result in overly cluttered training samples for the trained page generation model, leading to low accuracy in the target pages predicted by the trained page generation model. Therefore, different page generation models can be used for target pages in different product categories.
[0071] For example, the screening data samples used to screen website pages and the website pages can be used as training samples for the page generation model, thereby training a page generation model for predicting website pages.
[0072] For example, the screening data samples used to screen the mini-program pages and the mini-program pages can be used as training samples for the page generation model, thereby training a page generation model for predicting the mini-program pages.
[0073] For example, the screening data samples and the application data used to screen application pages can be used as training samples for the page generation model, thereby training a page generation model for predicting application pages.
[0074] The above technical solution can obtain page samples that match the filtered data samples, and use them to iteratively train the page generation model. When the page generation model is subsequently applied, the filtered data can be directly input into the page generation model to directly obtain the target page that matches the filtered data. The page generation model can directly generate the target page that matches the filtered data based on the input filtered data, eliminating the need for developers to write code specifically for the filtered data entered by consumers. This reduces developer coding workload and improves work efficiency.
[0075] The following describes an exemplary embodiment involved in the above step S12, which is used for modifying the page generation model and includes the following steps:
[0076] (1) From the target pages generated by the page generation model, select the pages to be modified whose transaction times are less than a first preset transaction times and whose target pages are generated times greater than the preset generation times.
[0077] The number of transactions may refer to the number of times a consumer purchases a target page, and the number of generation may refer to the number of times a consumer clicks to generate a target page.
[0078] See also Figure 2 As shown in the figure, consumers can enter screening data and click to generate a target page; after the target page is generated, they will be redirected to the purchase page. Figure 4 As shown, if the consumer clicks on the purchase page to buy, a transaction will be recorded; please refer to Figure 2 As shown, if the consumer clicks on the generate target page on the page for inputting screening data, the number of generation will be recorded once.
[0079] If the number of transactions is less than the first preset number of transactions and the target page generation time is greater than the preset generation time, it means that the target page is frequently clicked and generated by consumers, but the purchase rate is low. At this time, there are two situations. The first situation is that consumers do not like the target page that matches the filtered data; the second situation is that the generated target page is not a page that matches the filtered data, and it does not meet the consumer's filtering needs. Regardless of which situation is the case, it means that this part of the target page does not meet the consumer's needs. Therefore, this part of the target page can be used as a page to be corrected, and then corrected to meet the consumer's needs.
[0080] (2) Correcting the page to be corrected with a preset first page or a second page that matches the screening data to obtain a corrected page.
[0081] The preset first page may be a page that matches the screening data and is updated the latest. For example, a page that matches the screening data and is updated the latest may be obtained from a database.
[0082] The second page that matches the filter data is the exact page that matches the filter data.
[0083] Taking the first scenario as an example, if a consumer does not like the target page that matches the filtered data, they will frequently click on the generated target page but will not purchase the target page. This indicates that the consumer may think that the format or style of the generated target page is poor. In this case, the target page can be modified by using the first page that was most recently updated in the database, thereby modifying the target page to the latest format or style. When modifying, the page to be modified can be directly replaced with the first page that was most recently updated in the database, or the difference between the page to be modified and the first page can be compared and the difference parts updated. This disclosure does not limit this.
[0084] Taking the second case as an example, if the consumer does not like the target page that matches the filtered data, he will frequently click on the generated target page, but will not purchase the target page. This means that the generated target page may not be what the consumer needs. For example, the target page required by the consumer is yellow, but the generated target page is green. At this time, the accurate second page that matches the filtered data can be obtained from the database to correct the page to be corrected, and the difference between the page to be corrected and the second page can be compared to update the difference part.
[0085] (3) Using the screened data and the corrected page to train the page generation model.
[0086] The corrected page obtained after correcting the page to be corrected is a page that matches the filtered data. The page generation model is then trained using the corrected page and the filtered data, so that the page generation model can be calibrated and updated in real time.
[0087] Through the above technical solution, the page generation model outputs a page to be corrected that does not meet consumer needs, and then the page generation model can be recalibrated and updated with the corrected page and the filtered data, so that the corrected page generation model can be more adapted to consumer needs.
[0088] First, after the page generation model is calibrated and updated using the latest updated first page and filtering data in the database, the updated page generation model can output the latest updated page based on the filtering data subsequently input by consumers, thereby ensuring that the page style or format displayed to consumers is the latest page.
[0089] Secondly, after the page generation model is calibrated and updated using the accurate second page and screening data in the database, the updated page generation model can output accurate pages based on the screening data subsequently input by consumers, reducing the occurrence of mismatches between the output page and the consumer's screening data.
[0090] The following describes an exemplary embodiment involved in the above step S12, which is used to explain an exemplary solution for training a page generation model, and includes the following steps:
[0091] (1) Filtering out target page samples whose transaction times are greater than a second preset transaction times from the page samples, and target screening data samples corresponding to the target page samples.
[0092] The number of transactions may refer to the number of times consumers purchase the target page. The target page sample with a transaction number greater than the second preset transaction number refers to a page sample with a higher number of consumer consumption or purchases among the page samples.
[0093] (2) Using the target page sample and the target screening data sample, the page generation model is iteratively trained multiple times.
[0094] When training the page generation model, target page samples consumed more frequently by consumers and the page generation model corresponding to the target page samples can be used for multiple iterative training.
[0095] Generally speaking, after consumers click to generate a target page sample, if the target page sample is not accurate and meets the consumer's expectations, the consumer will not click to purchase. The target page sample that consumers purchase more times is a more accurate target page sample recognized by the consumer.
[0096] Through the above technical solution, the page generation model is trained based on the target page samples whose transaction times are greater than the second preset times and the target screening data samples corresponding to the target page samples. It can be regarded as training the page generation model with the accurate target page samples recognized by consumers and the target screening data samples corresponding to the target page samples. Only then will the trained page generation model learn the potential response relationship between the accurate target screening data samples and the target page samples, and only then will a more accurate target page be output when the page generation model is actually used in the future.
[0097] The following describes an exemplary embodiment of the present disclosure, which is used to explain a solution for quickly outputting an updated page, and includes the following steps:
[0098] (1) The target page and the third page output by the page generation model are used to perform multiple iterative training on the page update model.
[0099] The third page is a page that matches the filtering data and has a user behavior count greater than a preset number. The user behavior count is the number of times the user triggers the page that matches the filtering data, such as the number of times the consumer clicks on the page that matches the filtering data, the number of times the consumer browses the page that matches the filtering data, the number of times the consumer forwards and shares the page that matches the filtering data, etc. The third page can also be regarded as a page with higher popularity that matches the filtering data.
[0100] The target page output by the page generation model can also be considered as a page with relatively low popularity that matches the filtered data.
[0101] One of the multiple iterative trainings includes: using the page update model to process the target page to obtain a second predicted page; and adjusting the network parameters of the page update model according to the loss value between the second predicted page and the third page.
[0102] Optionally, a loss function can be constructed based on the loss value between the second predicted page and the third page, and the loss function can be used to adjust the network parameters of the page update model, where the network parameters include the weights and / or activation functions of the convolutional layer in the page update model.
[0103] When the loss value between the second prediction page and the third page is greater than the preset value, the loss function is used to adjust the network parameters to make the loss value smaller. In each round of training, the network parameters are adjusted to make the loss value between the second prediction page and the third page less than or equal to the preset value.
[0104] For example, the difference between the second predicted page and the third page can be used as the loss value. The greater the difference between the second predicted page and the third page, the greater the loss value. The difference between the second predicted page and the third page is at least reflected in: color difference (for example, the second predicted page is blue, while the third page is green), functional difference (for example, the second predicted page header has a login function, while the third page header does not have a header function), format difference (for example, the middle of the second predicted page is horizontal, while the middle of the third predicted page is vertical), etc.
[0105] (2) The page output by the page generation model in real time is input into the page update model to obtain an updated page.
[0106] After the page update model is trained, a trained page update model can be obtained. After the trained page update model learns the response relationship between the target page with relatively low popularity and the third page with relatively high popularity, the page output by the page generation model in real time is input into the page update model, and an updated page with relatively high popularity can be obtained.
[0107] Through the above technical solution, on the one hand, the page update model can predict the updated page with relatively high popularity based on the target page with relatively low popularity output by the page generation model in real time. Through the linkage between the page generation model and the page update model, the page displayed to consumers that matches the filtered data is more popular and is the page favored by most consumers, thereby better meeting the needs of current consumers; on the other hand, after the page generation model learns the response relationship between the target page and the third page, it can directly output the updated page based on the target page. It does not need to learn the complex response relationship between the filtered data and the updated page again, so that the updated page with higher popularity can be output more quickly.
[0108] The following describes an exemplary embodiment involved in the above step S11, which is used to interpret the process of obtaining a page sample, and includes the following steps:
[0109] (1) For each of the plurality of page components, a first page component that meets the screening data sample is screened out from the plurality of page components under each of the plurality of page components.
[0110] The various page components include the header, middle and tail of the page sample, which correspond to the three components of the page sample respectively. The header is usually the top of the page, the middle is the middle part of the page, and the tail is the bottom of the page.
[0111] The database stores multiple page components included in each page component. For example, the database stores multiple header page components, multiple middle page components and multiple tail page components. The multiple header page components are different, the multiple middle page components are also different, and the multiple tail page components are also different.
[0112] Optionally, the first page component that meets the filtered data sample can be filtered out from the page components at the head; the first page component that meets the filtered data sample can be filtered out from the page components in the middle; and the first page component that meets the filtered data sample can be filtered out from the page components at the tail.
[0113] Each page component has a label that identifies the industry, type, and attributes of the page component. For example, if the industry in a consumer's screening data sample is hospital, the website page is responsive official website, and the attribute is green, then the first page component with the labels "hospital," "responsive official website," and "green" will be filtered out from the head page components; the first page component with the labels "hospital," "responsive official website," and "green" will be filtered out from the middle page components; and the first page component with the labels "hospital," "responsive official website," and "green" will be filtered out from the tail page components.
[0114] (2) Splicing the first page components under the multiple page components to obtain the page sample.
[0115] Optionally, the first page sample that meets the filtered data sample in the head page component, the first page sample that meets the filtered data sample in the middle page component, and the first page sample that meets the filtered data sample in the tail page component can be spliced in order from top to bottom to obtain a page sample.
[0116] For example, assuming that the industry in the consumer's screening data sample is hospital, the website page is responsive official website, and the attribute is green, then the first page component with the labels hospital, responsive official website, and green will be filtered out from the head page component; the first page component with the labels hospital, responsive official website, and green will be filtered out from the middle page component; and the first page component with the labels hospital, responsive official website, and green will be filtered out from the tail page component. Then, the page components with the labels hospital, responsive official website, and green in the head, the page components with the labels hospital, responsive official website, and green in the middle, and the page components with the labels hospital, responsive official website, and green in the tail are spliced in order from top to bottom to obtain the page sample under the screening data sample of hospital, responsive official website, and green. Please refer to Figure 5 and Figure 6 , Figure 5 Shows a partial page sample obtained by splicing the head and the middle part. Figure 5 The two boxes from top to bottom correspond to the head and middle of the page sample respectively. Figure 6 The page sample obtained by splicing the head, middle and tail is shown. Figure 6 The three boxes contained in the upper wire correspond to the head, middle and tail of the page sample respectively.
[0117] Optionally, the first page components under the multiple page components may be spliced together to obtain a basic page; and page code may be added on the basis of the basic page to generate the page sample.
[0118] After combining the first page components of various page components, a basic page is obtained. Modified page code needs to be added to the basic page to generate the final page sample. The modified page code can be font size, page layout, etc.
[0119] The page template can be used to convert the code of each page component in the page component to generate the code of the page component, and then the code of the page component is merged with the added page code to generate the code of the page sample.
[0120] The structure of a page template includes page structure definition, business process functions, and page styles. The page structure definition is used to define whether the page component is horizontal or vertical, etc.; the business process function is used to define the page component's response to user operations, such as defining the header page component to process user input, data interaction, and perform calculations, thereby meeting the user's query, viewing, and other needs on the header page component; the page style is used to define the color, font size, and layout of the page component. Similarly, functions in the middle and tail parts that respond to user operations can also be defined.
[0121] Optionally, after adding page code to the basic page to obtain a final page sample, since the page sample is the page code deployed on the server, the page code also needs to be rendered and then rendered to the client for display.
[0122] The functional functions in the JS function can be used to obtain page samples from the server, process the page samples, render the page samples, and then display them on the client. The rendered page samples include at least page samples of website pages, page samples of mini-programs, and page samples of applications.
[0123] For example, the structure of a page sample includes a page header and page components. The page header is used to introduce JS functions or CSS functions. The JS function is used to control the carousel of the screen in the page component. The CSS function is used to control the rendering and display of the page style in the page component, such as page color, font, size and page layout.
[0124] It is understandable that page samples corresponding to the filtered data samples can be obtained from a preset database, or page samples corresponding to the filtered data samples can be constructed according to the above method, and an automatic construction platform for page samples can be provided to consumers.
[0125] In some scenarios, during the early training of the page generation model, the electronic device can use the filtered data samples input by the consumer to splice the multiple page components corresponding to the filtered data samples to obtain a page sample that matches the filtered data sample, and then display the page sample to the consumer.
[0126] In addition, the filtered data samples and page samples are used as training samples for the page generation model. In this way, after the page generation model is trained, in the subsequent application process of the page generation model, the target page matching the filtered data can be output more quickly and accurately. There is no need to filter out multiple page components matching the filtered data samples, nor is there a need to execute the splicing process of the page components, so that the target page can be output quickly.
[0127] Through the above technical solution, it is possible to obtain the screening data sample input by the consumer, obtain the page component that matches the screening data sample, and splice the multiple page components to obtain the page sample that matches the screening data sample, which realizes the consumer's initial page sample screening needs; subsequently, the screening data sample input by the consumer and the generated page sample will be used as training data for the page generation model to realize the consumer's later page sample screening needs. It can also be understood that the disclosed embodiment first splices the multiple page components that match the screening data sample based on the screening data sample input by the consumer to obtain a page sample, which is the initial solution for displaying the page sample to the consumer; the prediction solution of the page generation model obtained after training with the screening data sample input by the consumer and the page sample is the solution for displaying the target page to the consumer in the later stage, which gradually increases the accuracy of the target page displayed to the consumer and gradually increases the speed.
[0128] The following describes exemplary embodiments of the present disclosure, which are used to illustrate exemplary solutions for reducing the amount of data processing required by developers during the construction of page samples, including the following two scenarios:
[0129] The first scenario includes the following steps:
[0130] (1) When the plurality of page components have the same functional modules, a mapping relationship between the functional modules and the plurality of page components is established.
[0131] Optionally, in the case where the page components of multiple headers have the same functional module, a mapping relationship between the page components of the multiple headers and the functional module is established.
[0132] Optionally, in the case that a plurality of middle page components have the same functional module, a mapping relationship between the plurality of middle page components and the functional module is established.
[0133] Optionally, in the case where multiple tail page components have the same functional module, a mapping relationship is established between the multiple tail page components and the functional module.
[0134] (2) For any second page component among the plurality of page components, based on the mapping relationship, a functional module corresponding to the second page component is obtained, thereby constructing the second page component.
[0135] For example, among 100 header page components, 80 of them have a login module, and the login module is used to log in consumer information. Then, a mapping relationship can be established between these 80 header page components and the code information of the login module. When developers subsequently write the code for these 80 header page components, they can directly reference the code of the login module based on the mapping relationship, without having to repeatedly write the code for the login module, thereby reducing the writing workload of developers.
[0136] The second scenario includes the following steps:
[0137] (1) When multiple applications have the need to access the same function library, a mapping relationship is established between the multiple applications and the code packages that access the function library.
[0138] (2) for any application among the plurality of applications, obtaining a code package corresponding to the application based on the mapping relationship;
[0139] The code package is used to access the function library outside the application, thereby calling the function library to obtain the page sample.
[0140] (3) Running the code package to access the function library to obtain the page sample.
[0141] For example, take an electronic device that has an application installed on it, and the application needs to access a third-party browser web page. The browser web page is an H5 page, and the function library is the jsbridge function library. Assuming that there are 100 applications, 50 of them may need to use the jsbridge function library to access the H5 page. Then, the code packages that access the jsbridge function library can be mapped to the 50 applications respectively. When subsequent developers write the code packages for these 50 applications, they can directly reference the code packages corresponding to the applications based on the mapping relationship, without having to repeatedly write the code packages that access the jsbridge function library, thereby reducing the writing workload of developers.
[0142] Through the above technical solution, in the process of synthesizing page samples, the common code packages commonly used in each page can be merged, so that these code packages only need to be written once and can be reused, without the need for developers to repeatedly write the common code packages, thereby greatly reducing the development workload and improving the development efficiency of obtaining page samples.
[0143] Figure 7 2 is a block diagram of a page generating apparatus according to an exemplary embodiment. The page generating apparatus 700 includes: an acquisition module 710 , a first training module 720 and a first application module 730 .
[0144] The acquisition module 710 is configured to acquire a page sample that meets the screening data sample; the screening data sample includes the industry, product category and attributes indicated by the page sample;
[0145] The first training module 720 is configured to perform multiple iterative training on the page generation model using the screened data sample and the page sample, wherein one of the multiple iterative trainings includes: processing the screened data sample using the page generation model to obtain a first predicted page; and adjusting network parameters of the page generation model based on a loss value between the first predicted page and the page sample.
[0146] The first application module 730 is configured to input the input screening data into the page generation model to obtain a target page.
[0147] Optionally, the first training module 720 includes:
[0148] A first screening submodule is configured to screen out pages to be corrected whose transaction count is less than a first preset transaction count and whose target page generation count is greater than a preset generation count from the target pages generated by the page generation model;
[0149] a correction submodule configured to correct the page to be corrected using a preset first page or a second page matching the screening data to obtain a corrected page;
[0150] The first training submodule is configured to train the page generation model using the screening data and the revised page.
[0151] Optionally, the page generating device 700 includes:
[0152] a second training module configured to perform multiple iterative training on a page update model using a target page and a third page output by the page generation model, wherein one of the multiple iterative trainings comprises: processing the target page using the page update model to obtain a second predicted page; and adjusting network parameters of the page update model based on a loss value between the second predicted page and the third page; the third page being a page that matches the screening data and has a user behavior count greater than a preset number, where the user behavior count is the number of times a user triggers a page that matches the screening data;
[0153] The second application module is configured to input the page output by the page generation model in real time into the page update model to obtain an updated page.
[0154] Optionally, the first training module 720 includes:
[0155] a sample acquisition submodule configured to acquire a target page sample whose transaction number is greater than a second preset transaction number, and a target screening data sample corresponding to the target page sample;
[0156] The iterative submodule is configured to perform multiple iterative training on the page generation model using the target page sample and the target screening data sample.
[0157] Optionally, the page sample includes a page component; the acquisition module 710 includes:
[0158] a second screening submodule configured to screen, for each of a plurality of page components, a first page component that matches the screening data sample from a plurality of page components under each page component; the plurality of page components including a header, a middle, and a tail of the page sample;
[0159] The splicing submodule is configured to splice the first page component under the multiple page components to obtain the page sample.
[0160] Optionally, the page generating device 700 includes:
[0161] A first establishing module is configured to establish a mapping relationship between the functional modules and the plurality of page components when the plurality of page components have the same functional modules;
[0162] The first mapping module is configured to obtain, for any second page component among the multiple page components, a functional module corresponding to the second page component based on the mapping relationship, thereby constructing the second page component.
[0163] Optionally, the page generating device 700 includes:
[0164] A second establishing module is configured to establish a mapping relationship between the plurality of applications and the code packages accessing the function library when the plurality of applications have a need to access the same function library;
[0165] A second mapping module is configured to obtain, for any application among the multiple applications, a code package corresponding to the application based on the mapping relationship;
[0166] The running module is configured to run the code package to access the function library to obtain the page sample.
[0167] Optionally, the splicing submodule includes:
[0168] A basic page splicing submodule is configured to splice the first page components under the multiple page components to obtain a basic page;
[0169] The adding submodule is configured to add page code based on the basic page to generate the page sample.
[0170] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0171] Figure 8 FIG. 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. Figure 8 As shown, the electronic device 800 can be a mobile phone, computer, tablet, treadmill, or other device that can be used to display web pages. The electronic device 800 can include: a processor 801, a memory 802. The electronic device 800 can also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.
[0172] The processor 801 is used to control the overall operation of the electronic device 800 to complete all or part of the steps in the above-mentioned page generation method. The memory 802 is used to store various types of data to support the operation of the electronic device 800. This data may include, for example, instructions for any application or method operating on the electronic device 800, as well as application-related data such as contact information, sent and received messages, images, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent through the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules. The above-mentioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 may include: a Wi-Fi module, a Bluetooth module, an NFC module.
[0173] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned page generation method.
[0174] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the above-described page generation method. For example, the computer-readable storage medium may be the aforementioned memory 802 including the program instructions. The program instructions may be executed by the processor 801 of the electronic device 800 to perform the above-described page generation method.
[0175] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a processor. When the computer program is executed by the processor, the steps of the above-mentioned page generation method are implemented.
[0176] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the scope of protection of the present disclosure.
[0177] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0178] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A page generation method, characterized in that: include: Obtaining a page sample that meets a screening data sample; the screening data sample includes the industry, product category, and attributes indicated by the page sample; Performing multiple iterative training on the page generation model using the screened data sample and the page sample, wherein one of the multiple iterative trainings includes: processing the screened data sample using the page generation model to obtain a first predicted page; adjusting network parameters of the page generation model based on a loss value between the first predicted page and the page sample; Inputting the input screening data into the page generation model to obtain a target page; The step of using the screened data samples and the page samples to perform multiple iterative training on the page generation model includes: From the target pages generated by the page generation model, screen out pages to be corrected whose transaction count is less than a first preset transaction count and whose target page generation count is greater than the preset generation count; correct the pages to be corrected using a preset first page or a second page matching the filtered data to obtain a corrected page; and train the page generation model using the filtered data and the corrected page.
2. The method according to claim 1, characterized in that The method further comprises: A page update model is subjected to multiple iterative training using the target page and a third page output by the page generation model, wherein one of the multiple iterative trainings comprises: processing the target page using the page update model to obtain a second predicted page; adjusting network parameters of the page update model based on a loss value between the second predicted page and the third page; the third page is a page that matches the screening data and has a user behavior count greater than a preset number, where the user behavior count is the number of times a user triggers the page that matches the screening data; The page output by the page generation model in real time is input into the page update model to obtain an updated page.
3. The method according to claim 1, characterized in that The performing multiple iterative training on the page generation model using the screened data samples and the page samples includes: Filtering out target page samples having a transaction number greater than a second preset transaction number from the page samples, and target screening data samples corresponding to the target page samples; The page generation model is trained iteratively multiple times using the target page sample and the target screening data sample.
4. The method according to claim 1, wherein The page sample includes a page component; and obtaining a page sample that meets the screening data sample includes: For each of the plurality of page components, filtering out a first page component that matches the screening data sample from the plurality of page components under the each page component; the plurality of page components include a header, a middle, and a tail of the page sample; The first page components under the multiple page components are spliced together to obtain the page sample.
5. The method according to claim 4, characterized in that The method further comprises: In the case where the plurality of page components have the same functional modules, establishing a mapping relationship between the functional modules and the plurality of page components; For any second page component among the multiple page components, based on the mapping relationship, a functional module corresponding to the second page component is obtained, thereby constructing the second page component.
6. The method according to claim 1, characterized in that The method further comprises: In the case where multiple applications have a need to access the same function library, establishing a mapping relationship between the multiple applications and the code packages that access the function library; For any application program among the multiple application programs, obtaining a code package corresponding to the application program based on the mapping relationship; The code package is run to access the function library to obtain the page sample.
7. The method according to claim 4, characterized in that The step of splicing the first page components under the multiple page components to obtain the page sample includes: splicing the first page components under the multiple page components to obtain a basic page; The page sample is generated by adding page code on the basis of the basic page.
8. A page generating device, characterized in that: include: an acquisition module configured to acquire a page sample that meets the screening data sample; The screening data sample includes the industry, product category and attributes indicated by the page sample; a first training module configured to perform multiple iterative training on a page generation model using the screened data sample and the page sample, wherein one of the multiple iterative trainings comprises: processing the screened data sample using the page generation model to obtain a first predicted page; and adjusting network parameters of the page generation model based on a loss value between the first predicted page and the page sample; A first application module is configured to input the input screening data into the page generation model to obtain a target page; The first training module is further configured to filter out pages to be corrected whose transaction times are less than a first preset transaction times and whose target page generation times are greater than a preset generation times from the target pages generated by the page generation model; correct the pages to be corrected using a preset first page or a second page matching the filtered data to obtain a corrected page; and train the page generation model using the filtered data and the corrected page.
9. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Page configuration method and device, electronic equipment and computer readable medium
CN113158102A
Front-end page generation method and system
CN114089999A