Dynamic content generation and multi-terminal adaptation method based on HTML5

By acquiring real-time resources and requirements, generating components and optimizing loading paths, combining terminal calibration and compensation value adjustment, the problem of insufficient compatibility and dynamic adaptability of the existing technology is solved, and more efficient web page adaptability and user experience is achieved.

CN119829856AInactive Publication Date: 2025-04-15WENZHOU POLYTECHNIC
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510308149.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-04-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing HTML5-based web page generation method has problems of insufficient cross-platform compatibility and dynamic adaptability, resulting in differences in the layout and display effects of web pages on different terminals, increasing development costs and time, and it is difficult to quickly respond to changes in user needs.

Method used

By obtaining real-time resources and real-time requirements, multiple components are generated, and page loading paths are determined based on components and real-time resources, optimizing the loading method and order of web pages. Calibrate the web page of the target terminal, obtain the web page compensation value of other terminals, and adjust the web page calibration value of each terminal to improve the adaptability and compatibility of the web page on different terminals.

Benefits of technology

It improves the adaptability and compatibility of web pages on different terminals, optimizes page loading speed and layout, improves users' web browsing experience, simplifies the web development and maintenance process, and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829856A_ABST
    Figure CN119829856A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of HTML5, and particularly relates to a dynamic content generation and multi-terminal adaptation method based on HTML5, and the method comprises the steps: obtaining real-time resources and real-time demands; generating a plurality of components according to the real-time resources and the real-time demands; determining a page loading path according to each component and the real-time resource, and obtaining a webpage of a target terminal; calibrating the webpage of the target terminal to obtain a webpage calibration value of the target terminal; obtaining webpage compensation values of a plurality of other terminals; determining webpage calibration values of the other terminals according to the webpage calibration value of the target terminal and the webpage compensation values of the other terminals; and sending the webpage calibration value of the target terminal, the webpage calibration values of the other terminals and the webpage of the target terminal to a server. Therefore, the dynamic content generation and multi-terminal adaptation method based on HTML5 provided by the embodiment of the invention can improve the problem of insufficient cross-platform compatibility and dynamic adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of HTML5, and in particular to a method for dynamic content generation and multi-terminal adaptation based on HTML5. Background Art

[0002] HTML5 is the fifth version of HTML (Hypertext Markup Language). It is not only a new generation of web page markup language standard, but also a powerful technology collection. HTML5 has a wide range of applications, including the creation of responsive web pages, the development of HTML5 mobile applications, etc. Its rich features and wide application fields enable developers to create richer and more interactive web applications and web pages.

[0003] In the prior art, different terminals have different screen sizes, resolutions, and display characteristics, resulting in differences in the layout and display effects of web pages on these terminals. This requires developers to perform special adaptation and optimization for different terminals, increasing development costs and time. At the same time, with the constant changes in user needs and the real-time updating of web page content, traditional static web pages are difficult to respond quickly to these changes. Due to unreasonable factors such as resource loading methods and component loading order, problems such as slow web page loading and page freezes may occur. In addition, performance differences between different terminals also exacerbate the complexity of this problem. Therefore, the current method of generating web pages based on HTML5 has the problem of insufficient cross-platform compatibility and dynamic adaptability. Summary of the invention

[0004] The embodiment of the present application provides a method for dynamic content generation and multi-terminal adaptation based on HTML5, which can improve the problems of insufficient cross-platform compatibility and dynamic adaptability.

[0005] In a first aspect, an embodiment of the present application provides a method for dynamic content generation and multi-terminal adaptation based on HTML5, which is applied to an electronic device, wherein the electronic device is communicatively connected to a server, and the method includes: Acquire real-time resources and real-time requirements; wherein, the real-time resources refer to resources that need to be dynamically acquired or updated by HTML5-based web pages, and the real-time requirements refer to the functions and display requirements that need to be met by HTML5-based web pages; Generate multiple components according to the real-time resources and the real-time requirements; wherein the components are basic units for constructing web pages; Determine a page loading path according to each of the components and the real-time resource, and obtain a web page of the target terminal; wherein the page loading path is used to reflect the loading method and order of each of the components; Calibrate the web page of the target terminal to obtain a web page calibration value of the target terminal; wherein the web page calibration value is a parameter obtained after the web page of the terminal is calibrated; Acquire webpage compensation values ​​of respective multiple other terminals; wherein the webpage compensation values ​​are used to reflect the difference between the target terminal and the other terminals when displaying webpages; Determine a webpage calibration value of each of the other terminals according to the webpage calibration value of the target terminal and each webpage compensation value of each of the other terminals; The webpage calibration value of the target terminal, the webpage calibration values ​​of each of the other terminals, and the webpage of the target terminal are sent to the server.

[0006] The above technical solutions in the embodiments of the present application have at least the following technical effects: The method for dynamic content generation and multi-terminal adaptation based on HTML5 provided in the embodiment of the present application obtains real-time resources and real-time requirements; generates multiple components according to the real-time resources and the real-time requirements; determines the page loading path according to each of the components and the real-time resources, and obtains the web page of the target terminal; calibrates the web page of the target terminal to obtain the web page calibration value of the target terminal; obtains the web page compensation values ​​of multiple other terminals respectively; determines the web page calibration value of each of the other terminals according to the web page calibration value of the target terminal and the web page compensation value of each of the other terminals; sends the web page calibration value of the target terminal, the web page calibration value of each other terminal and the web page of the target terminal to the server. By obtaining real-time resources, generating components, optimizing loading paths, and performing terminal calibration and compensation, it is beneficial to improve the adaptability and compatibility of web pages on different terminals; by optimizing page loading speed and layout, and improving the performance of web pages on different terminals, it is beneficial to improve the user's web browsing experience; through modular components and automated calibration processes, it is beneficial to simplify the development and maintenance process of web pages, reduce development costs and improve development efficiency.

[0007] In a possible implementation manner of the first aspect, generating multiple components according to the real-time resources and the real-time requirements includes: Create a corresponding HTML template according to the real-time requirements; Obtain dynamic data according to the real-time resources; Each of the components is generated according to the HTML template and dynamic data.

[0008] In a possible implementation manner of the first aspect, determining a page loading path according to each of the components and the real-time resource, and obtaining a web page of a target terminal includes: Determining component dependencies according to the components and the real-time resources; wherein the component dependencies are used to reflect the order in which the components are loaded; Determine the page loading path according to the component dependency relationship; According to the page loading path, each of the components is rendered and assembled to obtain a web page.

[0009] In a possible implementation manner of the first aspect, calibrating the webpage of the target terminal to obtain a webpage calibration value of the target terminal includes: Acquire terminal data of the target terminal; wherein the terminal data includes screen size, resolution, browser type and version; A webpage calibration value of the target terminal is obtained according to the terminal data and the webpage.

[0010] In a possible implementation manner of the first aspect, obtaining webpage compensation values ​​of the multiple other terminals includes: The webpage compensation value of each of the other terminals is obtained from a calibration database; wherein the calibration database stores the webpage compensation value of each of the other terminals.

[0011] In a possible implementation manner of the first aspect, the method further includes: Testing a plurality of test web pages on the target terminal and each of the other terminals to obtain display errors of each of the test web pages of the target terminal and each of the other terminals, and determining a mean value of the display errors of the target terminal and each of the other terminals; Taking the display error mean of the target terminal as a reference, determining the webpage compensation value of each of the other terminals according to the display error mean of each of the other terminals; The webpage compensation value of each of the other terminals is stored in the calibration database.

[0012] In a possible implementation manner of the first aspect, before acquiring the webpage compensation value of each of the other terminals from the calibration database, the method further includes: Performing sampling tests on all the other terminals to obtain web page data of the multiple sampled terminals; the web page data is used to reflect the display effect of the web page; When the webpage data of the sampling terminal does not meet the standard range, modifying the webpage compensation value of the sampling terminal stored in the calibration database according to the difference between the webpage data of the sampling terminal and the standard range to obtain modified compensation data; Performing a web page calibration test on each of the other terminals according to the compensation data to obtain web page data of each of the other terminals; When the webpage data of any of the other terminals does not meet the standard range, the webpage compensation values ​​of the other terminals in the calibration database that do not meet the standard range continue to be modified until the webpage data of all other terminals meet the standard range.

[0013] In a possible implementation manner of the first aspect, the performing a sampling test on all the other terminals to obtain webpage data of the plurality of sampled terminals includes: During the sampling test, the web page of the target terminal is recalibrated to obtain a sampling calibration value of the target terminal; Determining a sampling calibration value of the sampling terminal according to the sampling calibration value of the target terminal and the webpage compensation value of the sampling terminal; According to the sampling calibration value of the sampling terminal, a web page calibration test is performed on the sampling terminal to obtain the web page data of the sampling terminal.

[0014] In a possible implementation manner of the first aspect, after performing a webpage calibration test on each of the other terminals according to the compensation data to obtain webpage data of each of the other terminals, the method further includes: When the web page data of the sampling terminal meets the standard range, the corresponding web page compensation value stored in the calibration database is retained.

[0015] In a possible implementation manner of the first aspect, determining the webpage calibration value of each of the other terminals according to the webpage calibration value of the target terminal and each webpage compensation value of each of the other terminals includes: When the webpage compensation value indicates a difference between the display error mean values ​​of the corresponding other terminals and the target terminal, adding the webpage calibration value of the target terminal to the webpage compensation value of each of the other terminals to obtain the corresponding webpage calibration value of the other terminals; When the webpage compensation value indicates the difference between the display error mean values ​​of the target terminal and the corresponding other terminals, the webpage compensation value of each of the other terminals is subtracted from the webpage calibration value of the target terminal to obtain the corresponding webpage calibration value of the other terminals.

[0016] In a second aspect, an embodiment of the present application provides a dynamic content generation and multi-terminal adaptation device based on HTML5, which is applied to an electronic device, wherein the electronic device is communicatively connected to a server, and the device includes: An acquisition module, used to acquire real-time resources and real-time requirements; wherein the real-time resources refer to resources that need to be dynamically acquired or updated by HTML5-based web pages, and the real-time requirements refer to the functions and display requirements that need to be met by HTML5-based web pages; A component module, used to generate multiple components according to the real-time resources and the real-time requirements; wherein the components are basic units for constructing web pages; A web page module, used to determine a page loading path according to each of the components and the real-time resources, and obtain a web page; wherein the page loading path is used to reflect the loading method and order of each of the components; A first webpage calibration module, used to calibrate the webpage of the target terminal to obtain a webpage calibration value of the target terminal; wherein the webpage calibration value is a parameter obtained after the webpage of the terminal is calibrated; A webpage compensation value module, used to obtain webpage compensation values ​​of each of a plurality of other terminals; wherein the webpage compensation values ​​are used to reflect the difference between the target terminal and the other terminals when displaying webpages; A second webpage calibration module, configured to determine a webpage calibration value of each of the other terminals according to the webpage calibration value of the target terminal and each webpage compensation value of each of the other terminals; The calibration module is used to send the webpage calibration value of the target terminal, the webpage calibration values ​​of each of the other terminals, and the webpage of the target terminal to the server.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method as described in any one of the above-mentioned first aspects when executing the computer program.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspects above is implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the methods described in the first aspect.

[0020] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 It is a flowchart of a method for dynamic content generation and multi-terminal adaptation based on HTML5 provided in one embodiment of the present application; Figure 2 It is a schematic diagram of the implementation flow of steps S200, S300, S400, S500 and S600 in the method for dynamic content generation and multi-terminal adaptation based on HTML5 provided in one embodiment of the present application; Figure 3 It is a schematic diagram of the implementation flow of steps S510, S511 and S513 in the method for dynamic content generation and multi-terminal adaptation based on HTML5 provided in an embodiment of the present application; Figure 4 It is a structural diagram of a dynamic content generation and multi-terminal adaptation device based on HTML5 provided in an embodiment of the present application; Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0024] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0025] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0027] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0028] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0029] In the related art, different terminals have different screen sizes, resolutions and display characteristics, resulting in differences in the layout and display effects of web pages on these terminals. This requires developers to perform special adaptation and optimization for different terminals, which increases development costs and time. At the same time, with the continuous changes in user needs and the real-time updating of web page content, traditional static web pages are difficult to respond to these changes quickly. Due to unreasonable factors such as resource loading methods and component loading order, problems such as slow web page loading and page freezes may occur. In addition, performance differences between different terminals also exacerbate the complexity of this problem. Therefore, the current method of generating web pages based on HTML5 has the problem of insufficient cross-platform compatibility and dynamic adaptability.

[0030] To solve the above problems, the embodiment of the present application provides a method for dynamic content generation and multi-terminal adaptation based on HTML5. In the method, by acquiring real-time resources and real-time needs; generating multiple components according to the real-time resources and the real-time needs; determining the page loading path according to each of the components and the real-time resources, and obtaining the web page of the target terminal; calibrating the web page of the target terminal to obtain the web page calibration value of the target terminal; obtaining the web page compensation values ​​of multiple other terminals; determining the web page calibration value of each of the other terminals according to the web page calibration value of the target terminal and the web page compensation value of each of the other terminals; sending each web page calibration value and the web page to the user terminal. By acquiring real-time resources, generating components, optimizing loading paths, and performing terminal calibration and compensation, it is beneficial to improve the adaptability and compatibility of web pages on different terminals; by optimizing page loading speed and layout, and improving the performance of web pages on different terminals, it is beneficial to improve the user's web browsing experience; through modular components and automated calibration processes, it is beneficial to simplify the development and maintenance process of web pages, reduce development costs and improve development efficiency.

[0031] The HTML5-based dynamic content generation and multi-terminal adaptation method provided in the embodiment of the present application can be applied to an electronic device. The electronic device is communicatively connected to a server, and the server is communicatively connected to a target terminal and other terminals. At this time, the electronic device is the executor of the HTML5-based dynamic content generation and multi-terminal adaptation method provided in the embodiment of the present application. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device.

[0032] For example, the electronic device can be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a mobile phone, a tablet computer, a wearable device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a desktop computer, a smart screen, a smart TV, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, etc., but not limited to these.

[0033] In order to better understand the dynamic content generation and multi-terminal adaptation method based on HTML5 provided in the embodiment of the present application, the specific implementation process of the dynamic content generation and multi-terminal adaptation method based on HTML5 provided in the embodiment of the present application is exemplarily introduced below.

[0034] Figure 1 A schematic flow chart of a method for dynamic content generation and multi-terminal adaptation based on HTML5 provided in an embodiment of the present application is shown. The method for dynamic content generation and multi-terminal adaptation based on HTML5 includes: S100, obtaining real-time resources and real-time requirements, wherein real-time resources refer to resources that need to be dynamically obtained or updated by HTML5-based web pages, and real-time requirements refer to functional and display requirements that need to be met by HTML5-based web pages.

[0035] For example, the real-time resources required by the web page, such as the latest news data, user personal information, real-time stock prices, etc., can be obtained from the server or data source in real time through technical means such as API interfaces or WebSockets. Among them, the real-time resources can be based on the HTML5 standard, or in JSON, XML or plain text format. At the same time, the functional requirements (such as form submission, dynamic chart display) and display requirements (such as responsive design, animation effects) of the web page should be clarified.

[0036] S200, generating multiple components according to real-time resources and real-time requirements, wherein a component is a basic unit for constructing a web page.

[0037] For example, the components of a web page can be generated using a front-end framework (such as React, Vue or Angular) based on real-time resources and real-time needs. Each component is responsible for implementing a specific function of the web page or displaying a specific data fragment, which can be a button, form, chart or list.

[0038] In one possible implementation, see Figure 2 ,S200,generates multiple components according to real-time resources and real-time requirements, including: S210, creating a corresponding HTML template according to real-time requirements.

[0039] For example, you can create an HTML template based on real-time needs to specify the basic structure and layout of the page, as well as the placeholders for each component. For example, for a product details page on an e-commerce website, create a element to contain product images, using <h1>Tag to display the product title, use Tags are used to display product descriptions, etc. to get the corresponding HTML template.

[0040] S220, obtaining dynamic data according to real-time resources.

[0041] Exemplarily, dynamic data may be obtained from a backend server or an API, for example, by sending an HTTP request to the backend server and parsing the returned data in JSON or XML format to obtain the dynamic data.

[0042] S230, generating each component according to the HTML template and dynamic data.

[0043] Exemplarily, each component can be generated according to an HTML template and dynamic data, for example, dynamic data can be obtained from a backend server, DOM elements can be manipulated using JavaScript, or data binding techniques (such as v-bind of Vue or props of React) can be used to update placeholders in the HTML template.

[0044] Through the above steps S210 to S230, the complete process from requirements to templates, from resources to data, and from templates and data to components can quickly generate various components of the web page that meet the requirements according to different real-time requirements and resources. Through automation and modular design, it is beneficial to improve development efficiency and reduce development costs and maintenance costs.

[0045] S300, determine the page loading path according to each component and the real-time resource, and obtain the web page of the target terminal. The page loading path is used to reflect the loading method and order of each component.

[0046] Exemplarily, the page loading path can be determined according to each component and real-time resource, and the loading mode (synchronous or asynchronous) and order of each component can be determined according to the page loading path to obtain the web page of the target terminal (such as mobile phone, tablet computer, desktop computer, etc.). For example, for a stock market web page, the stock list component needs to be loaded first, and the trend chart component and the filter component are asynchronously loaded according to user interaction (such as scrolling to the bottom of the page or clicking the filter button) to obtain the stock market web page of the desktop computer.

[0047] In one possible implementation, see Figure 2 , S300, determine the page loading path according to each component and real-time resource, and obtain the web page, including: S310, determining component dependency relationships according to the components and real-time resources, wherein the component dependency relationships are used to reflect the order in which the components are loaded.

[0048] Exemplarily, the data dependency relationship between the components can be determined based on the components and the real-time resources, and the order of loading the components can be determined based on the data dependency relationship between the components. For example, in a web page containing four main components, namely, the header navigation, the sidebar, the main content area, and the footer, the sidebar needs to display related sidebar links according to the category of the main content area, and the component dependency relationship is that the sidebar depends on the main task area.

[0049] S320, determining a page loading path according to component dependencies.

[0050] It can be understood that the page loading path is the order in which the components are loaded.

[0051] Exemplarily, the page loading path can be determined according to the component dependency relationship. For example, in a web page including four main components, namely, the header navigation, the sidebar, the main content area and the footer, the component dependency relationship is that the sidebar depends on the main task area, then the page loading path can be to load the header navigation first, then the main content area, then the sidebar, and finally the footer.

[0052] S330, rendering and assembling each component according to the page loading path to obtain a web page.

[0053] Exemplarily, a front-end framework or library (such as React, Vue, Angular, etc.) can be used to render each component into the DOM in the correct order and manner to obtain a web page.

[0054] Through the above steps S310 to S330, the complete process from component dependency to page loading path, and then to component rendering and assembly is realized. According to different components and real-time resources, web pages that meet the requirements can be quickly generated, which is conducive to improving development efficiency, reducing costs, enhancing user experience and meeting market demand.

[0055] S400, calibrating the web page of the target terminal to obtain a web page calibration value of the target terminal, wherein the web page calibration value is a parameter obtained after the web page of the terminal is calibrated.

[0056] It can be understood that the web page calibration value includes the layout margins, font size and image size of the web page.

[0057] Exemplarily, the web page on the target terminal (such as a mobile phone, tablet computer, desktop computer, etc.) can be calibrated to obtain the web page calibration value of the target terminal. For example, the web page calibration value of the target terminal is: layout margins: top margin 10px, bottom margin 20px, left margin 15px, right margin 25px; font size: text 16px, title 24px; image size: width 300px, height 200px.

[0058] In one possible implementation, see Figure 2 , S400, calibrating the web page of the target terminal to obtain the web page calibration value of the target terminal, including: S410, obtaining terminal data of the target terminal, wherein the terminal data includes screen size, resolution, browser type and version.

[0059] Exemplarily, the terminal data of the target terminal can be obtained using the window object and navigator object in JavaScript, wherein the window.innerWidth and window.innerHeight properties can provide screen size information, the window.devicePixelRatio property can provide screen resolution information, and the navigator.userAgent string can provide browser type and version information.

[0060] S420, obtaining a webpage calibration value of the target terminal according to the terminal data and the webpage.

[0061] For example, CSS media queries and JavaScript can be used to adjust the style and layout of the web page according to the terminal data to obtain the web page calibration value of the target terminal. Among them, media queries apply different CSS styles according to different screen sizes, resolutions and other conditions, and JavaScript can be used to adjust the behavior or style of the web page according to information such as browser type and version.

[0062] Through the above steps S410 to S420, the target terminal can be determined based on the preferences and behavioral habits of the main user groups of the web page and the terminal data of the target terminal can be obtained in real time, so that the web page calibration can be optimized according to the current terminal status and the web page can be calibrated according to the terminal data, which helps the web page to present the best effect on different terminals.

[0063] S500: Obtain webpage compensation values ​​of multiple other terminals, wherein the webpage compensation values ​​are used to reflect the differences between the target terminal and other terminals when displaying webpages.

[0064] It can be understood that the webpage compensation value includes the layout margin, font size and image size of the webpage.

[0065] Exemplarily, the calibration database can be traversed to obtain the webpage compensation value corresponding to each other terminal. For example, the webpage compensation value of other terminal A is: layout margin compensation: top margin +5px, bottom margin -5px, left margin +0px, right margin -10px; font size compensation: text +2px, title +0px; picture size compensation: width -20px, height -10px.

[0066] In one possible implementation, see Figure 2 , S500, obtaining webpage compensation values ​​of multiple other terminals, including: S510, obtaining the webpage compensation value of each other terminal from the calibration database, wherein the webpage compensation value of each other terminal is stored in the calibration database.

[0067] Exemplarily, the corresponding webpage compensation value may be retrieved based on an SQL-based database query or an API call according to an identifier of the terminal (eg, device model, operating system version, browser type, etc.).

[0068] Through the above step S510, the webpage compensation value of each terminal is extracted from the calibration database. Obtaining the webpage compensation value from the calibration database can improve the efficiency and accuracy of data processing. These webpage compensation values ​​are used to further optimize the display effect of the webpage on different terminals.

[0069] Optionally, see Figure 3 , S510, before obtaining the webpage compensation value of each other terminal from the calibration database, the method further includes: S511, perform sampling test on all other terminals to obtain web page data of multiple sampled terminals. The web page data is used to reflect the display effect of the web page.

[0070] It can be understood that the web page data includes the layout margins, font size and image size of the web page.

[0071] For example, a test platform (such as BrowserStack, Responsive Design Mode, and LambdaTest, etc.) can be used to simulate the browser environment of different terminals, and automatically load and render web pages. During the test, the web page data of each sampled terminal is recorded.

[0072] For example, see Figure 3 , S511, perform sampling test on all other terminals, and obtain web page data of multiple sampled terminals, including: S5111, during the sampling test process, the web page of the target terminal is calibrated again to obtain a sampling calibration value of the target terminal.

[0073] For example, the web page of the target terminal can be recalibrated through a test platform (such as BrowserStack, Responsive Design Mode, and LambdaTest, etc.), and adjusted according to preset standards to ensure that the display effect of the web page reaches the best state. During the calibration process, various parameter adjustments are recorded, such as the layout margins, font size, and image size of the web page, and the adjusted parameter values ​​are saved as sample calibration values ​​of the target terminal.

[0074] S5112, determining the sampling calibration value of the sampling terminal according to the sampling calibration value of the target terminal and the webpage compensation value of the sampling terminal.

[0075] Exemplarily, the sampling calibration value of the target terminal and the webpage compensation value of the sampling terminal can be combined to obtain the sampling calibration value of the sampling terminal. For example, the sampling calibration value of the target terminal for the font size is 16px, and the webpage compensation value of the sampling terminal for the font size is +2px compared to the target terminal, then the webpage calibration value of the font size of the sampling terminal should be 16px+2px=18px.

[0076] S5113, performing a web page calibration test on the sampling terminal according to the sampling calibration value of the sampling terminal to obtain the web page data of the sampling terminal.

[0077] Exemplarily, a calibration test may be performed on the webpage of the sampled terminal through a test platform (such as BrowserStack, ResponsiveDesign Mode, and LambdaTest, etc.) according to the sampling calibration value, and the webpage data of the sampled terminal may be recorded.

[0078] Through the above steps S5111 to S5113, the sampling calibration value of the target terminal in the current environment is obtained through recalibration, which provides an accurate benchmark for the subsequent sampling terminal calibration, which is conducive to enhancing the reliability and consistency of the calibration. Combining the sampling calibration value of the target terminal and the webpage compensation value of the sampling terminal, the sampling calibration value of the sampling terminal in the current environment can be calculated, and the precise adjustment of the webpage display effect of the sampling terminal can be achieved, which helps to improve the consistency of the webpage on different terminals. Using the sampling calibration value to perform a webpage calibration test on the sampling terminal, webpage data reflecting the webpage display effect of the sampling terminal can be obtained. These webpage data provide an important basis for the subsequent adjustment and optimization of the compensation value, which helps to improve the display effect of the webpage on different terminals.

[0079] S512, when the webpage data of the sampling terminal does not meet the standard range, the webpage compensation value of the sampling terminal stored in the calibration database is modified according to the difference between the webpage data of the sampling terminal and the standard range to obtain modified compensation data.

[0080] It can be understood that the standard range is formulated based on web page data, including the layout of the web page, the display quality of images and texts. The standard range is that the web page data of the sampling terminal is within a standard range. The preset range can be set by ordinary technicians in this field according to actual needs and is not limited here.

[0081] Exemplarily, a reasonable standard range can be determined based on historical data and industry standards. For example, the standard range can be layout margins: top margin [10, 12] (px), bottom margin [20, 22] (px), left margin [10, 15] (px), right margin [10, 15] (px); font size: text [15, 16] (px) 16px, title [22, 24] (px); image size: width [300, 320] (px), height [200, 220] (px). If the web page data of the sampling terminal does not meet the standard range, then the web page compensation value stored in the calibration database is modified according to the difference between the web page data of the sampling terminal and the standard range to obtain compensation data.

[0082] S513, performing web page calibration test on each other terminal according to the compensation data to obtain web page data of each other terminal.

[0083] Exemplarily, the modified compensation data may be used to perform web page calibration tests on all other terminals, an automated test system may be used to load and render web pages, and web page data of each other terminal may be recorded.

[0084] For example, see Figure 3 S513, after performing a web page calibration test on each other terminal according to the compensation data and obtaining web page data of each other terminal, the method further includes: S5131, when the web page data of the sampling terminal meets the standard range, retain the corresponding web page compensation value stored in the calibration database.

[0085] Exemplarily, the web page data can be compared with the standard range through a test platform (such as BrowserStack, Responsive Design Mode, and LambdaTest, etc.). If the web page data of the sampling terminal meets the standard range, the web page compensation value corresponding to the sampling terminal stored in the calibration database is retained.

[0086] Through the above step S5131, the effective web page compensation value is retained, which avoids unnecessary repeated adjustment and optimization work, is conducive to improving the efficiency of the entire calibration process, and at the same time, helps to optimize the consistency and quality of web page display effects, and enhances the user experience of browsing the web on different terminals.

[0087] S514, when the webpage data of any other terminal does not meet the standard range, continue to modify the webpage compensation values ​​of other terminals in the calibration database that do not meet the standard range until the webpage data of all other terminals meet the standard range.

[0088] Exemplarily, the webpage compensation value stored in the calibration database may be modified, and the calibration test may be repeated until the webpage data of all other terminals meet the standard range.

[0089] Through the above steps S511 to S514, the web page data of some terminals can be efficiently obtained through sampling testing to reflect the display effect of the web page on different terminals. Compared with comprehensive testing, sampling testing can significantly reduce testing time and cost, while ensuring a certain test accuracy and coverage. By comparing the web page data of the sampled terminal with the standard range, the compensation value that needs to be adjusted can be accurately identified and modified accordingly. This targeted adjustment can ensure that the display effect of the calibrated web page is more in line with the standard range, and improve the consistency and user experience of the web page on different terminals. Using the modified compensation data to perform web page calibration tests on other terminals, the validity of the compensation value can be verified, and the calibrated web page data can be obtained. Through cyclic testing and adjustment, the web page data of all terminals can meet the standard range, and the consistency and stability of the web page on different terminals can be achieved. This iterative adjustment process can continuously approach the optimal solution and improve the accuracy and efficiency of web page calibration.

[0090] S600: Determine a webpage calibration value of each other terminal according to the webpage calibration value of the target terminal and the webpage compensation value of each other terminal.

[0091] Exemplarily, the webpage calibration value of each other terminal may be calculated by combining the webpage calibration value of the target terminal and the webpage compensation value of each other terminal.

[0092] In one possible implementation, see Figure 2 , S600, determining the webpage calibration value of each other terminal according to the webpage calibration value of the target terminal and the webpage compensation value of each other terminal, including: S610, when the webpage compensation value indicates the difference between the display error mean values ​​of the corresponding other terminals and the target terminal, the webpage calibration value of the target terminal is added to the webpage compensation values ​​of each other terminal to obtain the corresponding webpage calibration values ​​of the other terminals.

[0093] It can be understood that if the webpage compensation value represents the difference in the display error mean between the corresponding other terminal and the target terminal, then the webpage calibration value of the target terminal is added to the webpage compensation value of each other terminal to obtain the corresponding webpage calibration value of the other terminal. For example, if the webpage calibration value of the target terminal is X, and the webpage compensation value of a certain other terminal is Y (Y represents the difference in the display error mean between the other terminal and the target terminal), then the webpage calibration value of the other terminal is X+Y.

[0094] S620, when the webpage compensation value indicates the difference between the display error mean values ​​of the target terminal and the corresponding other terminals, subtract the webpage compensation values ​​of the other terminals from the webpage calibration value of the target terminal to obtain the corresponding webpage calibration values ​​of the other terminals.

[0095] It can be understood that if the webpage compensation value represents the difference in the mean value of the display error between the target terminal and the corresponding other terminals, rather than the difference between the other terminals and the target terminal, then the webpage calibration value of the target terminal is subtracted from the webpage compensation value of each other terminal to obtain the corresponding webpage calibration value of the other terminal. For example, if the webpage calibration value of the target terminal is X, and the webpage compensation value of a certain other terminal is -Y (indicating that the display effect of the target terminal is actually better than that of the terminal by an amount Y), then the webpage calibration value of the other terminal is XY.

[0096] Through the above steps S610 to S620, by taking the web page calibration value of the target terminal as a reference and combining the web page compensation values ​​of other terminals, it can be ensured that the web page display effects of all terminals are adjusted based on a unified reference. Whether it is a positive or negative display error, it can be accurately compensated and adjusted by addition or subtraction (actually adding a positive or negative compensation). Through accurate compensation and adjustment, it is helpful to improve the consistency of the display effect of the web page on different terminals, thereby improving the user experience. By calibrating based on the target terminal, the calibration process can be simplified and repetitive work can be reduced. Accurate compensation adjustment makes the display effect of the web page on different terminals more accurate and consistent. By optimizing the consistency and accuracy of the web page display effect, it is helpful to enhance the compatibility of web pages on different terminals and improve the user experience.

[0097] S700: Send the webpage calibration value of the target terminal, the webpage calibration values ​​of each other terminal, and the webpage of the target terminal to the server.

[0098] It can be understood that the server is communicatively connected with the target terminal and various other terminals.

[0099] Exemplarily, the webpage calibration value of the target terminal, the webpage calibration values ​​of each other terminal, and the webpage of the target terminal may be sent to the server, and the server calibrates the webpage according to the webpage calibration values ​​corresponding to each terminal.

[0100] In one possible implementation, see Figure 2 , the method further comprises: S001, testing a plurality of test web pages on a target terminal and other terminals, obtaining display errors of the test web pages of the target terminal and other terminals, and determining mean values ​​of the display errors of the target terminal and other terminals.

[0101] Exemplarily, an automated testing tool (such as Selenium, Appium, etc.) can be used to run the same test web page on multiple terminals at the same time and collect display data, calculate the display error of each test web page of the target terminal to obtain the average display error of the target terminal, and calculate the display error of each test web page of each other terminal to obtain the corresponding average display error of the other terminals.

[0102] S002, taking the display error mean of the target terminal as a reference, and determining the webpage compensation value of each other terminal according to the display error mean of each other terminal.

[0103] Exemplarily, the display error mean of the target terminal may be used as a reference to calculate the display error mean of each other terminal, and compared with the mean of the target terminal to obtain a comparison result, and the compensation value required by each other terminal may be determined according to the comparison result.

[0104] S003, storing the webpage compensation value of each other terminal in a calibration database.

[0105] Exemplarily, a database management system (such as MySQL, PostgreSQL, etc.) can be used to store and manage the calibration database, and the webpage compensation value of each other terminal can be inserted into the calibration database, and each webpage compensation value is associated with the corresponding terminal identifier. For example, the webpage compensation value of each other terminal is traversed, and the database API (such as SQL statement or ORM framework) is used to perform the insertion operation, and each compensation value is associated with the corresponding terminal identifier (such as device model, operating system version, etc.) and stored in the corresponding field of the database.

[0106] Through the above steps S001 to S003, by testing multiple test web pages on the target terminal and other terminals, the mean display error of the target terminal and each other terminal is collected and calculated, providing key data support for the subsequent determination of the web page compensation value. Based on the mean display error of the target terminal, the web page compensation value of each other terminal is calculated according to the mean display error of each other terminal, and the display effect of the web page on different terminals is adjusted by the compensation value. The web page compensation value of each other terminal is stored in the calibration database for subsequent use and management, so that the compensation value has traceability and reusability.

[0107] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0108] Corresponding to the HTML5-based dynamic content generation and multi-terminal adaptation method described in the above embodiment, the embodiment of the present application also provides an HTML5-based dynamic content generation and multi-terminal adaptation device, and the various modules of the device can implement the various steps of the HTML5-based dynamic content generation and multi-terminal adaptation method. Figure 4 A structural block diagram of an HTML5-based dynamic content generation and multi-terminal adaptation device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0109] Reference Figure 4 , the device comprises: An acquisition module, used to acquire real-time resources and real-time requirements; wherein the real-time resources refer to resources that need to be dynamically acquired or updated by HTML5-based web pages, and the real-time requirements refer to the functions and display requirements that need to be met by HTML5-based web pages; A component module, used to generate multiple components according to the real-time resources and the real-time requirements; wherein the components are basic units for constructing web pages; A web page module, used to determine a page loading path according to each of the components and the real-time resources, and obtain a web page; wherein the page loading path is used to reflect the loading method and order of each of the components; A first webpage calibration module, used to calibrate the webpage of the target terminal to obtain a webpage calibration value of the target terminal; wherein the webpage calibration value is a parameter obtained after the webpage of the terminal is calibrated; A webpage compensation value module, used to obtain webpage compensation values ​​of each of a plurality of other terminals; wherein the webpage compensation values ​​are used to reflect the difference between the target terminal and the other terminals when displaying webpages; A second webpage calibration module, configured to determine a webpage calibration value of each of the other terminals according to the webpage calibration value of the target terminal and each webpage compensation value of each of the other terminals; The calibration module is used to send the webpage calibration value of the target terminal, the webpage calibration values ​​of each of the other terminals, and the webpage of the target terminal to the server.

[0110] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0111] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0112] The embodiment of the present application also provides an electronic device, Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 5 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 5 Only one is shown), at least one memory 61 ( Figure 5 Only one is shown in the figure) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the electronic device 6 implements the steps in any of the above-mentioned embodiments of the dynamic content generation and multi-terminal adaptation method based on HTML5, or implements the functions of each module / unit in the above-mentioned device embodiments.

[0113] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the electronic device 6.

[0114] The electronic device 6 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 6 and does not constitute a limitation on the electronic device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, buses, etc.

[0115] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0116] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. In other embodiments, the memory 61 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the electronic device 6. The memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0117] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0118] An embodiment of the present application provides a computer program product. When the computer program product is executed on an electronic device, the electronic device implements the steps in any of the above method embodiments.

[0119] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0122] In the embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application. < / h1>

Claims

1. A method for dynamic content generation and multi-terminal adaptation based on HTML5, characterized in that: Applied to an electronic device, the electronic device is communicatively connected with a server, and the method comprises: Acquire real-time resources and real-time requirements; wherein, the real-time resources refer to resources that need to be dynamically acquired or updated by HTML5-based web pages, and the real-time requirements refer to the functions and display requirements that need to be met by HTML5-based web pages; Generate multiple components according to the real-time resources and the real-time requirements; wherein the components are basic units for constructing web pages; Determine a page loading path according to each of the components and the real-time resource, and obtain a web page of the target terminal; wherein the page loading path is used to reflect the loading method and order of each of the components; Calibrate the web page of the target terminal to obtain a web page calibration value of the target terminal; wherein the web page calibration value is a parameter obtained after the web page of the terminal is calibrated; Acquire webpage compensation values ​​of respective multiple other terminals; wherein the webpage compensation values ​​are used to reflect the difference between the target terminal and the other terminals when displaying webpages; Determine a webpage calibration value of each of the other terminals according to the webpage calibration value of the target terminal and each webpage compensation value of each of the other terminals; The webpage calibration value of the target terminal, the webpage calibration values ​​of each of the other terminals, and the webpage of the target terminal are sent to the server.

2. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 1, characterized in that: The generating of multiple components according to the real-time resources and the real-time requirements includes: Create a corresponding HTML template according to the real-time requirements; Obtain dynamic data according to the real-time resources; Each of the components is generated according to the HTML template and dynamic data.

3. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 1, characterized in that: Determining a page loading path according to each of the components and the real-time resource and obtaining a web page of a target terminal includes: Determining component dependencies according to the components and the real-time resources; wherein the component dependencies are used to reflect the order in which the components are loaded; Determine the page loading path according to the component dependency relationship; According to the page loading path, each of the components is rendered and assembled to obtain a web page.

4. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 1, characterized in that: The step of calibrating the web page of the target terminal to obtain a web page calibration value of the target terminal includes: Acquire terminal data of the target terminal; wherein the terminal data includes screen size, resolution, browser type and version; A webpage calibration value of the target terminal is obtained according to the terminal data and the webpage.

5. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 1, characterized in that: The obtaining of webpage compensation values ​​of the multiple other terminals includes: The webpage compensation value of each of the other terminals is obtained from a calibration database; wherein the calibration database stores the webpage compensation value of each of the other terminals.

6. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 5, characterized in that: The method further comprises: Testing a plurality of test web pages on the target terminal and each of the other terminals to obtain display errors of each of the test web pages of the target terminal and each of the other terminals, and determining a mean value of the display errors of the target terminal and each of the other terminals; Taking the display error mean of the target terminal as a reference, determining the webpage compensation value of each of the other terminals according to the display error mean of each of the other terminals; The webpage compensation value of each of the other terminals is stored in the calibration database.

7. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 5, characterized in that: Before obtaining the webpage compensation value of each of the other terminals from the calibration database, the method further includes: Performing sampling tests on all the other terminals to obtain web page data of the multiple sampled terminals; the web page data is used to reflect the display effect of the web page; When the webpage data of the sampling terminal does not meet the standard range, modifying the webpage compensation value of the sampling terminal stored in the calibration database according to the difference between the webpage data of the sampling terminal and the standard range to obtain modified compensation data; Performing a web page calibration test on each of the other terminals according to the compensation data to obtain web page data of each of the other terminals; When the webpage data of any of the other terminals does not meet the standard range, the webpage compensation values ​​of the other terminals in the calibration database that do not meet the standard range continue to be modified until the webpage data of all other terminals meet the standard range.

8. The method according to claim 7, characterized in that The performing a sampling test on all the other terminals to obtain web page data of a plurality of sampled terminals includes: During the sampling test, the web page of the target terminal is recalibrated to obtain a sampling calibration value of the target terminal; Determining a sampling calibration value of the sampling terminal according to the sampling calibration value of the target terminal and the webpage compensation value of the sampling terminal; According to the sampling calibration value of the sampling terminal, a web page calibration test is performed on the sampling terminal to obtain the web page data of the sampling terminal.

9. The method according to claim 7, characterized in that After performing a webpage calibration test on each of the other terminals according to the compensation data to obtain webpage data of each of the other terminals, the method further includes: When the web page data of the sampling terminal meets the standard range, the corresponding web page compensation value stored in the calibration database is retained.

10. The method for dynamic content generation and multi-terminal adaptation based on HTML5 as claimed in claim 6, characterized in that: The determining the webpage calibration value of each of the other terminals according to the webpage calibration value of the target terminal and each webpage compensation value of each of the other terminals includes: When the webpage compensation value indicates a difference between the display error mean values ​​of the corresponding other terminals and the target terminal, adding the webpage calibration value of the target terminal to the webpage compensation value of each of the other terminals to obtain the corresponding webpage calibration value of the other terminals; When the webpage compensation value indicates the difference between the display error mean values ​​of the target terminal and the corresponding other terminals, the webpage compensation value of each of the other terminals is subtracted from the webpage calibration value of the target terminal to obtain the corresponding webpage calibration value of the other terminals.

Citation Information

Patent Citations

  • Method and device for dynamically adapting webpage

    CN104820589A

  • Page resource loading method and device, computer equipment and storage medium

    CN110647700A

  • Webpage loading method and device

    CN112364277A

  • Webpage layout method, terminal device, system and electronic equipment

    CN117743708A

  • Webview characteristic-based method, apparatus and device, and medium

    CN118069950A