Browser page processing method and related device
By monitoring user behavior and analyzing page structure in real time, personalized scaling ratios are generated, solving the problem that traditional browsers cannot adapt to user needs and achieving the best browsing experience on different devices.
Patent Information
- Application Number
- CN202510695999.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional browsers cannot dynamically adjust the page scaling ratio according to the user's device, browsing content, and operating habits, thus failing to meet the user's personalized needs.
By monitoring user access behavior in real time and analyzing browser page layout, element types, and font information using user preference models, personalized preference scaling ratios are generated. These ratios are then combined with device characteristics to render the page, ensuring the best browsing experience across different devices.
It enables dynamic page scaling based on users' personalized needs, improving the browsing experience on different devices and avoiding the incompatibility issues caused by fixed scaling settings.
Smart Images

Figure CN123178731A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer and communication technology, and more specifically, to a browser page processing method and related equipment. Background Technology
[0002] Each user has different page zoom requirements, and these requirements are often closely related to the user's device, the content they browse, and their browsing habits. Traditional browsers often cannot dynamically adjust the page zoom ratio based on these factors, instead relying on fixed zoom options, which fails to effectively meet users' personalized needs. Summary of the Invention
[0003] The embodiments of this application provide a browser page processing method and related devices, which can at least to a certain extent dynamically and intelligently adapt to the page browsing habits of different users and meet the personalized needs of users.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0005] According to one aspect of the embodiments of this application, a browser page processing method is provided, comprising: monitoring user access behavior in real time and obtaining page information of the corresponding browser page; inputting the page information into a user preference model to obtain a preference scaling ratio; and displaying the browser page on a display interface according to the preference scaling ratio and display interface information.
[0006] In some feasible embodiments of this application, the page information includes the resource address corresponding to the browser page; the user preference model includes a resource parsing sub-model and a scaling ratio regression sub-model; the step of inputting the page information into the user preference model to obtain the preference scaling ratio specifically includes: analyzing the resource address through the resource parsing sub-model to determine the layout structure, element type, and font information of the browser page; and inputting the layout structure, element type, and font information into the scaling ratio regression sub-model to obtain the preference scaling ratio.
[0007] In some feasible embodiments of this application, the step of analyzing the resource address through a resource parsing sub-model to determine the layout structure, element type, and font information of the browser page specifically includes: parsing the resource address to obtain structured tag information and font information; processing the structured tag information through a DOM sequence branch network to obtain DOM sequence features; performing CSS rendering based on the resource address to obtain visual information; processing the visual information through a visual feature processing branch network to obtain visual features; and obtaining the layout structure and element type based on the DOM sequence features and the visual features.
[0008] In some feasible embodiments of this application, the step of inputting the layout structure, element type, and font information into the scaling ratio regression sub-model to obtain the preference scaling ratio specifically includes: performing feature fusion on the layout structure, element type, and font information to obtain a page fusion vector; and performing attention regression processing on the page fusion vector to obtain the preference scaling ratio.
[0009] In some feasible embodiments of this application, the step of displaying the browser page on the display interface according to the preferred scaling ratio and display interface information specifically includes: correcting the preferred scaling ratio according to the display interface information to obtain a target scaling ratio; calling the rendering interface to render the browser page with the target scaling ratio; and displaying the browser page on the display interface.
[0010] In some feasible embodiments of this application, the display interface information includes device type information and window size information; the step of correcting the preferred scaling ratio based on the display interface information to obtain a target scaling ratio specifically includes: determining a correction factor based on the device type information and window size information; and correcting the preferred scaling ratio based on the correction factor to obtain the target scaling ratio.
[0011] In some feasible embodiments of this application, the browser page processing method further includes: acquiring user historical access data to obtain a page information sample set, wherein the page information sample set contains multiple page information samples, each of which is marked with a corresponding scaling label; inputting each of the page information samples in the page information sample set into a user preference model one by one to obtain a corresponding scaling ratio; updating the parameters of the user preference model according to the scaling ratio and the scaling label until a predetermined termination condition is met, stopping training, and obtaining a trained user preference model.
[0012] In some feasible embodiments of this application, after displaying the browser page on the display interface according to the preferred scaling ratio and display interface information, the browser page processing method further includes: updating the page information sample set in response to the user's adjustment of the browser page scaling ratio.
[0013] According to one aspect of the embodiments of this application, a browser page processing apparatus is provided, the browser page processing apparatus comprising: an access behavior monitoring module, configured to monitor user access behavior in real time and obtain page information of the corresponding browser page; a user preference model module, configured to input the page information into a user preference model to obtain a preference scaling ratio; and a target page display module, configured to display the browser page on a display interface according to the preference scaling ratio and display interface information.
[0014] In some feasible embodiments of this application, the page information includes the resource address corresponding to the browser page; the user preference model includes a resource parsing sub-model and a scaling ratio regression sub-model; the user preference model module specifically includes: a resource address parsing sub-module, used to analyze the resource address through the resource parsing sub-model to determine the layout structure, element type, and font information of the browser page; and a user preference regression sub-module, used to input the layout structure, element type, and font information into the scaling ratio regression sub-model to obtain the ratio.
[0015] In some feasible embodiments of this application, the resource address parsing submodule specifically includes: an address parsing unit, used to parse the resource address and obtain structured tag information and font information; a DOM sequence unit, used to process the structured tag information through a DOM sequence branch network to obtain DOM sequence features; a CSS rendering unit, used to perform CSS rendering based on the resource address to obtain visual information; a visual information unit, used to process the visual information through a visual feature processing branch network to obtain visual features; and a final processing unit, used to obtain the layout structure and element type based on the DOM sequence features and the visual features.
[0016] In some feasible embodiments of this application, the user preference regression submodule specifically includes: a feature fusion unit, used to perform feature fusion on the layout structure, element type and font information to obtain a page fusion vector; and a regression processing unit, used to perform attention regression processing on the page fusion vector to obtain a preference scaling ratio.
[0017] In some feasible embodiments of this application, the target page display module specifically includes: a preference scaling correction submodule, used to correct the preference scaling ratio according to the display interface information to obtain a target scaling ratio; and a rendering interface calling submodule, used to call a rendering interface to render the browser page with the target scaling ratio and display the browser page on the display interface.
[0018] In some feasible embodiments of this application, the display interface information includes device type information and window size information; the preference scaling correction submodule specifically includes: a correction factor determination unit, used to determine a correction factor based on the device type information and window size information; and a preference scaling correction unit, used to correct the preference scaling ratio based on the correction factor to obtain a target scaling ratio.
[0019] In some feasible embodiments of this application, the browser page processing device further includes: a sample acquisition module, used to acquire user historical access data to obtain a page information sample set, wherein the page information sample set contains multiple page information samples, and each page information sample is marked with a corresponding scaling label; a sample input module, used to input each of the page information samples in the page information sample set into the user preference model one by one to obtain the corresponding scaling ratio; and a parameter update module, used to update the parameters of the user preference model according to the scaling ratio and the scaling label until a predetermined termination condition is met, thereby stopping training and obtaining a trained user preference model.
[0020] In some feasible embodiments of this application, the browser page processing device further includes: a sample update module, used to update the page information sample set in response to the user's adjustment of the browser page scaling ratio.
[0021] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the browser page processing method as described in the above embodiments.
[0022] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the browser page processing method as described in the above embodiments.
[0023] According to one aspect of the embodiments of this application, a computer program product is provided, including one or more computer programs that, when executed by one or more processors, implement the steps of the browser page processing method as described in the above embodiments.
[0024] In some embodiments of this application, the technical solutions provide that, by monitoring user access behavior in real time and capturing user operation preferences, a personalized scaling ratio is generated for each user based on their historical behavior and preferences, avoiding a one-size-fits-all scaling setting. Furthermore, by combining this with display interface information, the page display can be automatically adjusted according to device characteristics, ensuring that users receive the best browsing experience on different devices.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0027] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.
[0028] Figure 2 The diagram shows a flowchart of a browser page processing method provided in an embodiment of this application.
[0029] Figure 3 It shows according to Figure 2 A flowchart illustrating a specific implementation of step S200 in the browser page processing method shown in the corresponding embodiment.
[0030] Figure 4 It shows according to Figure 2 A flowchart illustrating a specific implementation of step S300 in the browser page processing method shown in the corresponding embodiment.
[0031] Figure 5 A schematic diagram of the structure of a browser page processing device provided in an embodiment of this application is shown.
[0032] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0033] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0034] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0035] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0036] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0037] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.
[0038] like Figure 1 As shown, the system architecture may include terminal devices (such as...) Figure 1 The device shown includes one or more of a smartphone 101, tablet 102, and portable computer 103 (which could also be a desktop computer, etc.), a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal device and the server 105. The network 104 can include various connection types, such as wired communication links, wireless communication links, etc.
[0039] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, networks, and servers. For example, server 105 could be a server cluster composed of multiple servers.
[0040] Users can use terminal devices to interact with server 105 via network 104 to receive or send messages, etc. Server 105 can be a server that provides various services. For example, a user can use terminal device 103 (or terminal device 101 or 102) to upload real-time monitored user access behavior to server 105 to obtain page information of the corresponding browser page. Server 105 can input the page information into a user preference model to obtain a preference scaling ratio; based on the preference scaling ratio and display interface information, it can display the browser page on the display interface.
[0041] It should be noted that the browser page processing method provided in this application embodiment is generally executed by server 105, and correspondingly, the browser page processing device is generally located in server 105. However, in other embodiments of this application, the terminal device may also have similar functions to the server, thereby executing the browser page processing scheme provided in this application embodiment.
[0042] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0043] Figure 2 A flowchart illustrating a browser page processing method according to an embodiment of this application is shown. This browser page processing method can be executed by a server, which may be... Figure 1 The server shown. (Refer to...) Figure 2 As shown, the browser page processing method includes at least the following:
[0044] The S100 monitors user access behavior in real time and obtains page information for the corresponding browser pages.
[0045] S200, input the page information into the user preference model to obtain the preference scaling ratio.
[0046] S300, based on the preferred scaling ratio and display interface information, display the browser page on the display interface.
[0047] In the embodiments of this application, by monitoring user access behavior in real time and capturing user operation preferences, a personalized scaling ratio is generated for each user based on their historical behavior and preferences, avoiding a one-size-fits-all scaling setting. Furthermore, by combining display interface information, the page display can be automatically adjusted according to device characteristics, ensuring that users receive the best browsing experience on different devices.
[0048] In the S100, user interactions with the page can be recorded in real time via the browser's API or plugins.
[0049] User interactions with a page can include which page elements the user clicks, the user's scrolling actions on the page (such as scrolling down or up), the user manually adjusting the page zoom level, the time the user stays on the page, and their reaction to the page content.
[0050] Based on user behavior, structural information about the page can be collected, such as what types of content the page contains (text, images, videos, etc.), the size, position, and layout of each element, etc.
[0051] In S200, by combining real-time monitored page information with a preference model, the most suitable zoom ratio is automatically generated for the current page. For example, if a user habitually zooms in on a certain type of page content, the zoom ratio is set to be slightly larger.
[0052] This step generates personalized scaling ratios to meet the individual needs of each user, avoiding uniform scaling settings and thus greatly improving the user experience.
[0053] Specifically, in some embodiments, the specific implementation of step S200 can be found in [reference needed]. Figure 3 . Figure 3 It is based on Figure 2 The detailed description of step S200 in the browser page processing method shown in the corresponding embodiment is as follows: In the browser page processing method, the page information includes the resource address corresponding to the browser page; the user preference model includes a resource parsing sub-model and a scaling ratio regression sub-model; step S200 may include the following steps:
[0054] S210, the resource address is analyzed through the resource parsing sub-model to determine the layout structure, element type, and font information of the browser page.
[0055] S220, input the layout structure, element type and font information into the scaling ratio regression sub-model to obtain the preferred scaling ratio.
[0056] In this embodiment, on the one hand, the resource parsing sub-model performs structured analysis on the page content, accurately identifying the page layout, element types, font information, etc., avoiding the limitations of simply processing based on page type; on the other hand, the scaling ratio regression sub-model adjusts the scaling ratio according to the specific page structure and element type, so that even complex pages or dynamically changing content can achieve the best display effect.
[0057] This embodiment takes into account user behavior preferences and the structural characteristics of page content. It can automatically adjust the browser page display according to the user's device, screen size, usage habits, and the complexity of the page content, thereby improving the readability and usability of the page display.
[0058] In S210, the relevant content of a page is located and retrieved through the resource address of the browser page. The resource address is the URL address or link required for the page to load; this address is considered a key page identifier. As part of the page information, the resource address provides an overall description of the page's content.
[0059] The resource parsing sub-model is responsible for analyzing the page corresponding to the resource address, extracting the page's layout structure, element types, and font information. Specifically, it first identifies the types of various elements on the page (such as text, images, videos, forms, etc.) by crawling or parsing the page content, and then further extracts the page's layout information (such as horizontal or vertical layout, whether there are multiple columns, etc.) as well as text information such as the fonts and sizes used on the page.
[0060] The layout structure includes whether the page uses a single-column or multi-column layout, and whether it includes a sidebar, navigation bar, etc. Element types refer to different types of elements on the page, such as text blocks, images, buttons, form input boxes, etc. Font information includes the font size, style, line spacing, etc.
[0061] By analyzing the layout and elements of a page, the system can understand the page's complexity and structural features, and then take targeted actions. For example, a page with a multi-column layout may need to adjust the display ratio of different columns, while a rich media page (such as a page containing videos and images) may require special processing.
[0062] Specifically, in some embodiments, the specific implementation of step S210 can be found in the following embodiments. This embodiment is based on... Figure 3 According to the detailed description of step S210 in the browser page processing method shown in the corresponding embodiment, step S210 in the browser page processing method may include the following steps:
[0063] Parse the resource address to obtain structured tag information and font information.
[0064] The structured tag information is processed by the DOM sequence branch network to obtain DOM sequence features.
[0065] CSS rendering is performed based on the resource address to obtain visual information.
[0066] The visual information is processed by a visual feature processing branch network to obtain visual features.
[0067] Based on the DOM sequence features and the visual features, the layout structure and element types are obtained.
[0068] In this embodiment, structured tag information is obtained by parsing resource addresses. Combined with DOM sequence features and visual information, the accuracy of page display is ensured, especially for adapting to complex layouts and dynamic content. Simultaneously, through intelligent analysis of layout structure and element types, combined with visual features, the optimal scaling ratio of the page can be dynamically calculated to ensure consistent page display across different devices.
[0069] The intelligent processing of the model enables the page to be optimized according to different content and user needs, improving the user's browsing experience in the browser and reducing the need to manually adjust the scaling ratio.
[0070] Specifically, the system first parses the page from its resource address to obtain its structured tag information and font information. This tag information includes HTML tags and CSS styles, while the font information involves the font, font size, line spacing, etc., used on the page. A DOM sequence branch network (based on the DOM's tree structure and attributes) is used to process the page's structured tag information, extracting DOM sequence features. These features describe the hierarchical relationships and structural characteristics between page elements (e.g., the arrangement of text blocks, images, and links). Based on the parsed resource address and CSS styles, the system performs CSS rendering to generate the page's visual information. CSS rendering involves the actual display styles of elements, such as color, background, font style, and size, reflecting the page's actual display effect on different screens. The visual information obtained after CSS rendering is input into a visual feature processing branch network for further processing. This network extracts the page's visual features through deep learning analysis of the visual information, such as element density, text readability, and image clarity. Finally, combining DOM sequence features and visual features, the specific layout structure and element types of the page are analyzed. By integrating this information, we can determine the type of each element on the page (such as text, images, buttons, forms, etc.) and its position and arrangement on the page (such as single-column layout, double-column layout, complex layout, etc.).
[0071] In S220, the page layout structure, element types, and font information extracted by the resource parsing sub-model are input into the scaling ratio regression sub-model. Based on this input data, the regression sub-model predicts the optimal scaling ratio for the page using regression analysis methods (which may be linear regression, decision trees, or other machine learning algorithms).
[0072] Specifically, for complex multi-column layouts, the page size needs to be appropriately reduced to ensure that each column is displayed reasonably and maintains good readability. If the page contains a large number of images or videos, the page needs to be scaled up to ensure that the images and videos are fully visible and clear. Small fonts used on the page may need to be enlarged to improve readability, especially on mobile phones or small-screen devices.
[0073] Through regression analysis, the scaling ratio regression submodel yields a preferred scaling ratio, indicating the optimal scaling ratio for page display.
[0074] This step, through the analysis of the scaling ratio regression sub-model, intelligently adjusts the scaling ratio based on the specific page content and structure, thereby ensuring optimal display on the user's device. Especially when faced with complex page structures, the model can automatically adjust the scaling ratio to ensure clear text and appropriate display of images and media elements.
[0075] Specifically, in some embodiments, the specific implementation of step S220 can be found in the following embodiments. This embodiment is based on... Figure 3 According to the detailed description of step S220 in the browser page processing method shown in the corresponding embodiment, step S220 may include the following steps:
[0076] The layout structure, element type, and font information are fused to obtain a page fusion vector.
[0077] Attention regression processing is performed on the page fusion vector to obtain the preference scaling ratio.
[0078] In this embodiment, feature fusion of layout structure, element type, and font information, along with an attention regression mechanism, is employed to deeply analyze various aspects of the page and accurately calculate the preferred scaling ratio for each page. This method utilizes deep learning technology, making the calculation of page scaling ratios more flexible and adaptable to different types of page content.
[0079] Feature fusion allows the model to comprehensively consider information from layout, elements, and fonts, while attention regression can focus on optimizing based on the visual needs of important parts of the page, thereby providing the best scaling ratio.
[0080] Specifically, layout structure, element types, and font information are fused to obtain a page fusion vector. Layout structure involves the hierarchy and arrangement of various elements (such as text, images, and buttons) on the page; element types involve the different types of components on the page (such as headings, paragraphs, and images); and font information includes font type, font size, and line spacing. After feature fusion, this information generates a page fusion vector that contains all the key information about the page in terms of structure, content, and visual presentation.
[0081] After obtaining the page fusion vector, it is input into an attention regression sub-model for attention regression processing. The attention mechanism here assigns different importance weights to various elements on the page, highlighting the most important parts and further optimizing the scaling ratio calculation. For example, the page title, important images, or text blocks may be given higher weights because they are the focus of user attention. Based on these weights, the attention regression model dynamically calculates the preferred scaling ratio, i.e., the scaling ratio most suitable for the page content.
[0082] After attention regression processing, a preferred scaling ratio is generated. This scaling ratio represents the display scale optimized for page content and structure, ensuring the best display effect of page content on different devices. The final preferred scaling ratio is applied during the page rendering process, ensuring that the page maintains good readability and layout across various screen sizes and resolutions.
[0083] In the S300, the display characteristics of the user device are acquired, including screen size, resolution, DPI (dots per inch), etc., to help determine the optimal scaling ratio for page display.
[0084] For example, small-screen devices (such as mobile phones) require a higher scaling ratio so that users can clearly view page content. Large-screen devices (such as desktop monitors) require a lower scaling ratio to display more page content. Therefore, this step combines the scaling ratio derived from the user preference model with the device's display characteristics to automatically adjust the page's display ratio, ensuring the page presents the best visual effect on the current device. For example, elements such as text, images, and buttons on the page will be adjusted accordingly based on the scaling ratio, ensuring users enjoy a comfortable browsing experience on different devices.
[0085] The dynamic adaptation technology proposed in this embodiment ensures that regardless of the user's device, the browser can automatically optimize the page display based on the device's characteristics, thereby providing a smooth and comfortable browsing experience. Users do not need to manually adjust the scaling ratio; the system can automatically adjust according to the display device and user preferences.
[0086] Specifically, in some embodiments, the specific implementation of step S300 can be found in [reference needed]. Figure 4 . Figure 4 It is based on Figure 2 According to the detailed description of step S300 in the browser page processing method shown in the corresponding embodiment, step S300 in the browser page processing method may include the following steps:
[0087] S310, Based on the display interface information, the preferred scaling ratio is corrected to obtain the target scaling ratio.
[0088] S320, the rendering interface is called to render the browser page at the target scaling ratio, and the browser page is displayed on the display interface.
[0089] In this embodiment, after obtaining the preferred scaling ratio, it is corrected based on the device's display interface information. The corrected target scaling ratio then becomes the scaling ratio used in the final rendering. Display interface information may include factors such as resolution, device size, aspect ratio, and screen density to address the issue of inconsistent display effects across different devices, ensuring that the same browser page displays well on various devices. Dynamically adjusting the page content according to the actual display conditions of the device ensures that the page presents the optimal aspect ratio and layout on the display screen. This dynamic adjustment mechanism makes the page display process more flexible and intelligent, enhancing the user's visual experience.
[0090] Once the target scaling ratio is obtained, the page is rendered via the rendering interface. The rendering interface is responsible for performing the final graphics rendering based on the target scaling ratio and device information, displaying the optimized page to the user. This ensures that the page's display effect on the actual interface meets the user's needs and that inaccurate scaling ratios do not cause page content distortion, display failure, or layout errors.
[0091] In S310, after obtaining the initial preferred scaling ratio, the current device's display interface information (such as resolution, screen size, and aspect ratio) is acquired. Based on this information, the preferred scaling ratio is corrected. Correction methods may involve adjusting the scaling ratio proportionally, refining it, or using a weighted average to better suit the device's actual display needs. The scaling ratio corrected based on the display interface information is the target scaling ratio. This target scaling ratio fully considers the device's hardware characteristics, such as screen size, resolution, and aspect ratio.
[0092] It should be noted that display interface information can usually be obtained through the operating system or device display settings.
[0093] This step ensures the compatibility of the preferred scaling ratio across different devices, effectively resolving display differences between devices with varying screen densities and resolutions, and ensuring optimal display across all devices. The target scaling ratio ensures the accuracy and consistency of the browser page's display across different devices, avoiding display problems that may arise from a fixed scaling ratio, such as excessively small text, distorted images, and overlapping elements.
[0094] For example, some high-resolution devices may require finer scaling, while low-resolution devices may require a larger scaling ratio to ensure page readability and usability.
[0095] Specifically, in some embodiments, the specific implementation of step S310 can be found in the following embodiments. This embodiment is based on... Figure 4According to the detailed description of step S310 in the browser page processing method shown in the corresponding embodiment, the display interface information in the browser page processing method includes device type information and window size information, and step S310 may include the following steps:
[0096] The correction factor is determined based on the device type information and window size information.
[0097] The preference scaling ratio is adjusted based on the correction factor to obtain the target scaling ratio.
[0098] In this embodiment, by combining device type and window size information, the preferred scaling ratio is adjusted to obtain the target scaling ratio. This ensures that the page displays optimally on any device and window size, improving page readability and user experience.
[0099] Traditional browser page display methods often fail to adequately consider window size and device characteristics. This embodiment dynamically acquires and utilizes display interface information (device type and window size), enabling the page to adaptively adjust according to actual conditions, thus improving the browser's adaptability and flexibility. Simultaneously, through precise scaling adjustments, the page content remains clear and logically formatted when users browse the webpage on different devices and in different windows, preventing content distortion or layout errors due to device or window differences, thereby enhancing the user's browsing experience.
[0100] Specifically, the first step is to obtain device type information and window size information. Device type information is usually obtained through the operating system or browser interface to distinguish the type of device (such as mobile phone, tablet, desktop computer, etc.), each of which has different display characteristics. Window size information is the size of the current browser window, usually obtained through the browser's API, reflecting the specific window size that the user is using.
[0101] Based on device type information, the display requirements of the device can be determined. For example, mobile devices typically have smaller screens and lower resolutions, potentially requiring a higher scaling ratio; while desktop devices have larger screens and higher resolutions, potentially requiring a lower scaling ratio. Based on window size information, the user's current browsing environment can be understood, determining whether it's a full-screen or small window. Smaller windows may require a higher scaling ratio to fit the limited display area; while larger windows may require a lower scaling ratio to ensure a harmonious page layout. The correction factor dynamically adjusts the page display effect based on a comprehensive consideration of device type and window size, ensuring the scaling ratio adapts to the actual device and display window requirements. For example, in some embodiments, a first correction factor and a second correction factor can be determined based on the device type information and window size information, respectively, and then the two factors are multiplied together to obtain the final correction factor.
[0102] The calculation of the correction factor ensures that the scaling ratio is optimized based on the type of device and the size of the window. This allows page content to be precisely adjusted according to the actual environment, avoiding display problems caused by differences in device or window size.
[0103] Once the correction factor is determined, the initial preference scaling ratio can be adjusted based on this factor. Specifically, this might involve performing a weighted average, multiplication, or other mathematical operation on the correction factor and the preference scaling ratio to arrive at the target scaling ratio.
[0104] The target scaling ratio will be more adapted to the display characteristics of the current device and the size of the browsing window, ensuring that the page displays best on this device and in this window.
[0105] In S320, once the target scaling ratio is determined, the final page rendering can be performed through the rendering interface. The rendering interface is part of the operating system or browser and is responsible for adjusting the display of page content according to the target scaling ratio, ensuring that page elements and layout are correctly presented on the actual screen.
[0106] The rendering interface processes the position, size, spacing, and other information of all page elements (text, images, buttons, etc.) and scales them appropriately according to the target scaling ratio.
[0107] It should be noted that, in some embodiments, the training method for the user preference model described above may specifically include the following steps:
[0108] Obtain user historical access data to obtain a page information sample set. The page information sample set contains multiple page information samples, and each page information sample is marked with a corresponding scaling label.
[0109] Each page information sample in the page information sample set is input into the user preference model to obtain the corresponding scaling ratio;
[0110] The user preference model is updated with parameters based on the scaling ratio and the scaling label until a predetermined termination condition is met, at which point training stops and a well-trained user preference model is obtained.
[0111] In this embodiment, personalized page display preferences are obtained by analyzing users' historical access data. Based on this information, the page scaling ratio is adjusted to more accurately meet the user's specific needs. As users visit more web pages, traditional methods may fail to adapt to changes in user preferences in a timely manner. This embodiment trains a user preference model and combines it with historical access data to continuously optimize the scaling ratio adjustment strategy, making the page display more dynamic and intelligent. This method allows the system to automatically adjust according to changes in user behavior, avoiding the tedious manual adjustment of the scaling ratio.
[0112] In the training process described above, using users' historical behavior data as training samples allows the model to understand users' specific preferences for page display and automatically adjust the scaling ratio. This enables each user to enjoy a personalized browsing experience without relying on fixed scaling rules. By training the user preference model, it can continuously learn about changes in user preferences. As user behavior changes, the system can dynamically update the scaling ratio, ensuring the most suitable display effect every time the page loads.
[0113] This method can automatically adjust the page scaling ratio based on historical data without manual intervention, enabling the browser to better adapt to different user needs and usage scenarios.
[0114] Specifically, the first step is to acquire the user's historical browsing data. This data includes information about the web pages the user has visited, as well as the scaling ratio and other page information associated with each web page. By analyzing this historical data, a sample set of page information can be generated. Each sample contains the display information of a specific page, and each sample has a corresponding scaling tag (i.e., the actual scaling ratio of the page when it is displayed). The construction of the sample set of page information can be achieved by recording the page size, scaling ratio, and other information related to page display when the user visits a web page.
[0115] Each page information sample in the acquired page information sample set is individually input into the user preference model. The user preference model is a machine learning model based on historical data that can predict the optimal scaling ratio for the current page based on the specific information of the page and historical scaling ratios. Each page information sample is input into the model, which predicts the appropriate scaling ratio for that page based on the page's characteristics and the user's historical behavior.
[0116] The model updates its parameters based on the error between the zoom ratio predicted from historical user data and the actual zoom label (i.e., the zoom ratio actually used by the user). By comparing with the true label, the model learns a more accurate mapping relationship. The parameter update process is typically implemented using machine learning algorithms such as error backpropagation until the model can accurately predict the optimal zoom ratio for each page. The training process continues until predetermined termination conditions are met (such as the number of training iterations, error thresholds, etc.). When the model reaches the specified training criteria, the training process stops, resulting in a trained user preference model. The trained model can be applied in future browser page processing to provide users with more accurate zoom ratio recommendations.
[0117] In the above embodiments, after the display interface shows the user's browser page, the user may continue to adjust the zoom ratio to ensure a comfortable experience. In response to the user's adjustment of the browser page zoom ratio, the page information sample set is updated.
[0118] In this embodiment, the page information sample set is updated promptly in response to user adjustments to the zoom ratio, ensuring that subsequent page displays better adapt to the user's actual actions. This allows the browser to respond to user needs more intelligently and in real-time, improving the user experience. As the user adjusts the page zoom ratio, changes in user behavior are captured, and the model's training and adjustments are further optimized by updating the page information sample set. This dynamic optimization improves the accuracy of user preferences, enabling the browser to provide more personalized page displays in subsequent presentations, enhancing its adaptability to different user behaviors and needs. By continuously learning and adapting to user behavior patterns through real-time updates to the page information sample set, more accurate page displays and zoom ratio recommendations are provided during subsequent browsing.
[0119] Specifically, after a page loads in the browser, users manually adjust the page's zoom level using methods such as the mouse wheel, keyboard shortcuts, or zoom buttons on the browser interface. This user interaction results in immediate changes to the page display, including changes in the size of elements such as text, images, and videos. The user's adjustment of the zoom level reflects their personalized needs for the page's display. At this point, the browser needs to be able to capture these changes in real time and make subsequent adjustments to ensure that the subsequent page display conforms to the user's habits and requirements.
[0120] Once a user adjusts the page zoom level, the page information sample set is updated accordingly. Updates may include the modified page zoom level, adjusted page element sizes, and revised page layout. Specifically, during the update process, this new page display information is added to the page information sample set, along with its corresponding zoom level.
[0121] By updating the page information sample set, the system can ensure that future zoom ratio predictions for the page are more accurate and can reflect the user's latest preferences.
[0122] As the page information sample set is updated, the server will retrain or optimize the user preference model based on the new sample set in order to improve the accuracy of predicting the page scaling ratio.
[0123] The next time a user visits the page, the updated sample set can be referenced to more accurately adjust the page scaling ratio and ensure that the page display meets the user's needs.
[0124] It should be noted that in the above embodiments, when the page information in the browser page that the user wants to access is the same as any page information sample in the above page information sample set, the corresponding scaling tag can be directly used as the target scaling ratio.
[0125] The following describes an apparatus embodiment of this application, which can be used to execute the browser page processing method in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the browser page processing method described above.
[0126] Figure 5 A block diagram of a browser page processing apparatus according to an embodiment of this application is shown.
[0127] Reference Figure 5 As shown, a browser page processing apparatus 500 according to an embodiment of this application includes: an access behavior monitoring module 510, a user preference model module 520, and a target page display module 530.
[0128] The access behavior monitoring module 510 is used to monitor user access behavior in real time and obtain page information of the corresponding browser page; the user preference model module 520 is used to input the page information into the user preference model to obtain the preference scaling ratio; and the target page display module 530 is used to display the browser page on the display interface according to the preference scaling ratio and the display interface information.
[0129] In some feasible embodiments of this application, the page information includes the resource address corresponding to the browser page; the user preference model includes a resource parsing sub-model and a scaling ratio regression sub-model; the user preference model module specifically includes: a resource address parsing sub-module, used to analyze the resource address through the resource parsing sub-model to determine the layout structure, element type, and font information of the browser page; and a user preference regression sub-module, used to input the layout structure, element type, and font information into the scaling ratio regression sub-model to obtain the ratio.
[0130] In some feasible embodiments of this application, the resource address parsing submodule specifically includes: an address parsing unit, used to parse the resource address and obtain structured tag information and font information; a DOM sequence unit, used to process the structured tag information through a DOM sequence branch network to obtain DOM sequence features; a CSS rendering unit, used to perform CSS rendering based on the resource address to obtain visual information; a visual information unit, used to process the visual information through a visual feature processing branch network to obtain visual features; and a final processing unit, used to obtain the layout structure and element type based on the DOM sequence features and the visual features.
[0131] In some feasible embodiments of this application, the user preference regression submodule specifically includes: a feature fusion unit, used to perform feature fusion on the layout structure, element type and font information to obtain a page fusion vector; and a regression processing unit, used to perform attention regression processing on the page fusion vector to obtain a preference scaling ratio.
[0132] In some feasible embodiments of this application, the target page display module specifically includes: a preference scaling correction submodule, used to correct the preference scaling ratio according to the display interface information to obtain a target scaling ratio; and a rendering interface calling submodule, used to call a rendering interface to render the browser page with the target scaling ratio and display the browser page on the display interface.
[0133] In some feasible embodiments of this application, the display interface information includes device type information and window size information; the preference scaling correction submodule specifically includes: a correction factor determination unit, used to determine a correction factor based on the device type information and window size information; and a preference scaling correction unit, used to correct the preference scaling ratio based on the correction factor to obtain a target scaling ratio.
[0134] In some feasible embodiments of this application, the browser page processing device further includes: a sample acquisition module, used to acquire user historical access data to obtain a page information sample set, wherein the page information sample set contains multiple page information samples, and each page information sample is marked with a corresponding scaling label; a sample input module, used to input each of the page information samples in the page information sample set into the user preference model one by one to obtain the corresponding scaling ratio; and a parameter update module, used to update the parameters of the user preference model according to the scaling ratio and the scaling label until a predetermined termination condition is met, thereby stopping training and obtaining a trained user preference model.
[0135] In some feasible embodiments of this application, the browser page processing device further includes: a sample update module, used to update the page information sample set in response to the user's adjustment of the browser page scaling ratio.
[0136] In the embodiments of this application, by monitoring user access behavior in real time and capturing user operation preferences, a personalized scaling ratio is generated for each user based on their historical behavior and preferences, avoiding a one-size-fits-all scaling setting. Furthermore, by combining display interface information, the page display can be automatically adjusted according to device characteristics, ensuring that users receive the best browsing experience on different devices.
[0137] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0138] It should be noted that, Figure 6 The computer system of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0139] like Figure 6 As shown, the computer system includes a Central Processing Unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1802 or programs loaded from storage portion 1808 into Random Access Memory (RAM) 1803, such as performing the methods described in the above embodiments. The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An Input / Output (I / O) interface 1805 is also connected to the bus 1804.
[0140] The following components are connected to I / O interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to I / O interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1810 as needed so that computer programs read from them can be installed into storage section 1808 as needed.
[0141] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit (CPU) 1801, it performs various functions defined in the system of this application.
[0142] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0143] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0144] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0145] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0146] This specification also provides a computer program product that stores at least one instruction, said at least one instruction being loaded and executed by the processor as described above. Figures 1-4 The method described in the illustrated embodiment can be found in the following document for a detailed execution process. Figures 1-4 The specific details of the illustrated embodiments will not be elaborated here.
[0147] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0148] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0149] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0150] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A browser page processing method, characterized in that, The browser's page processing methods include: Monitor user access behavior in real time and obtain page information of the corresponding browser page; The page information is input into the user preference model to obtain the preference scaling ratio; Based on the preferred scaling ratio and display interface information, the browser page is displayed on the display interface.
2. The browser page processing method as described in claim 1, characterized in that, The page information includes the resource address corresponding to the browser page; the user preference model includes a resource parsing sub-model and a scaling ratio regression sub-model. The step of inputting the page information into the user preference model to obtain the preference scaling ratio specifically includes: The resource address is analyzed using the resource parsing sub-model to determine the layout structure, element types, and font information of the browser page; The layout structure, element type, and font information are input into the scaling ratio regression sub-model to obtain the preferred scaling ratio.
3. The browser page processing method as described in claim 2, characterized in that, The step of analyzing the resource address through the resource parsing sub-model to determine the layout structure, element types, and font information of the browser page specifically includes: Parse the resource address to obtain structured tag information and font information; The structured tag information is processed by the DOM sequence branch network to obtain DOM sequence features; CSS rendering is performed based on the resource address to obtain visual information; The visual information is processed by a visual feature processing branch network to obtain visual features; Based on the DOM sequence features and the visual features, the layout structure and element types are obtained.
4. The browser page processing method as described in claim 2, characterized in that, The step of inputting the layout structure, element type, and font information into the scaling ratio regression sub-model to obtain the preference scaling ratio specifically includes: The layout structure, element type, and font information are fused to obtain a page fusion vector. Attention regression processing is performed on the page fusion vector to obtain the preference scaling ratio.
5. The browser page processing method as described in claim 1, characterized in that, The step of displaying the browser page on the display interface according to the preferred scaling ratio and display interface information specifically includes: Based on the display interface information, the preferred scaling ratio is corrected to obtain the target scaling ratio; The rendering interface is invoked to render the browser page at the target scaling ratio, and the browser page is displayed on the display interface.
6. The browser page processing method as described in claim 5, characterized in that, The display interface information includes device type information and window size information; The step of correcting the preferred scaling ratio based on the display interface information to obtain the target scaling ratio specifically includes: The correction factor is determined based on the device type information and window size information; The preference scaling ratio is adjusted based on the correction factor to obtain the target scaling ratio.
7. A browser page processing device, characterized in that, The browser page processing device includes: The access behavior monitoring module is used to monitor user access behavior in real time and obtain page information of the corresponding browser pages; The user preference model module is used to input the page information into the user preference model to obtain the preference scaling ratio; The target page display module is used to display the browser page on the display interface according to the preferred scaling ratio and display interface information.
8. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the browser page processing method as described in any one of claims 1 to 6.
9. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the browser page processing method as described in any one of claims 1 to 6.
10. A computer program product comprising one or more computer programs, characterized in that, When the one or more computer programs are executed by one or more processors, they implement the steps of the browser page processing method according to any one of claims 1 to 6.
