Page display method and display configuration model training method
By using the display configuration model to generate target display configuration, the problem that page adaptation in the prior art is difficult to adapt to complex and diverse usage situations, and better page display effect and user experience are achieved.
Patent Information
- Application Number
- CN202411103860.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2025-02-18
AI Technical Summary
The existing page adaptation technology is limited by the experience of developers and it is difficult to adapt well to complex and diverse usage situations.
By obtaining the page file to be displayed and the corresponding display configuration file, the display configuration model is used to generate the target display configuration based on the device information of the user terminal, and the page rendering data is modified to adapt to the display needs of different devices.
It effectively improves the display effect of the page on different user terminals, reduces the requirements for developer expert experience in front-end page adaptation development, and improves user experience.
Smart Images

Figure CN119473466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of page visualization, and in particular to a page display method and a display configuration model training method. Background Art
[0002] At present, due to the different models of user terminals, the display effects of different user terminals on the same page will be different due to device parameter factors such as display screen size. And due to the large number of user terminal device models, it is difficult to develop a corresponding page for each user terminal model to achieve a better display effect when developing a page.
[0003] Therefore, for pages with specified content, the current common page development method is for developers to develop a reference page file for the specified content, and use page adaptation technology to automatically adjust the display effect of the reference page file on different models of user terminals according to the device parameters of the user terminals. Among them, the more common page adaptation technologies include media queries, responsive images, elastic layouts, and grid layouts. However, these page adaptation technologies are limited by the experience of developers and are difficult to adapt to complex and diverse usage scenarios. Summary of the invention
[0004] The embodiments of the present invention provide a page display method and a display configuration model training method, which are used to solve the problem that the existing page adaptation technology is limited by the experience of developers and is difficult to adapt to complex and diverse usage situations.
[0005] An embodiment of the present invention provides a page display method, which is applied to a first user terminal and includes:
[0006] Acquire a first original page file to be displayed and a display configuration file corresponding to the first original page file;
[0007] Determine the first page original rendering data corresponding to the first original page file; and determine the first target display configuration corresponding to the first user terminal and the first original display configuration according to the display configuration file; the first original display configuration is the display configuration corresponding to the first page original rendering data;
[0008] Modify the first page original rendering data corresponding to the first original page file according to the first target display configuration to obtain first page target rendering data, and render and display the first page target rendering data to obtain a first display page;
[0009] The first target display configuration is information generated by the configuration server using a display configuration model according to the first device information and a first original display configuration corresponding to the first page original rendering data;
[0010] The display configuration model is a machine learning model trained with the second device information of the second user terminal and the second original display configuration corresponding to the second original page file as input and the second target display configuration corresponding to the second original page file as output.
[0011] Optionally, the method further comprises:
[0012] Obtain user evaluation information on the first display page and upload it to the configuration server; so that the configuration server determines the sample weight of the corresponding first training sample according to the evaluation information, and when determining that the first training condition is met, use the sample features of the first training sample as the input of the display configuration model and the sample label of the first training sample as the output of the display configuration model as the goal, perform at least one round of training on the display configuration model according to the sample weights of each first training sample, and use the display configuration model obtained after the training as the updated display configuration model; wherein, the first training sample is a training sample with the first device information and the first original display configuration as sample features and the first target display configuration as sample label.
[0013] Optionally, the display configuration file includes target display configurations corresponding to different device information-original display configuration combinations;
[0014] The determining, according to the display configuration file, a first target display configuration corresponding to the first user terminal specifically includes:
[0015] Searching the display configuration file for a first target display configuration that corresponds to both the first device information and the first original display configuration;
[0016] or,
[0017] The display configuration file includes adjusted display configurations corresponding to different device information-original display configuration combinations;
[0018] The determining, according to the display configuration file, a first target display configuration corresponding to the first user terminal specifically includes:
[0019] A first adjusted display configuration corresponding to the first device information and the first original display configuration is searched in the display configuration file, and the first target display configuration is determined according to the first original display configuration and the first adjusted display configuration.
[0020] Optionally, rendering and displaying the first page target rendering data to obtain a first display page includes:
[0021] Determine whether the target device information in the first device information is within a preset value range, if it is within the preset value range, determine the target display unit to be a physical pixel PX, if it is beyond the preset value range, determine the target display unit to be a logical pixel DIP;
[0022] For any size display configuration in the first page target rendering data, convert the size display configuration into a numerical value expressed in the target display unit;
[0023] Rendering the first page target rendering data based on the converted size display configurations to obtain the first display page;
[0024] The target device information is display screen resolution, display screen size, or display screen pixel density.
[0025] Optionally, the device information includes at least one of the following:
[0026] Device brand, device model, user agent UA, operating system running on the device, rendering engine running on the device, language used by the device, display model, display working principle type, display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, and display brightness range.
[0027] Optionally, the display configuration includes at least one of the following:
[0028] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0029] Based on the same inventive concept, an embodiment of the present invention further provides a method for training a display configuration model, which is applied to a second user terminal and includes:
[0030] Acquire a second original page file to be displayed, determine second page original rendering data according to the second original page file, and render and display the second page original rendering data to obtain an initial second display page;
[0031] In response to a user's adjustment instruction for the second display page, modifying the second page original rendering data according to the adjustment instruction to obtain second page target rendering data, and rendering and displaying the second page target rendering data to obtain an adjusted second display page;
[0032] When it is determined that the second sample collection condition is met, the second device information of the second user terminal and the second target display configuration corresponding to the current second page target rendering data are reported to the configuration server, so that the configuration server trains the display configuration model based on the second device information, the second target display configuration and the second original display configuration corresponding to the second page original rendering data.
[0033] Optionally, rendering and displaying the second page rendering data to obtain a second display page includes:
[0034] Determine whether the target device information in the second device information is within a preset value range, if it is within the preset value range, determine the target display unit to be a physical pixel PX, if it is beyond the preset value range, determine the target display unit to be a logical pixel DIP;
[0035] For any size display configuration in the second page rendering data, convert the size display configuration into a numerical value represented by the target display unit;
[0036] Rendering the second page rendering data based on the converted size display configurations to obtain a second display page;
[0037] Wherein, the second page rendering data includes second page original rendering data and second page target rendering data;
[0038] The target device information is display screen resolution, or display screen size, or display screen pixel density.
[0039] Optionally, the device information includes at least one of the following:
[0040] Device brand, device model, user agent UA, operating system running on the device, rendering engine running on the device, language used by the device, display model, display working principle type, display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, and display brightness range.
[0041] Optionally, the display configuration includes at least one of the following:
[0042] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0043] Based on the same inventive concept, an embodiment of the present invention further provides a page display method, which is applied to a first configuration server and includes:
[0044] Inputting first device information corresponding to a first user terminal and a first original display configuration corresponding to a first original page file into the display configuration model, obtaining a first target display configuration output by the display configuration model, and generating a display configuration file based on the first target display configuration;
[0045] The display configuration file is sent to the first user terminal; so that the first user terminal determines the first page original rendering data corresponding to the first original page file, determines the first target display configuration based on the display configuration file, modifies the first page original rendering data according to the first target display configuration to obtain first page target rendering data, and renders and displays the first page target rendering data to obtain a first display page.
[0046] Optionally, the method specifically includes:
[0047] In response to a display configuration acquisition request from the first user terminal for the first original page file, acquiring the first device information from the display configuration acquisition request, and determining a first original display configuration corresponding to the first original page file;
[0048] Inputting the first device information and the first original display configuration into the display configuration model to obtain a first target display configuration output by the display configuration model;
[0049] generating a display configuration file according to the first target display configuration;
[0050] Sending the display configuration file to the first user terminal;
[0051] or,
[0052] Determine multiple combinations of device information and original display configurations; wherein the device information and / or original display configurations corresponding to any two combinations are different, and there is at least a combination of the first device information and the first original display configuration;
[0053] For any combination, input the device information and the original display configuration corresponding to the combination into the display configuration model to obtain the target display configuration output by the display configuration model;
[0054] Generate a display configuration file according to the target display configuration corresponding to each combination;
[0055] In response to the first user terminal's request for obtaining the display configuration of the first original page file, the display configuration file is sent to the first user terminal.
[0056] Optionally, the device information includes at least one of the following:
[0057] Device brand, device model, user agent UA, operating system running on the device, rendering engine running on the device, language used by the device, display model, display working principle type, display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, and display brightness range.
[0058] Optionally, the display configuration includes at least one of the following:
[0059] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0060] Based on the same inventive concept, an embodiment of the present invention further provides a training method for a display configuration model, which is applied to a second configuration server and includes:
[0061] Acquire second device information and a second target display configuration reported by the second user terminal when the second sample collection condition is met, and determine a second original display configuration corresponding to a second original page file corresponding to the second target display configuration;
[0062] constructing a second training sample using the second device information and the second original display configuration as sample features and the second target display configuration as a sample label;
[0063] When the second training condition is met, the display configuration model is trained for at least one round with the sample features of the second training samples as the input of the display configuration model and the sample labels of the second training samples as the output of the display configuration model, and the display configuration model obtained after the training is used as the updated display configuration model.
[0064] Optionally, the method further comprises:
[0065] receiving evaluation information of the first display page uploaded by the first user terminal, and determining a sample weight of a corresponding first training sample according to the evaluation information; wherein the first training sample is a training sample with the first device information and the first original display configuration as sample features and the first target display configuration as a sample label;
[0066] When it is determined that the first training condition is met, the sample features of the first training samples are used as the input of the display configuration model, and the sample labels of the first training samples are used as the output of the display configuration model. The display configuration model is trained for at least one round according to the sample weights of each first training sample, and the display configuration model obtained after the training is used as the updated display configuration model.
[0067] Optionally, the device information includes at least one of the following:
[0068] Device brand, device model, user agent UA, operating system running on the device, rendering engine running on the device, language used by the device, display model, display working principle type, display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, and display brightness range.
[0069] Optionally, the display configuration includes at least one of the following:
[0070] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0071] The beneficial effects of the present invention are as follows:
[0072] The page display method and display configuration model training method provided by the embodiment of the present invention obtain a display configuration model by using machine learning technology to train the page display configuration corresponding to the page display effect expected by the user, and determine the target display configuration for different user terminals and different page files through the display configuration model, so that the user terminal can adapt and display the page file based on the target display configuration. Thus, the machine learning model is effectively used to learn the correspondence between different user terminals, different page files and the page display effect expected by the user, so that the expert experience requirements of the front-end page developer for the front-end page adaptation development can be reduced, and the display effect of the page on the user terminal is effectively improved, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 One of the structural diagrams of the network system provided by the embodiment of the present invention;
[0074] Figure 2 A second structural diagram of a network system provided by an embodiment of the present invention;
[0075] Figure 3 A flow chart of a display configuration model training method applied to a second user terminal provided in an embodiment of the present invention;
[0076] Figure 4 One of the partial flow charts of the display configuration model training method applied to the second configuration server provided in an embodiment of the present invention;
[0077] Figure 5 One of the partial flow charts of the page display method applied to the first configuration server provided in an embodiment of the present invention;
[0078] Figure 6 A second partial flow chart of a page display method applied to a first configuration server provided in an embodiment of the present invention;
[0079] Figure 7 Partial flow chart 3 of the page display method applied to the first configuration server provided in an embodiment of the present invention;
[0080] Figure 8 A flow chart of a page display method applied to a first user terminal provided by an embodiment of the present invention;
[0081] Fig. 9 A partial flow chart of a page display method applied to a first user terminal provided by an embodiment of the present invention;
[0082] Fig.10 A second partial flow chart of a page display method applied to a second configuration server provided in an embodiment of the present invention;
[0083] Fig.11 One of the structural schematic diagrams of a user terminal provided by an embodiment of the present invention;
[0084] Fig.12 A second structural diagram of a user terminal provided by an embodiment of the present invention;
[0085] Fig.13 One of the structural diagrams of the configuration server provided in the embodiment of the present invention;
[0086] Fig.14 A second structural diagram of a configuration server provided in an embodiment of the present invention;
[0087] Fig.15 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0088] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described below with reference to the accompanying drawings and examples. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to the embodiments described herein; on the contrary, these embodiments are provided to make the present invention more comprehensive and complete, and to fully convey the concepts of the exemplary embodiments to those skilled in the art. The same figure marks in the figures represent the same or similar structures, and thus their repeated descriptions will be omitted. The words expressing position and direction described in the present invention are all explained using the accompanying drawings as examples, but changes can be made as needed, and the changes made are all included in the scope of protection of the present invention. The drawings of the present invention are only used to illustrate the relative position relationship and do not represent the true proportions.
[0089] It should be noted that specific details are described in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in a variety of other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The subsequent description of the specification is a preferred embodiment of the present application, but the description is for the purpose of illustrating the general principles of the present application and is not intended to limit the scope of the present application. The scope of protection of the present application shall be determined by the definition of the attached claims.
[0090] The page display method and display configuration model training method provided by the embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0091] The page display method and display configuration model training method provided by the embodiments of the present invention can be applied to Figure 1 and Figure 2In the network system shown. The network system includes a user terminal C and a server S. In order to facilitate the distinction of related concepts in the following text, the user terminal used to implement the page display method provided in the embodiment of the present invention is referred to as the first user terminal C1, and the user terminal used to implement the display configuration model training method provided in the embodiment of the present invention is referred to as the second user terminal C2. Correspondingly, the original page file displayed by the first user terminal C1 in the content to be mentioned below is referred to as the first original page file, and the page file displayed by the second user terminal C2 is referred to as the second original page file. Of course, the first user terminal C1 and the second user terminal C2 can be two completely different groups of user terminals, or some user terminals can be both the second user terminal C2 and the first user terminal C1. The first original page file and the second original page file can be the same page file, or the first original page file and the second original page file can also be different page files. The server S includes a web page server S1 for providing web page services to the user terminal C, a second configuration server S2-2 for implementing the corresponding steps of the display configuration model training method provided in the embodiment of the present invention, and a first configuration server S2-1 for implementing the corresponding steps of the page display method provided in the embodiment of the present invention. In the specific implementation process, such as Figure 1 As shown, at least some of the web page server S1, the first configuration server S2-1, and the second configuration server S2-2 may be different servers ( Figure 1 , indicating that the three are different servers); or Figure 2 As shown, the web server S1, the first configuration server S2-1, and the second configuration server S2-2 are the same server. The embodiment of the present invention is not limited in detail here.
[0092] First, the training process of the display configuration model involved in the embodiment of the present invention is described.
[0093] In a first aspect, an embodiment of the present invention provides a method for training a display configuration model, which is applied to a second user terminal. Figure 3 As shown, the method specifically includes:
[0094] S110: Acquire a second original page file to be displayed, determine second page original rendering data according to the second original page file, and render and display the second page original rendering data to obtain an initial second display page.
[0095] In a specific implementation process, the second user terminal may obtain the second original page to be displayed from the web server through communication protocols such as Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTPS).
[0096] In the specific implementation process, the original page files (including the second original page file and the first original page file to be mentioned below) may include Hypertext Markup Language (HTML) files, Cascading Style Sheets (CSS) files, Java script (JavaScript, JS) files, etc.
[0097] In step S110, the process of determining the second page original rendering data according to the second original page file and rendering and displaying the second page original rendering data to obtain the initial second display page is consistent with the existing front-end page rendering and display process. In the existing front-end page rendering and display process, the following steps are mainly included in sequence:
[0098] ① Parse the HTML file in the page file to build the Document Object Model (DOM).
[0099] ② Parse the CSS file in the page file to build the Cascading Style Sheets Object Model (CSSOM).
[0100] ③Determine the rendering structure tree (Render Tree) based on DOM and CSSOM.
[0101] ④ Perform layout based on the rendering structure tree and determine the position and size of each element in the display page.
[0102] ⑤Draw each page element according to the layout results.
[0103] ⑥Synthesize the different layers drawn to get the final display page.
[0104] The above process can be specifically implemented by referring to the existing technology, so it will not be described in detail.
[0105] In the embodiment of the present invention, various intermediate data (including but not limited to DOM, CSSOM, rendering structure tree, etc.) generated during the rendering and display process of the front-end page are referred to as rendering data. Accordingly, for the second original page, the rendering data directly generated by the rendering program (including but not limited to the browser of Trident kernel (such as IE browser), the browser of Gecko kernel (such as Firefox browser), the browser of Webkit kernel (such as Safari browser), the browser of Blink kernel (such as Chromium browser)) according to the code of the second original page file is the second original rendering data, and the display configuration contained in the second original rendering data is the second original display configuration.
[0106] Furthermore, the display configuration (including the second original display configuration, and the second target display configuration, the second adjusted display configuration, the first original display configuration, the first target display configuration, the first adjusted display configuration, etc. to be mentioned below) may include at least one of the following:
[0107] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0108] S120. In response to a user's adjustment instruction for the second display page, modify the second page original rendering data according to the adjustment instruction to obtain second page target rendering data, and render and display the second page target rendering data to obtain an adjusted second display page.
[0109] In the specific implementation process, after the user renders and displays the second original page file on the second user terminal to obtain the second display page, the user can trigger the adjustment instruction for the second display page by manipulating the adjustment configuration options of the rendering program or the adjustment function control set on the second display page. For example, the user modifies the sizes corresponding to each page element displayed on the second display page by manipulating the adjustment function control on the second display page, or hides the advertising element on the second display page by manipulating the adjustment configuration options of the rendering program, or modifies the display size and position of the specified element on the second display page by manipulating the adjustment configuration options of the rendering program. After that, the second user terminal modifies the second page original rendering data according to the adjustment instruction triggered by the user manipulating the adjustment configuration options of the rendering program or the adjustment function control set on the second display page to obtain the second page target rendering data, and renders and displays the second page target rendering data to obtain the adjusted second display page.
[0110] As an optional implementation manner, modifying the second page original rendering data according to the adjustment instruction to obtain the second page target rendering data specifically includes:
[0111] The second original page file is modified according to the adjustment instruction to obtain a second target page file, and the second page target rendering data is determined according to the second target page file.
[0112] That is, the second user terminal directly modifies the code of the second original page file (for example, the CSS file, JS file, etc. in the second original page file) to obtain a new second target page file, and then determines the second page target rendering data according to the second target page file through the rendering program, and renders and displays the second page target page rendering data to obtain the adjusted second display page to replace the originally displayed second display page.
[0113] As another optional implementation, modifying the second page original rendering data according to the adjustment instruction to obtain the second page target rendering data specifically includes:
[0114] The second page target rendering data is obtained by modifying the second original display configuration corresponding to the adjustment instruction in the second page original rendering data.
[0115] During the specific implementation process, the second original display configuration contained in the rendering data such as DOM and CSSOM can be modified, so that the second user terminal changes the rendering structure tree corresponding to the second original page file without modifying the second original page file code, and obtains the updated second page target rendering data, and then renders and displays the second page target rendering data through the rendering program to update the second display page.
[0116] In the specific implementation process, the above two implementation modes can be implemented separately or in combination, and the embodiments of the present invention will not make too many limitations here.
[0117] Furthermore, rendering and displaying the second page rendering data (including the second page original rendering data and the second page target rendering data) to obtain a second display page includes:
[0118] The target display unit is determined according to the target device information in the first device information.
[0119] The target device information is display screen resolution, display screen size, or display screen pixel density.
[0120] In a specific implementation process, the target display unit may include at least the following two types:
[0121] Device Pixels (px), Device Independent Pixels (DIP), Root Emphasize (Rem), Viewport.
[0122] Optionally, determining the target display unit according to the target device information in the first device information specifically includes: judging whether the target device information in the second device information is within a preset value range, if it is within the preset value range, determining the target display unit to be px, if it exceeds the preset value range, determining the target display unit to be DIP.
[0123] For any size display configuration in the second page rendering data, the size display configuration is converted into a numerical value represented by the target display unit.
[0124] The second page rendering data is rendered based on the converted size display configurations to obtain a second display page.
[0125] In this way, the display effect of the display page can be further adjusted according to the performance of different display screens to avoid the situation where the content displayed on a display screen that is too small is too large, or the content displayed on a display screen that is too large is too small.
[0126] S130: When it is determined that the second sample collection condition is met, report the second device information of the second user terminal and the second target display configuration corresponding to the current second page target rendering data to the second configuration server.
[0127] During the specific implementation process, the second sample collection condition can be set according to actual needs. For example, the second sample collection condition can be to determine that the user has triggered an adjustment instruction for the second display page, and has not triggered the adjustment instruction for the second display page again within a preset time (for example, 3 minutes); or, the second sample collection condition can be to determine that the user has triggered an adjustment instruction for the second display page, and received an adjustment completion instruction triggered by the user. Furthermore, the second sample collection condition can also include a sample deduplication condition, that is, while meeting the aforementioned conditions, it is also necessary to meet the condition that the combination of the second device information and the second target display configuration has never been reported to the second configuration server. The embodiments of the present invention are not overly limited herein.
[0128] In a specific implementation process, the device information (including the second device information of the second user terminal and the first device information of the first user terminal to be involved below, etc.) includes at least one of the following:
[0129] Device brand, device model, user agent (UA), operating system running on the device (such as Windows, Linux, MacOS, Android, IOS, etc.), rendering engine kernel running on the device, language used by the device, display model, display working principle type (such as liquid crystal display (LCD), organic light-emitting semiconductor (OLED) display, ink screen display, etc.), display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, display brightness range.
[0130] Furthermore, during the process of reporting the second device information and the second target display configuration to the second configuration server, the second user terminal may also report the second original page file and / or the second original display configuration to the second configuration server so that the second configuration server can construct a training sample.
[0131] Afterwards, the second configuration server trains the display configuration model based on the second device information, the second target display configuration and the second original display configuration. The following describes in detail a display configuration model training method provided by an embodiment of the present invention from the perspective of the second configuration server.
[0132] In a second aspect, an embodiment of the present invention provides a method for training a display configuration model, which is applied to a second configuration server. Figure 4 As shown, the method specifically includes:
[0133] S210: Acquire second device information and a second target display configuration reported by a second user terminal when a second sample collection condition is met, and determine a second original display configuration corresponding to a second original page file corresponding to the second target display configuration.
[0134] In a specific implementation process, if the second user terminal does not report the second original display configuration in the process of reporting the second device information and the second target display configuration, the second configuration server may first determine the second original page file corresponding to the second target display configuration, determine the second page original rendering data according to the second original page file, and obtain the corresponding second original display configuration from the second page original rendering data. The second original page file may be obtained through reporting by the second user terminal, or obtained from a web page server that provides the second original page file to the second user terminal.
[0135] S220: Construct a second training sample using the second device information and the second original display configuration as sample features and the second target display configuration as a sample label.
[0136] S230. When the second training condition is met, the display configuration model is trained for at least one round using the sample features of the second training samples as the input of the display configuration model and the sample labels of the second training samples as the output of the display configuration model, and the display configuration model obtained after the training is used as the updated display configuration model.
[0137] In the specific implementation process, the second training condition can be set according to actual needs. For example, the second training condition can be that the number of second training samples constructed by the second configuration server and not used is greater than a preset sample number threshold; or, the second training condition can be that the user of the second configuration server triggers the second training instruction; or, the second training condition can be that a preset training cycle is reached; or it can be other conditions, and the embodiment of the present invention does not make too many restrictions here. The above steps can be a pre-training process of the display configuration model, and can also be further used as an online learning process for re-training the display configuration model after the display configuration model is put into use. The embodiment of the present invention does not make too many restrictions here.
[0138] In the specific implementation process, the specific algorithm of the display configuration model can be set according to actual needs. For example, a combination of one or more of a neural network model, a decision tree model, a random forest model, a support vector machine model, a Bayesian classification model, and a generative adversarial model can be used as the display configuration model, and the present invention does not make too many restrictions here.
[0139] In the pre-training stage of the display configuration model, the second user terminal and the second configuration server implement the training method of the display configuration model described in the first aspect and the second aspect respectively to obtain a trained display configuration model. Afterwards, the same page file can be adaptively adjusted on different user terminals based on the obtained display configuration model to adapt to complex and diverse usage scenarios. The page display method provided by the embodiment of the present invention is specifically described below from the perspective of the user terminal and the perspective of the configuration server.
[0140] In a third aspect, an embodiment of the present invention provides a page display method, which is applied to a first configuration server. Figure 5 As shown, the page display method includes:
[0141] S310: Input first device information corresponding to a first user terminal and a first original display configuration corresponding to a first original page file into a display configuration model to obtain a first target display configuration output by the display configuration model.
[0142] S320: Generate a display configuration file based on the first target display configuration.
[0143] S330: Send the display configuration file to the first user terminal.
[0144] In a specific implementation, the target display configuration may be directly stored in the display configuration file; or, in order to reduce the data volume of the display configuration file, an adjusted display configuration modified from the target display configuration relative to the original display configuration may be determined, and the adjusted display configuration is stored in the display configuration file. The embodiments of the present invention are not limited in detail herein.
[0145] As an optional implementation, the display configuration file only stores the first target display configuration that corresponds to the first user terminal and the first original display configuration, or only stores the first adjusted display configuration that corresponds to the first user terminal and the first original display configuration. Figure 6 As shown, the first configuration server specifically performs the following steps:
[0146] S300A: In response to a display configuration acquisition request for a first original page file from a first user terminal, first device information is acquired from the display configuration acquisition request, and a first original display configuration corresponding to the first original page file is determined.
[0147] S310A: Input first device information and a first original display configuration into the display configuration model to obtain a first target display configuration output by the display configuration model.
[0148] S320A: Generate a display configuration file according to the first target display configuration.
[0149] S330A: Send the display configuration file to the first user terminal.
[0150] Furthermore, if the first configuration server is the same server as the webpage server that provides the first original page file to the first user terminal, the server can directly use the first user terminal's request for obtaining the first original page file as a request for obtaining the display configuration of the first original page file. That is, when the first user terminal requests the server to obtain the first original page file, the server automatically executes the above steps and finally sends the first original page file and the display configuration file corresponding to the first original page file to the first user terminal.
[0151] As another optional implementation, the display configuration file stores target display configurations corresponding to different device information-original display configuration combinations, or stores adjusted display configurations corresponding to different device information-original display configuration combinations. Figure 7 As shown, the first configuration server specifically performs the following steps:
[0152] S300B, determining multiple combinations of device information and original display configuration.
[0153] The corresponding device information and / or original display configurations of any two combinations are different, and there is at least a combination of the first device information and the first original display configuration.
[0154] S310B: For any combination, input the device information and original display configuration corresponding to the combination into the display configuration model to obtain the target display configuration output by the display configuration model.
[0155] S320B, generating a display configuration file according to the target display configuration corresponding to each combination.
[0156] S330B: In response to the first user terminal's request for obtaining the display configuration of the first original page file, send the display configuration file to the first user terminal.
[0157] Furthermore, if the first configuration server is the same server as the webpage server that provides the first original page file to the first user terminal, the server can directly use the first user terminal's request to obtain the first original page file as a request to obtain the display configuration of the first original page file. That is, when the first user terminal requests the server to obtain the first original page file, the server directly sends the first original page file and the display configuration file to the first user terminal.
[0158] Accordingly, in a fourth aspect, an embodiment of the present invention provides a page display method, which is applied to a first user terminal, such as Figure 8 As shown, including:
[0159] S410: Acquire a first original page file to be displayed and a display configuration file corresponding to the first original page file.
[0160] The process of generating the display configuration file and the process of the first user terminal acquiring the display configuration file have been described in detail in the third aspect, and will not be described in detail here.
[0161] In a specific implementation process, the first user terminal may obtain the first original page to be displayed from the web server through a communication protocol such as HTTP or HTTPS.
[0162] Furthermore, if the first configuration server is the same server as the webpage server that provides the first original page file to the first user terminal, the server can directly use the first user terminal's request to obtain the first original page file as a request to obtain the display configuration of the first original page file. That is, when the first user terminal requests the server to obtain the first original page file, the server automatically sends the first original page file and the display configuration file corresponding to the first original page file to the first user terminal.
[0163] S420: Determine first page original rendering data corresponding to the first original page file. The first page original rendering data corresponds to a first original display configuration.
[0164] S430: Determine, according to the display configuration file, a first target display configuration corresponding to the first user terminal and the first original display configuration.
[0165] In a specific implementation process, the first target display configuration may be directly stored in the display configuration file; or, in order to reduce the data volume of the display configuration file, the first configuration server may determine a first adjusted display configuration that is a modification of the first target display configuration relative to the first original display configuration, and store the first adjusted display configuration in the display configuration file, and then the first user terminal determines the corresponding first original display configuration according to the original rendering data of the first page, and determines the first target display configuration according to the first original display configuration and the first adjusted display configuration. The embodiments of the present invention are not limited in detail herein.
[0166] As an optional implementation, the display configuration file only stores the first target display configuration that corresponds to both the first user terminal and the first original display configuration. Alternatively, the display configuration file only stores the first adjusted display configuration that corresponds to both the first user terminal and the first original display configuration.
[0167] As another optional implementation, the display configuration file includes target display configurations corresponding to different device information-original display configuration combinations. Accordingly, the first user terminal needs to search the display configuration file for a first target display configuration corresponding to the first device information and the first original display configuration. Alternatively, the display configuration file includes an adjustment display configuration corresponding to different device information-original display configuration combinations. Accordingly, the first user terminal needs to search the display configuration file for a first adjustment display configuration corresponding to the first device information and the first original display configuration, and determine the first target display configuration based on the first original display configuration and the first adjustment display configuration.
[0168] S440: Modify the original rendering data of the first page according to the first target display configuration to obtain first page target rendering data, and render and display the first page target rendering data to obtain a first display page.
[0169] In a specific implementation process, similar to the content described in the first aspect above, there may be different implementation methods for modifying the original rendering data of the first page according to the first target display configuration to obtain the target rendering data of the first page.
[0170] As an optional implementation manner, modifying the original rendering data of the first page according to the first target display configuration to obtain the target rendering data of the first page specifically includes:
[0171] The first original page file is modified according to the first adjusted display configuration to obtain a first target page file, and the first page target rendering data is determined according to the first target page file.
[0172] That is, the first user terminal directly modifies the code of the first original page file (for example, the CSS file, JS file, etc. in the first original page file) to obtain a new first target page file, and then determines the first page target rendering data according to the first target page file through the rendering program, and renders and displays the first page target page rendering data to obtain the final first display page.
[0173] As another optional implementation, modifying the original rendering data of the first page according to the first target display configuration to obtain the target rendering data of the first page specifically includes:
[0174] The first page target rendering data is obtained by modifying the original display configuration corresponding to the first page original rendering data into the first target display configuration.
[0175] During the specific implementation process, the first original display configuration contained in the DOM, CSSOM and other rendering data can be modified to the first target display configuration according to the first adjustment display configuration, so that the first user terminal changes the rendering structure tree corresponding to the first original page file without modifying the first original page file code, and obtains the updated first page target rendering data, and then renders and displays the first page target rendering data through the rendering program to obtain the final first display page.
[0176] In this way, the training method of the display configuration model and the page display method provided in the embodiment of the present invention obtain the display configuration model by using machine learning technology to train the page display configuration corresponding to the page display effect expected by the user, and determine the target display configuration for different user terminals and different page files through the display configuration model, so that the user terminal adapts the display of the page file based on the target display configuration. In this way, the machine learning model is effectively used to learn the correspondence between different user terminals, different page files and the page display effect expected by the user, so that the expert experience requirements of the front-end page developer for the front-end page adaptation development can be reduced, and the display effect of the page on the user terminal is effectively improved, thereby improving the user experience. For example, a tablet computer of a special model has the same display screen model as other tablet computers of the same size. Users of other tablet computers tend to use it in portrait mode during use, while the shell of the tablet computer of the special model has a special design that makes it difficult for users to hold it in portrait mode, and users of the tablet computer of the special model will only use it in landscape mode when using it. For example, it is difficult to foresee the need for landscape screen adaptation for this special model of tablet computer based on the expert experience of the developers of the front-end page. Through the training method of the display configuration model and the page display method provided in the embodiments of the present invention, the display configuration model can learn through training the implicit rules that this special model of tablet computer needs landscape screen adaptation, thereby effectively improving the user experience.
[0177] Furthermore, if Fig. 9 As shown, in the step S440, rendering and displaying the first page target rendering data to obtain a first display page specifically includes:
[0178] S441. Determine a target display unit according to the target device information in the first device information.
[0179] The target device information is display screen resolution, display screen size, or display screen pixel density.
[0180] Optionally, the step S441, determining the target display unit according to the target device information in the first device information, specifically includes:
[0181] It is determined whether the target device information in the first device information is within a preset value range, if it is within the preset value range, the target display unit is determined to be px, and if it is beyond the preset value range, the target display unit is determined to be DIP.
[0182] S442: For any size display configuration in the first page target rendering data, convert the size display configuration into a numerical value expressed in the target display unit.
[0183] S443: Render the first page target rendering data based on the converted size display configurations to obtain the first display page.
[0184] In this way, the display effect of the display page can be further adjusted according to the performance of different display screens to avoid the situation where the content displayed on a display screen that is too small is too large, or the content displayed on a display screen that is too large is too small.
[0185] Furthermore, in the process of implementing the page display methods described in the third aspect and the fourth aspect in the first configuration server and the first user terminal respectively, the display configuration model can be further adjusted according to the user's feedback on the first display page.
[0186] like Figure 8 As shown, the page display method applied to the first user terminal also includes:
[0187] S450: Obtain user evaluation information on the first display page and upload it to the second configuration server.
[0188] In the specific implementation process, the evaluation information can be obtained through the evaluation control set on the first display page or the feedback option of the rendering program. The evaluation information can be an evaluation score, an evaluation grade, etc.
[0189] Correspondingly, if Fig.10 As shown, the page display method applied to the second configuration server also includes:
[0190] S510: Receive evaluation information on a first display page uploaded by the first user terminal, and determine a sample weight of a corresponding first training sample according to the evaluation information.
[0191] The first training sample is a training sample that uses the first device information and the first original display configuration as sample features and the first target display configuration as a sample label.
[0192] In a specific implementation process, when the user's evaluation of the first display page is better, the sample weight of the first training sample corresponding to the first display page is higher.
[0193] In the specific implementation process, if the first configuration server and the second configuration server are different servers, the second configuration server can obtain the first device information of the first user terminal from the first configuration server, or can obtain the first device information from the first user terminal. If the first configuration server and the second configuration server are different servers, the second configuration server can obtain the first original page file from the web server or the first configuration server or the first user terminal, and determine the first original display configuration according to the first original page file; or, the second configuration server can directly obtain the first original display configuration from the first configuration server or the first user terminal. If the first configuration server and the second configuration server are different servers, the second configuration server can obtain the display configuration file from the first configuration server or the first user terminal to determine the first target display configuration. The process of the second configuration server obtaining the first original page file, the first original display configuration, the display configuration file and other information from the first user terminal can be uploaded by the first user terminal when uploading the evaluation information, or the second configuration server can actively ask the first user terminal to obtain it. The embodiment of the present invention is not too limited here.
[0194] S520. When it is determined that the first training condition is met, the sample features of the first training samples are used as the input of the display configuration model, and the sample labels of the first training samples are used as the output of the display configuration model. The display configuration model is trained for at least one round according to the sample weights of each first training sample, and the display configuration model obtained after the training is used as the updated display configuration model.
[0195] In the specific implementation process, the first training condition can be set according to actual needs. For example, the first training condition can be that the number of first training samples constructed by the second configuration server and not used is greater than a preset sample number threshold; or, the first training condition can be that a user of the second configuration server triggers a first training instruction; or, the first training condition can be that a preset training cycle is reached; or, it can be other conditions, which are not limited in detail in the embodiments of the present invention.
[0196] In the specific implementation process, sample resampling can be used, that is, the number of first training samples can be adjusted by copying and amplifying part of the first training samples and / or deleting and reducing part of the first training samples, so that the ratio of the number of different first training samples after adjustment is equal to the corresponding weight ratio, thereby using the sample weights to train the display configuration model. Alternatively, a weighted loss function (such as a weighted cross entropy loss function, a weighted mean square error loss function, a weighted absolute error loss function, etc.) can be used to evaluate the training effect and adjust the model parameters of the display configuration model, thereby using the sample weights to train the display configuration model. The present invention is not too limited here.
[0197] In this way, the display configuration model can be further adjusted according to user feedback during the use of the display configuration model, so that the target display configuration generated by the display configuration model for different user terminals and original page files is more reasonable, thereby optimizing the display effect of the original page file on the user terminal and improving the user experience.
[0198] In a fifth aspect, based on the same inventive concept, an embodiment of the present invention further provides a user terminal, such as Fig.11 As shown, including:
[0199] The initial rendering and display module M201 is used to obtain a second original page file to be displayed, determine the second page original rendering data according to the second original page file, and render and display the second page original rendering data to obtain an initial second display page;
[0200] The rendering and display adjustment module M202 is used to respond to a user's adjustment instruction for the second display page, modify the second page original rendering data according to the adjustment instruction to obtain second page target rendering data, and render and display the second page target rendering data to obtain an adjusted second display page;
[0201] The second sample collection module M203 is used to report the second device information of the second user terminal and the second target display configuration corresponding to the current second page target rendering data to the second configuration server when it is determined that the second sample collection condition is met, so that the second configuration server can train the display configuration model based on the second device information, the second target display configuration and the second original display configuration corresponding to the second page original rendering data.
[0202] Optionally, the device information includes at least one of the following:
[0203] Device brand, device model, user agent, operating system running on the device, rendering engine running on the device, language used by the device, display model, display working principle type, display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, display brightness range.
[0204] Optionally, the display configuration includes at least one of the following:
[0205] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0206] Optionally, rendering and displaying the second page rendering data to obtain a second display page includes:
[0207] determining a target display unit according to the target device information in the second device information;
[0208] For any size display configuration in the second page rendering data, convert the size display configuration into a numerical value represented by the target display unit;
[0209] Rendering the second page rendering data based on the converted size display configurations to obtain a second display page;
[0210] Wherein, the second page rendering data includes second page original rendering data and second page target rendering data;
[0211] The target device information is display screen resolution, or display screen size, or display screen pixel density.
[0212] In a sixth aspect, based on the same inventive concept, an embodiment of the present invention further provides a user terminal, such as Fig.12 As shown, including:
[0213] An acquisition module M101 is used to acquire a first original page file to be displayed and a display configuration file corresponding to the first original page file;
[0214] The rendering module M102 is used to determine the first page original rendering data corresponding to the first original page file; and determine the first target display configuration corresponding to the first user terminal and the first original display configuration according to the display configuration file; modify the first page original rendering data corresponding to the first original page file according to the first target display configuration to obtain the first page target rendering data, and render and display the first page target rendering data to obtain a first display page; the first original display configuration is the display configuration corresponding to the first page original rendering data;
[0215] The first target display configuration is information generated by the first configuration server using a display configuration model according to the first device information and the first original display configuration corresponding to the first page original rendering data;
[0216] The display configuration model is a machine learning model trained with the second device information of the second user terminal and the second original display configuration corresponding to the second original page file as input and the second target display configuration corresponding to the second original page file as output.
[0217] Optionally, the user terminal further includes:
[0218] The first sample collection module M103 is used to obtain the user's evaluation information on the first display page and upload it to the second configuration server; so that the second configuration server determines the sample weight of the corresponding first training sample according to the evaluation information, and when it is determined that the first training condition is met, the sample features of the first training sample are used as the input of the display configuration model, and the sample labels of the first training samples are used as the output of the display configuration model. The display configuration model is trained for at least one round according to the sample weights of each first training sample, and the display configuration model obtained after the training is used as the updated display configuration model; wherein, the first training sample is a training sample with the first device information and the first original display configuration as sample features, and the first target display configuration as a sample label.
[0219] Optionally, the display configuration file includes target display configurations corresponding to different device information-original display configuration combinations;
[0220] The determining, according to the display configuration file, a first target display configuration corresponding to the first user terminal specifically includes:
[0221] A first target display configuration corresponding to the first device information and the first original display configuration is searched from the display configuration file.
[0222] Optionally, the display configuration file includes adjusted display configurations corresponding to different device information-original display configuration combinations;
[0223] The determining, according to the display configuration file, a first target display configuration corresponding to the first user terminal specifically includes:
[0224] A first adjusted display configuration corresponding to the first device information and the first original display configuration is searched in the display configuration file, and the first target display configuration is determined according to the first original display configuration and the first adjusted display configuration.
[0225] Optionally, rendering and displaying the first page target rendering data to obtain a first display page includes:
[0226] determining a target display unit according to the target device information in the first device information;
[0227] For any size display configuration in the first page target rendering data, convert the size display configuration into a numerical value expressed in the target display unit;
[0228] Rendering the first page target rendering data based on the converted size display configurations to obtain the first display page;
[0229] The target device information is display screen resolution, display screen size, or display screen pixel density.
[0230] Optionally, the device information includes at least one of the following:
[0231] Device brand, device model, user agent, operating system running on the device, rendering engine running on the device, language used by the device, display model, display working principle type, display resolution, display size, display pixel density, display refresh rate, display response time, display color gamut range, display color accuracy, display color depth, display contrast, display brightness range.
[0232] Optionally, the display configuration includes at least one of the following:
[0233] Page layout style template, set of displayed page elements, corresponding sizes of each displayed page element, corresponding positions of each displayed page element, corresponding font types of each displayed character, corresponding colors of each displayed character, corresponding sizes of each displayed character, page border type, page border style, page background type.
[0234] In a seventh aspect, based on the same inventive concept, an embodiment of the present invention further provides a configuration server, such as Fig.13 As shown, including:
[0235] The display configuration determination module M301 is used to input the first device information corresponding to the first user terminal and the first original display configuration corresponding to the first original page file into the display configuration model, obtain the first target display configuration output by the display configuration model, and generate a display configuration file based on the first target display configuration;
[0236] The display configuration sending module M302 is used to send the display configuration file to the first user terminal; so that the first user terminal determines the first page original rendering data corresponding to the first original page file, determines the first target display configuration based on the display configuration file, modifies the first page original rendering data according to the first target display configuration to obtain the first page target rendering data, and renders and displays the first page target rendering data to obtain the first display page.
[0237] Optionally, the display configuration determination module M301 is specifically used to:
[0238] In response to a display configuration acquisition request from the first user terminal for the first original page file, acquiring the first device information from the display configuration acquisition request, and determining a first original display configuration corresponding to the first original page file;
[0239] Inputting the first device information and the first original display configuration into the display configuration model to obtain a first target display configuration output by the display configuration model;
[0240] A display configuration file is generated according to the first target display configuration.
[0241] Optionally, the display configuration determination module M301 is specifically used to:
[0242] Determine multiple combinations of device information and original display configurations; wherein the device information and / or original display configurations corresponding to any two combinations are different, and there is at least a combination of the first device information and the first original display configuration;
[0243] For any combination, input the device information and the original display configuration corresponding to the combination into the display configuration model to obtain the target display configuration output by the display configuration model;
[0244] Generate a display configuration file according to the target display configuration corresponding to each combination;
[0245] The display configuration sending module M302 is specifically used for:
[0246] In response to the first user terminal's request for obtaining the display configuration of the first original page file, the display configuration file is sent to the first user terminal.
[0247] In an eighth aspect, based on the same inventive concept, an embodiment of the present invention further provides a configuration server, such as Fig.14 As shown, including:
[0248] The second training module M401 is used to obtain the second device information and the second target display configuration reported by the second user terminal when the second sample collection condition is met, and determine the second original display configuration corresponding to the second original page file corresponding to the second target display configuration; construct a second training sample with the second device information and the second original display configuration as sample features and the second target display configuration as sample labels; when the second training condition is met, use the sample features of the second training samples as inputs of the display configuration model and the sample labels of the second training samples as outputs of the display configuration model as targets, perform at least one round of training on the display configuration model, and use the display configuration model obtained after the training as an updated display configuration model.
[0249] Optionally, the configuration server further includes:
[0250] The first training module M402 is used to receive the evaluation information of the first display page uploaded by the first user terminal, and determine the sample weight of the corresponding first training sample according to the evaluation information; wherein the first training sample is a training sample with the first device information and the first original display configuration as sample features and the first target display configuration as a sample label;
[0251] When it is determined that the first training condition is met, the sample features of the first training samples are used as the input of the display configuration model, and the sample labels of the first training samples are used as the output of the display configuration model. The display configuration model is trained for at least one round according to the sample weights of each first training sample, and the display configuration model obtained after the training is used as the updated display configuration model.
[0252] It should be understood that the user terminal and configuration server provided in the embodiment of the present invention can be implemented in other ways. For example, the user terminal and configuration server embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional module in the embodiment of the present application can be integrated in a processing module, or each module can exist physically separately, or two or more modules can be integrated in one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0253] Since the specific working principles of the above-mentioned user terminal and configuration server respectively correspond to the page display method and display configuration model training method described in the first to fourth aspects of the above-mentioned text, the specific implementation methods of the above-mentioned user terminal and configuration server can refer to the corresponding contents of the page display method and display configuration model training method described in the first to fourth aspects of the above-mentioned text, and will not be repeated here.
[0254] In the ninth aspect, based on the same inventive concept, Fig.15 As shown, an embodiment of the present invention further provides an electronic device, comprising: a processor 110 and a memory 120 for storing executable instructions of the processor 110; wherein the processor 110 is configured to execute the instructions to implement the front-end program development method applied to the first development end or the second development end as described above.
[0255] In the specific implementation process, the device may have relatively large differences due to different configurations or performances, and may include one or more processors 110, memory 120, and computer-readable storage medium 130. The memory 120 and / or computer-readable storage medium 130 include one or more applications 131 or data 132. The memory 120 and / or computer-readable storage medium 130 may also include one or more operating systems 133, such as Windows, Mac OS, Linux, IOS, Android, Unix, FreeBSD, etc. Among them, the memory 120 and the computer-readable storage medium 130 may be short-term storage or persistent storage. The application 131 may include one or more modules ( Fig.15 ), each module may include a series of instruction operations. Further, the processor 110 may be configured to communicate with the computer-readable storage medium 130, and execute a series of instruction operations in the computer-readable storage medium 130 on the device. The device may also include one or more power supplies ( Fig.15 one or more network interfaces 140, the network interface 140 including a wired network interface 141 and / or a wireless network interface 142; one or more input / output interfaces 143.
[0256] In the tenth aspect, based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program code. When the computer program code runs on a computer, the computer implements at least one of the methods described in the first to fourth aspects above.
[0257] The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a configuration server, data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a high-density digital video disc (DVD), a video compact disc (VCD)), or a semiconductor medium (such as a solid-state disk (SSD)).
[0258] Since the principle of solving the problem by the above-mentioned computer-readable storage medium corresponds to the methods described in the first to fourth aspects above, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the corresponding method, and the repeated parts will not be repeated.
[0259] In the eleventh aspect, based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: a computer program code, when the computer program code runs on a computer, the computer implements at least one of the methods described in the first to fourth aspects above.
[0260] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a configuration server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, configuration server, or data center.
[0261] Since the principle of solving the problem by the above-mentioned computer program product corresponds to the methods described in the first to fourth aspects above, the implementation of the above-mentioned computer program product can refer to the implementation of the corresponding method, and the repeated parts will not be repeated.
[0262] The display configuration model training method and page display method provided in the embodiment of the present invention use machine learning technology to train the display configuration corresponding to the page display effect expected by the user to obtain the display configuration model, and determine the target display configuration for different user terminals and different page files through the display configuration model, so that the user terminal can adapt the display of the page file based on the target display configuration. Thus, the machine learning model is effectively used to learn the correspondence between different user terminals, different page files and the page display effect expected by the user, so that the expert experience requirements of the front-end page developer for the front-end page adaptation development can be reduced, and the display effect of the page on the user terminal is effectively improved, thereby improving the user experience.
[0263] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0264] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0265] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0266] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0267] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A page display method, characterized in that: Applied to a first user terminal, comprising: Acquire a first original page file to be displayed and a display configuration file corresponding to the first original page file; Determine the first page original rendering data corresponding to the first original page file; and determine the first target display configuration corresponding to the first user terminal and the first original display configuration according to the display configuration file; the first original display configuration is the display configuration corresponding to the first page original rendering data; Modify the first page original rendering data corresponding to the first original page file according to the first target display configuration to obtain first page target rendering data, and render and display the first page target rendering data to obtain a first display page; The first target display configuration is information generated by the configuration server using a display configuration model according to the first device information and a first original display configuration corresponding to the first page original rendering data; The display configuration model is a machine learning model trained with the second device information of the second user terminal and the second original display configuration corresponding to the second original page file as input and the second target display configuration corresponding to the second original page file as output.
2. The method according to claim 1, characterized in that The method further comprises: Obtain user evaluation information on the first display page and upload it to the configuration server; so that the configuration server determines the sample weight of the corresponding first training sample according to the evaluation information, and when determining that the first training condition is met, use the sample features of the first training sample as the input of the display configuration model and the sample label of the first training sample as the output of the display configuration model as the goal, perform at least one round of training on the display configuration model according to the sample weights of each first training sample, and use the display configuration model obtained after the training as the updated display configuration model; wherein, the first training sample is a training sample with the first device information and the first original display configuration as sample features and the first target display configuration as sample label.
3. The method according to claim 1, characterized in that The display configuration file includes target display configurations corresponding to different device information-original display configuration combinations; The determining, according to the display configuration file, a first target display configuration corresponding to the first user terminal specifically includes: Searching the display configuration file for a first target display configuration that corresponds to both the first device information and the first original display configuration; or, The display configuration file includes adjusted display configurations corresponding to different device information-original display configuration combinations; The determining, according to the display configuration file, a first target display configuration corresponding to the first user terminal specifically includes: A first adjusted display configuration corresponding to the first device information and the first original display configuration is searched in the display configuration file, and the first target display configuration is determined according to the first original display configuration and the first adjusted display configuration.
4. The method according to claim 1, characterized in that The step of rendering and displaying the first page target rendering data to obtain a first display page includes: Determine whether the target device information in the first device information is within a preset value range, if it is within the preset value range, determine the target display unit to be a physical pixel PX, if it is beyond the preset value range, determine the target display unit to be a logical pixel DIP; For any size display configuration in the first page target rendering data, convert the size display configuration into a numerical value expressed in the target display unit; Rendering the first page target rendering data based on the converted size display configurations to obtain the first display page; The target device information is display screen resolution, display screen size, or display screen pixel density.
5. A method for training a display configuration model, characterized in that: Applied to a second user terminal, comprising: Acquire a second original page file to be displayed, determine second page original rendering data according to the second original page file, and render and display the second page original rendering data to obtain an initial second display page; In response to a user's adjustment instruction for the second display page, modifying the second page original rendering data according to the adjustment instruction to obtain second page target rendering data, and rendering and displaying the second page target rendering data to obtain an adjusted second display page; When it is determined that the second sample collection condition is met, the second device information of the second user terminal and the second target display configuration corresponding to the current second page target rendering data are reported to the configuration server, so that the configuration server trains the display configuration model based on the second device information, the second target display configuration and the second original display configuration corresponding to the second page original rendering data.
6. The method according to claim 5, characterized in that Rendering and displaying the second page rendering data to obtain a second display page includes: Determine whether the target device information in the second device information is within a preset value range, if it is within the preset value range, determine the target display unit to be a physical pixel PX, if it is beyond the preset value range, determine the target display unit to be a logical pixel DIP; For any size display configuration in the second page rendering data, convert the size display configuration into a numerical value represented by the target display unit; Rendering the second page rendering data based on the converted size display configurations to obtain a second display page; Wherein, the second page rendering data includes second page original rendering data and second page target rendering data; The target device information is display screen resolution, or display screen size, or display screen pixel density.
7. A page display method, characterized in that: Applicable to the configuration server, including: Inputting first device information corresponding to a first user terminal and a first original display configuration corresponding to a first original page file into the display configuration model, obtaining a first target display configuration output by the display configuration model, and generating a display configuration file based on the first target display configuration; The display configuration file is sent to the first user terminal; so that the first user terminal determines the first page original rendering data corresponding to the first original page file, determines the first target display configuration based on the display configuration file, modifies the first page original rendering data according to the first target display configuration to obtain first page target rendering data, and renders and displays the first page target rendering data to obtain a first display page.
8. The method according to claim 7, characterized in that Before inputting the first device information corresponding to the first user terminal into the display configuration model, the method further includes: Acquire second device information and a second target display configuration reported by the second user terminal when the second sample collection condition is met, and determine a second original display configuration corresponding to a second original page file corresponding to the second target display configuration; constructing a second training sample using the second device information and the second original display configuration as sample features and the second target display configuration as a sample label; When the second training condition is met, the display configuration model is trained for at least one round with the sample features of the second training samples as the input of the display configuration model and the sample labels of the second training samples as the output of the display configuration model, and the display configuration model obtained after the training is used as the updated display configuration model.
9. The method according to claim 7, characterized in that The method further comprises: receiving evaluation information of the first display page uploaded by the first user terminal, and determining a sample weight of a corresponding first training sample according to the evaluation information; wherein the first training sample is a training sample with the first device information and the first original display configuration as sample features and the first target display configuration as a sample label; When it is determined that the first training condition is met, the sample features of the first training samples are used as the input of the display configuration model, and the sample labels of the first training samples are used as the output of the display configuration model. The display configuration model is trained for at least one round according to the sample weights of each first training sample, and the display configuration model obtained after the training is used as the updated display configuration model.
10. The method according to claim 7, characterized in that The method specifically comprises: In response to a display configuration acquisition request from the first user terminal for the first original page file, acquiring the first device information from the display configuration acquisition request, and determining a first original display configuration corresponding to the first original page file; Inputting the first device information and the first original display configuration into the display configuration model to obtain a first target display configuration output by the display configuration model; generating a display configuration file according to the first target display configuration; Sending the display configuration file to the first user terminal; or, Determine multiple combinations of device information and original display configurations; wherein the device information and / or original display configurations corresponding to any two combinations are different, and there is at least a combination of the first device information and the first original display configuration; For any combination, input the device information and the original display configuration corresponding to the combination into the display configuration model to obtain the target display configuration output by the display configuration model; Generate a display configuration file according to the target display configuration corresponding to each combination; In response to the first user terminal's request for obtaining the display configuration of the first original page file, the display configuration file is sent to the first user terminal.