Website dynamic light and shadow rendering processing method, device, storage medium and electronic device

By optimizing web page layout parameters and dividing cell grids, dynamic rendering of website light and shadow effects is solved, the traditional rendering technology has solved the shortcomings of rich light and shadow changes and fewer areas, and efficient and adaptive rendering effects are achieved, improving user experience and resource utilization.

CN119357499BActive Publication Date: 2025-04-08HUNAN MANGO DIGITAL INTELLIGENCE ART TECH CO LTD

Patent Information

Application Number
CN202411896612.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-08
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

Traditional rendering technology with fixed subdivision levels is difficult to provide sufficient details in areas with rich light and shadow changes, and in areas with less light and shadow changes lead to waste of computing resources, lack of adaptability, and cannot dynamically adjust rendering strategies based on user behavior or environmental changes.

Method used

By obtaining the current web layout parameters of the target website's web page, using predefined multi-objective functions to optimize the web layout parameters, combining the user's attention model, calculation cost model and visual effect model, divide the web page into multiple cell grids, and dynamically render the light and shadow effects according to the state of the cell grid and its cell neighbor grid.

Benefits of technology

It realizes dynamic adaptive segmented rendering of website light and shadow effects, improves user experience and optimizes resource utilization, and can dynamically adjust rendering strategies according to user behavior and environment changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357499B_ABST
    Figure CN119357499B_ABST
Patent Text Reader

Abstract

The present invention provides a website dynamic light and shadow rendering processing method, device, storage medium and electronic device, which are applied to the field of computer technology. The present invention obtains the current web page layout parameters of the target website, including the visual attribute information of various elements, and uses a multi-objective function for optimization to obtain the optimized web page layout parameters. The multi-objective function is constructed based on the user attention model, the computational cost model and the visual effect model. The web page is divided into multiple cell grids, and the cell state at the next moment is calculated based on the state of the current cell and its neighboring cells, combined with the optimization parameters. At the next moment, all cell states are updated simultaneously, and the light and shadow effects of the target website are dynamically rendered. By optimizing the layout parameters and dynamically adjusting the light and shadow effects, the present invention realizes dynamic adaptive subdivision rendering of web pages, improves user experience and optimizes resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for dynamic light and shadow rendering processing of a website. Background Art

[0002] In modern web design, light and shadow effects are crucial to improving user experience, but traditional fixed-level rendering technology faces challenges. First, this technology has difficulty providing enough details in areas with rich light and shadow changes, such as high-resolution product images on e-commerce websites, which affect user purchasing decisions. Second, in areas with less light and shadow changes, fixed subdivision levels lead to unnecessary waste of computing resources, increase system overhead and may affect web page performance. In addition, this technology lacks adaptive capabilities and cannot dynamically adjust rendering strategies based on user behavior or environmental changes.

[0003] Therefore, how to develop more flexible rendering technology to optimize resource utilization and improve user experience has become a technical problem that technicians in this field urgently need to solve. Summary of the invention

[0004] In view of the above problems, the present invention provides a website dynamic light and shadow rendering processing method, device, storage medium and electronic device that overcome the above problems or at least partially solve the above problems. The technical solution is as follows:

[0005] A website dynamic light and shadow rendering processing method, comprising:

[0006] Obtaining current web page layout parameters of a web page of a target website, wherein the current web page layout parameters include visual attribute information of multiple elements on the target website;

[0007] Optimizing the current webpage layout parameters using a predefined multi-objective function to obtain optimized webpage layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model, and a visual effect model;

[0008] Dividing the webpage of the target website into a plurality of cell grids;

[0009] For any of the cell grids: based on the first cell states of the cell grid and its cell neighbor grids at the current moment, combined with the optimized web page layout parameters, calculate the second cell state of the cell grid at the next moment;

[0010] At the next moment, each of the cell grids is simultaneously updated from the respective first cell states to the corresponding second cell states, so as to dynamically render the light and shadow effects of the webpage of the target website.

[0011] Optionally, the using a predefined multi-objective function to optimize the current webpage layout parameters to obtain the optimized webpage layout parameters of the target website includes:

[0012] Respectively obtaining model evaluation results of the user attention model, the computational cost model, and the visual effect model under the current webpage layout parameters;

[0013] Based on the evaluation results of each model and its corresponding weight coefficient, a multi-objective function is constructed;

[0014] The gradient of the multi-objective function is calculated, and the current web page layout parameters are updated using a gradient descent method to obtain the optimized web page layout parameters of the target website.

[0015] Optionally, the multi-objective function is defined as:

[0016]

[0017] in, is the current web page layout parameter; is the user attention model; for the computational cost model; It is a visual effects model; , , is the weight coefficient, satisfying + + =1.

[0018] Optionally, calculating the gradient of the multi-objective function, updating the current web page layout parameters using a gradient descent method, and obtaining the optimized web page layout parameters of the target website includes:

[0019] Calculate the gradient of the multi-objective function:

[0020]

[0021] in, The current web page layout parameters include all parameters that need to be optimized. , … , is the gradient of the multi-objective function;

[0022] Update the current webpage layout parameters according to the calculated gradient of the multi-objective function:

[0023]

[0024] in, is the learning rate, The updated web page layout parameters;

[0025] The above steps are repeated until a preset convergence condition is reached, and the last updated web page layout parameters are confirmed as the optimized web page layout parameters of the target website.

[0026] Optionally, after calculating the gradient of the multi-objective function, updating the current webpage layout parameters using the gradient descent method, and obtaining the optimized webpage layout parameters of the target website, the method further includes:

[0027] Obtaining user interaction data on the webpage of the target website;

[0028] Using the interaction data to adjust algorithm parameters of the multi-objective function, wherein the algorithm parameters include the weight coefficient and / or the learning rate;

[0029] Based on the adjusted algorithm parameters, the step of calculating the gradient of the multi-objective function is re-executed, and the current web page layout parameters are updated using the gradient descent method to obtain the optimized web page layout parameters of the target website.

[0030] Optionally, the calculating of the second cell state of the cell grid at the next moment based on the first cell state of the cell grid and its cell neighbor grids at the current moment in combination with the optimized webpage layout parameters includes:

[0031] The first cell state of the cell grid and its cell neighbor grid at the current moment and the optimized web page layout parameters are input into the formula:

[0032]

[0033] The second cell state of the cell grid at the next moment is obtained, wherein: is the second cell state of the cell grid at the next moment, is the state transition function of the cellular automaton, is the cell grid at the current moment The first cell state; is the cell neighbor grid of the cell grid at the current moment The cell state set; is the optimized web page layout parameter.

[0034] Optionally, the visual attribute information includes brightness and saturation of at least one of a product picture area, a product video area, and a text description area on the webpage of the target website.

[0035] A website dynamic light and shadow rendering processing device comprises: a current web page layout parameter obtaining unit, an optimized web page layout parameter obtaining unit, a cell grid division unit, a cell state calculation unit and a cell state update unit.

[0036] The current webpage layout parameter obtaining unit is used to obtain the current webpage layout parameters of the webpage of the target website, wherein the current webpage layout parameters include visual attribute information of various elements on the target website;

[0037] The optimized web page layout parameter obtaining unit is used to optimize the current web page layout parameters using a predefined multi-objective function to obtain the optimized web page layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model, and a visual effect model;

[0038] The cell grid division unit is used to divide the webpage of the target website into a plurality of cell grids;

[0039] The cell state calculation unit is used to calculate, for any of the cell grids, a second cell state of the cell grid at a next moment based on the first cell state of the cell grid and its cell neighbor grids at the current moment and in combination with the optimized web page layout parameters;

[0040] The cell state updating unit is used to simultaneously update each of the cell grids from their respective first cell states to corresponding second cell states at the next moment, so as to dynamically render the light and shadow effects of the webpage of the target website.

[0041] A computer-readable storage medium stores a program, which, when executed by a processor, implements the above-mentioned website dynamic light and shadow rendering processing method.

[0042] An electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the above-mentioned website dynamic light and shadow rendering processing method.

[0043] By means of the above technical scheme, the website dynamic light and shadow rendering processing method, device, storage medium and electronic device provided by the present invention obtain the current web page layout parameters of the web page of the target website, wherein the current web page layout parameters include the visual attribute information of multiple elements on the target website; use a predefined multi-objective function to optimize the current web page layout parameters, and obtain the optimized web page layout parameters of the target website, wherein the multi-objective function is constructed based on the user attention model, the computational cost model and the visual effect model; divide the web page of the target website into multiple cell grids; for any cell grid: based on the first cell state of the cell grid and its cell neighbor grid at the current moment, combined with the optimized web page layout parameters, calculate the second cell state of the cell grid at the next moment; at the next moment, simultaneously update each cell grid from its respective first cell state to the corresponding second cell state, so as to dynamically render the light and shadow effects of the web page of the target website. The present invention optimizes the web page layout parameters of the website in combination with the user attention, computational cost and visual effect model, divides the web page into multiple cell grids, and each cell grid dynamically updates the light and shadow effects, thereby realizing the dynamic adaptive subdivision rendering of the light and shadow effects of the website, improving the user experience and optimizing the resource utilization.

[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0046] Figure 1 A schematic diagram showing a flow chart of an implementation of a method for dynamic light and shadow rendering of a website provided by an embodiment of the present invention;

[0047] Figure 2 A schematic flow chart showing another implementation of a website dynamic light and shadow rendering processing method provided by an embodiment of the present invention;

[0048] Figure 3 A logic block diagram of web page layout parameter optimization provided by an embodiment of the present invention is shown;

[0049] Figure 4 A schematic flow chart showing the key parts of the website dynamic light and shadow rendering processing method provided by an embodiment of the present invention;

[0050] Figure 5 A schematic diagram showing the structure of a device for dynamic light and shadow rendering processing of a website provided by an embodiment of the present invention is shown;

[0051] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0052] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0053] In modern web design, light and shadow effects have become an important factor in improving user experience. As users' requirements for visual experience increase, traditional rendering technology with fixed subdivision levels is unable to meet their needs. Although this method is simple to implement and suitable for some basic scenarios, it has some obvious limitations when dealing with complex light and shadow effects.

[0054] First, in terms of rendering effects, fixed subdivision levels have difficulty dealing with areas with rich light and shadow changes, such as product detail pages on e-commerce websites. These pages often contain high-resolution product images and videos, and subtle differences in light and shadow effects may directly affect users' purchasing decisions. However, fixed subdivision levels cannot provide enough details, resulting in suboptimal rendering effects in high-contrast areas, and image details cannot be clearly displayed.

[0055] Secondly, fixed subdivision levels may lead to a waste of computing resources. In areas with less light and shadow changes, such as the text area of ​​the product details page, using high-precision rendering will cause unnecessary computing burden. This not only increases system overhead, but may also affect the loading speed and response performance of the web page.

[0056] Finally, existing rendering techniques lack the ability to adapt themselves and cannot dynamically adjust rendering strategies based on user behavior or environmental changes. When users browse the same content at different time periods, changes in ambient light should be reflected in the rendering effect. However, rendering methods with fixed subdivision levels lack this flexibility and cannot adjust according to real-time changes.

[0057] Therefore, in order to overcome these challenges and improve web page rendering effects, more adaptable rendering technologies need to be developed urgently. This will help optimize resource usage, improve user experience, and meet changing user needs.

[0058] Based on this, in an embodiment of the present invention, a method for dynamic light and shadow rendering of a website is provided, which aims to overcome the problems of fixed layout, static light and shadow effects, and waste of resources in traditional website rendering technology. The method combines the biomorphic optimization algorithm and cellular automata technology. Specifically, the website layout parameters are improved by the biomorphic optimization algorithm, and then the cellular automata are used to adjust the light and shadow effects of the website in real time according to the optimized parameters. In addition, the method continuously optimizes the parameters of the biomorphic optimization algorithm according to user behavior data. This comprehensive method ultimately realizes the adaptive subdivision rendering of dynamic light and shadow of the website, thereby effectively improving the user experience and optimizing resource utilization.

[0059] like Figure 1 As shown, a flowchart of an implementation of a website dynamic light and shadow rendering processing method provided by an embodiment of the present invention is provided. The method may include:

[0060] S100: Obtain current web page layout parameters of a web page of a target website, wherein the current web page layout parameters include visual attribute information of multiple elements on the target website.

[0061] Among them, web page layout parameters refer to a set of parameters used to define and describe the structure and organization of a web page. These parameters determine the position, size, alignment, and hierarchical relationship of each element in the web page.

[0062] Elements are the basic components of a web page. Each web page element can be an HTML tag such as text, image, video, button, form, link, etc.

[0063] Among them, visual attribute information refers to the attributes related to the appearance and visual performance of web page elements. Visual attribute information includes brightness, saturation, texture, etc. Visual attribute information determines the visual style of web page elements and the visual experience of users when browsing.

[0064] Optionally, the visual attribute information may include brightness and saturation of at least one of a product image area, a product video area, and a text description area on the webpage of the target website.

[0065] Specifically, the embodiment of the present invention can parse the webpage source code based on the initial structure data (HTML / CSS / JavaScript) of the webpage, extract the position, size, type and other information of all elements, and initialize the layout parameters according to the type and position of the element, including visual attribute information such as brightness, saturation, texture, etc.

[0066] The initialization setting of web page layout parameters is mainly based on the display requirements and performance requirements of elements. On e-commerce websites, product images, product videos and text descriptions are all important elements, and the visual attribute settings of each element have their own specific considerations. Product images are very important elements on e-commerce websites. High brightness can better display the details of the product, so high brightness and saturation are required to highlight the product and attract the user's attention. The content of the product video itself contains relatively rich color information, so there is no need to set too high brightness. In addition, since video content requires more computing resources to process and render than images and text, in order to balance performance, the brightness and saturation of the video are appropriately reduced. Text descriptions are mainly used for information transmission. In order not to interfere with other key elements, the brightness of the text is low while maintaining good readability. Therefore, product images require high brightness and saturation to highlight the product and attract the user's attention. The brightness and saturation of the product video are appropriately reduced to balance the rich color information and computing resource requirements. The brightness of the text description is low to ensure that it does not interfere with other key elements while maintaining readability. For example: for product images, the initial brightness is set to 0.8 and the saturation is 0.7; for product videos, the initial brightness is set to 0.6 and the saturation is 0.5; for the text description area, the initial brightness is set to 0.4.

[0067] The embodiment of the present invention uses web page layout parameter initialization, extracts web page elements by parsing web page structure data, and initializes web page layout parameters to provide basic parameters for subsequent optimization.

[0068] S110. Optimizing the current web page layout parameters using a predefined multi-objective function to obtain optimized web page layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model, and a visual effect model.

[0069] In the scenario of optimizing the web page layout of an e-commerce website, it is necessary to consider the user's attention to different areas, the consumption of computing resources, and the overall visual effect. The multi-objective function is an optimization algorithm that combines the objectives of the user attention model, the computing cost model, and the visual effect model.

[0070] Among them, the user attention model targets the product image area in the web page. Product images are one of the most eye-catching elements on e-commerce websites. Users usually look closely at product images to understand the appearance and details of the product. The user attention model measures the user's attention to the area by calculating the sum of the attention scores of each cell in the product image area. The attention indicators involved in the user attention model include the user's gaze dwell time, click-through rate, and scrolling behavior.

[0071] Among them, the computational cost model targets the product video area in the web page. Video content requires more computing resources to process and render than images and text, especially at HD or full HD resolution. The computational cost model measures the computational cost by calculating the sum of the computational cost scores for each cell in the product video area. The computational cost model involves computational cost indicators that assess the impact of video playback on user device performance, such as CPU and memory usage, battery consumption, and data transfer volume.

[0072] Among them, the visual effect model targets the text description area in the web page. Although text descriptions are not as intuitive as pictures and videos to attract users, good text layout and design can enhance the overall visual aesthetics and help users better understand product information. The visual effect model measures the visual effect by calculating the sum of the visual effect scores of each cell in the text description area. The visual effect indicators involved in the visual effect model include font readability, color saturation matching, and layout clarity.

[0073] When optimizing the webpage layout of an e-commerce website, the user attention model, computational cost model, and visual effect model are evaluated for the product image area, product video area, and text description area respectively. Each model calculates the sum of the scores of each cell in the relevant area to help determine the best layout solution to balance user attention, computational resource consumption, and overall visual effect.

[0074] S120, dividing the web pages of the target website into a plurality of cell grids.

[0075] Each cell grid is a unit of a two-dimensional grid, and its size and number vary according to the type and characteristics of the web page content.

[0076] Specifically, the embodiment of the present invention can divide the web page into a two-dimensional grid, and each grid point is regarded as a "cell", that is, a cell grid. Different types of content areas are divided into cells of different numbers and sizes according to their characteristics.

[0077] Optionally, the embodiment of the present invention can subdivide the product image area in the webpage into 800x800 cells. Each cell is 1x1 pixel in size. The embodiment of the present invention can capture the user's attention distribution on the product image in detail through this high-resolution division method, helping to optimize the image display effect.

[0078] Optionally, the embodiment of the present invention can subdivide the video playback area in the webpage into 40x30 cells. Each cell represents an area in the video frame. The embodiment of the present invention can effectively measure the consumption of computing resources by video playback through this video division method, especially at high-definition or full-high-definition resolution.

[0079] Optionally, the embodiment of the present invention can subdivide the text description area in the webpage into 20x10 cells. Each cell represents a part of the text line. The embodiment of the present invention helps to evaluate the visual effect of text layout and design through this text division method, thereby improving the overall aesthetics of the page and the efficiency of information transmission.

[0080] Specifically, the embodiment of the present invention can initialize the cell state of each cell grid based on the optimized web page layout parameters obtained after multi-objective function optimization. For example, the cell grid in the product image area has a brightness of 0.9 and a saturation of 0.65 after state initialization. The cell grid in the video playback area has a brightness of 0.7 and a saturation of 0.45 after state initialization. The cell grid in the text description area has a brightness of 0.5 and a saturation of 0.6 after state initialization.

[0081] It should be noted that the state initialization of the cell grid is not a simple restoration to the initialization settings of the original web page layout parameters, but a refined initialization based on the layout parameters optimized by the multi-objective function. This means that the cell state of each cell grid has been integrated into the globally optimized layout parameters, ensuring that the state of each cell is consistent with the overall optimized layout parameters. State initialization ensures that each content area is re-optimized based on the consideration of the global layout parameters, thereby achieving a more precise optimization effect.

[0082] S130, for any cell grid: based on the first cell state of the cell grid and its cell neighbor grids at the current moment, combined with the optimized web page layout parameters, calculate the second cell state of the cell grid at the next moment.

[0083] The cell state refers to the parameter value that describes the visual properties of the cell grid. For example, the cell state of a cell grid can be a brightness value.

[0084] Among them, the cell neighbor grid is all neighboring cells that are in direct contact with the current cell grid, which can include neighboring cells located on the four sides of the current cell grid (up, down, left, right) and neighboring cells at the four corners (diagonal direction). This adjacency relationship constitutes a neighborhood surrounding the cell grid, in which each neighboring cell can influence or be influenced, thereby realizing the interaction and propagation of the state. For example, the cell neighbor grid can be the 8 adjacent cell grids around the current cell grid. In the framework of cellular automata, the cell state of the current cell will be affected by the state of its neighboring cells.

[0085] Optionally, the embodiment of the present invention may use a predefined cellular automaton state transition function, combined with the optimized web page layout parameters, the first cell state of the cell grid and its cell neighbor grids at the current moment, to calculate the second cell state of the cell grid at the next moment.

[0086] Among them, the cellular automaton state transition function is used to calculate the cell state of the next time step according to the state of the current and neighboring cells, and the optimized layout parameters. The cellular automaton state transition function can update the cell state according to the rules. For example: if the brightness of the neighboring cell is higher than the current cell, the brightness of the current cell increases. If the saturation of the neighboring cell is lower than the current cell, the saturation of the current cell decreases. The embodiment of the present invention utilizes the adaptive light and shadow effects of cellular automaton technology, which can adjust the visual presentation of the web page in real time according to the changes in ambient light and user preferences, providing users with a consistent high-quality visual experience.

[0087] Optional, in the above Figure 1 On the basis of one or more corresponding embodiments, another optional embodiment provided by the embodiment of the present invention, based on the first cell state of the cell grid and its cell neighbor grids at the current moment, combined with the optimized web page layout parameters, calculating the second cell state of the cell grid at the next moment may specifically include:

[0088] Input the first cell state of the cell grid and its cell neighbor grid at the current moment and the optimized web page layout parameters into the formula:

[0089]

[0090] The second cell state of the cell grid at the next moment is obtained, wherein: is the second cell state of the cell grid at the next moment, is the state transition function of the cellular automaton, is the cell grid at the current moment The first cell state; is the cell neighbor grid of the cell grid at the current moment The cell state set; is the optimized web page layout parameter.

[0091] The embodiment of the present invention uses cellular automaton technology to dynamically adjust the cell state of each cell grid according to the optimized layout parameters, thereby achieving a natural transition of local light and shadow effects.

[0092] The embodiment of the present invention combines the biomorphic optimization algorithm with the cellular automaton technology to achieve dynamic adjustment of the website's light and shadow to match the user's attention and behavior patterns, and at the same time achieves real-time optimization of the light and shadow effects through the cellular automaton technology. This method not only significantly improves the efficiency of computing resources and reduces energy consumption, but also ensures a smooth user experience under different devices and network environments.

[0093] S140. At the next moment, simultaneously update each cell grid from its respective first cell state to a corresponding second cell state, so as to dynamically render the light and shadow effects of the web page of the target website.

[0094] Specifically, the embodiments of the present invention can update the cell state of each cell grid by applying local rules, form a new visual effect, and realize dynamic rendering.

[0095] The present invention provides a method for processing dynamic light and shadow rendering of a website, the method comprising: obtaining the current webpage layout parameters of a webpage of a target website, wherein the current webpage layout parameters include visual attribute information of multiple elements on the target website; optimizing the current webpage layout parameters using a predefined multi-objective function to obtain the optimized webpage layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model, and a visual effect model; dividing the webpage of the target website into a plurality of cell grids; for any cell grid: based on the first cell state of the cell grid and its cell neighbor grid at the current moment, combined with the optimized webpage layout parameters, calculating the second cell state of the cell grid at the next moment; at the next moment, simultaneously updating each cell grid from its respective first cell state to the corresponding second cell state, so as to dynamically render the light and shadow effects of the webpage of the target website. The present invention optimizes the webpage layout parameters of the website in combination with the user attention, computational cost, and visual effect model, divides the webpage into a plurality of cell grids, and each cell grid dynamically updates the light and shadow effects, thereby realizing the dynamic adaptive subdivision rendering of the light and shadow effects of the website, improving the user experience and optimizing the resource utilization.

[0096] Optional, based on Figure 1 The method shown, such as Figure 2 As shown, a flowchart of another implementation of a website dynamic light and shadow rendering processing method provided by an embodiment of the present invention is shown, and step S110 may specifically include:

[0097] S200, respectively obtaining model evaluation results of the user attention model, the computational cost model and the visual effect model under the current web page layout parameters.

[0098] S210: Construct a multi-objective function based on the evaluation results of each model and its corresponding weight coefficient.

[0099] Optionally, a multi-objective function is defined as:

[0100]

[0101] in, The current web page layout parameters; It is the user attention model; To calculate the cost model; It is a visual effects model; , , is the weight coefficient, satisfying + + =1.

[0102] Among them, the multi-objective function Used to evaluate the current layout parameters quality.

[0103] in, , , They correspond to the weight of the user attention model, the weight of the computational cost model, and the weight of the visual effect model respectively. Set to 0.6, Set to 0.3, Set to 0.1.

[0104] S220, calculating the gradient of the multi-objective function, using the gradient descent method to update the current web page layout parameters, and obtaining the optimized web page layout parameters of the target website.

[0105] Among them, the gradient of the multi-objective function is the objective function with respect to the current web page layout parameters The derivative vector of represents the direction and magnitude of the influence of each parameter on the objective function.

[0106] Figure 3 The figure shows a logic block diagram of web page layout parameter optimization provided by an embodiment of the present invention. The web page layout parameter optimization is based on the initial web page layout parameters to improve the light and shadow effects and save resources. Specifically, the layout parameters of web page elements are optimized through a multi-objective function to ensure that the layout parameters can meet the optimization requirements of the three aspects of user attention, computational cost model and visual effect model, so as to achieve the best layout effect.

[0107] Optional, in the above Figure 2 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, the gradient of the multi-objective function is calculated, and the current web page layout parameters are updated using the gradient descent method to obtain the optimized web page layout parameters of the target website, which may specifically include:

[0108] Compute the gradient of a multi-objective function:

[0109]

[0110] in, The current web page layout parameters, including all parameters that need to be optimized , … , is the gradient of the multi-objective function.

[0111] For example: Current web page layout parameters Can include the brightness of the product image area , the saturation of the product image area , the brightness of the product video area , the saturation of the product video area , the brightness of the text description area , then calculate the gradient of the multi-objective function:

[0112]

[0113]

[0114]

[0115]

[0116]

[0117]

[0118] Update the current web page layout parameters according to the calculated gradient of the multi-objective function:

[0119]

[0120] in, is the learning rate, The updated web page layout parameters.

[0121] The learning rate is used to control the step size of each update. The choice of learning rate has an important impact on the speed and stability of the optimization process, and the optimal learning rate can be determined by experiment. Optionally, the embodiment of the present invention can set the initial learning rate to 0.01, and then gradually reduce the learning rate according to the number of iterations.

[0122] Repeat the above steps until the preset convergence condition is reached, and confirm the last updated web page layout parameters as the optimized web page layout parameters of the target website.

[0123] Optionally, the preset convergence condition can be set as the modulus of the gradient is less than a preset threshold ,For example =0.001.

[0124] The embodiment of the present invention uses a biomorphic optimization algorithm to dynamically adjust layout parameters according to the gradient of the objective function to optimize light and shadow effects and resource utilization.

[0125] Optional, in the above Figure 2 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present invention, after calculating the gradient of the multi-objective function, using the gradient descent method to update the current web page layout parameters, and obtaining the optimized web page layout parameters of the target website, the method further includes:

[0126] Obtaining user interaction data on a web page of a target website; using the interaction data to adjust algorithm parameters of a multi-objective function, wherein the algorithm parameters include weight coefficients and / or learning rates; based on the adjusted algorithm parameters, recalculating the gradient of the multi-objective function, using a gradient descent method to update current web page layout parameters, and obtaining the steps of optimized web page layout parameters of the target website.

[0127] The interactive data is the data generated by the user's interactive behavior on the web page. The interactive data may include the click rate and dwell time of the user on the web page. For example, the interactive data may include the dwell time of the user in the product image area.

[0128] The embodiment of the present invention uses user feedback data to continuously adjust the parameters of the optimization algorithm, which can keenly perceive user behavior and preferences and dynamically adjust the layout of web page elements. This adjustment simulates the natural selection and biological adaptation process through the biomorphic optimization algorithm to find the layout solution that best suits the current user behavior. This dynamic layout not only attracts and maintains user attention, but also can be adjusted in real time according to user interaction, ensuring that the content presentation always meets user expectations and needs.

[0129] In summary, if Figure 4 As shown, the website dynamic light and shadow rendering processing method provided by the embodiment of the present invention mainly includes four key parts: web page layout parameter initialization, web page layout parameter optimization, web page light and shadow adjustment, and user feedback optimization. These four parts constitute a closed-loop optimization process, from generating optimal layout parameters to dynamically adjusting local light and shadow effects, and then to real-time feedback and system performance optimization, so that the website content is more attractive to users, and maintains efficient resource utilization and good user experience.

[0130] In the optimization of web page layout parameters, the embodiment of the present invention generates optimal layout parameters based on user behavior data and visual effect evaluation indicators through a biomorphic optimization algorithm. These parameters include the brightness and saturation of the product image area, product video area, and text description area. The algorithm simulates the process of natural selection and genetic variation, and continuously iterates to find a combination of layout parameters that can maximize user attention scores, minimize computational costs, and improve visual effects.

[0131] In the web page light and shadow adjustment, the embodiment of the present invention uses the optimized layout parameters obtained by optimizing the web page layout parameters to dynamically adjust the state of page elements through the cellular automaton state update mechanism. Specifically, the cellular automaton divides the page into multiple cells, and updates the brightness, saturation and other attributes in real time according to the state of each cell and its neighbors, as well as the optimized layout parameters, to achieve a natural transition of local light and shadow effects.

[0132] In user feedback optimization, the embodiments of the present invention use user feedback data to continuously adjust optimization algorithm parameters to ensure that the rendering effect always meets user expectations.

[0133] The embodiment of the present invention optimizes the web page rendering process by finely managing computing resources. Combining the biomorphic optimization algorithm with the cellular automaton technology, it not only focuses on the optimization of a single element, but also starts from the overall process to achieve global optimization of the entire web page rendering process. This optimization reduces unnecessary computing overhead, reduces energy consumption, and improves efficiency. While ensuring user experience, it reduces the burden on the server and achieves the sustainability of website operations.

[0134] Although operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.

[0135] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0136] Corresponding to the above method embodiment, the embodiment of the present invention also provides a website dynamic light and shadow rendering processing device, whose structure is as follows: Figure 5 As shown, it includes: a current web page layout parameter obtaining unit 10, an optimized web page layout parameter obtaining unit 20, a cell grid division unit 30, a cell state calculation unit 40 and a cell state update unit 50.

[0137] The current web page layout parameter obtaining unit 10 is used to obtain the current web page layout parameters of the web page of the target website, wherein the current web page layout parameters include visual attribute information of various elements on the target website.

[0138] The optimized web page layout parameter obtaining unit 20 is used to optimize the current web page layout parameters using a predefined multi-objective function to obtain the optimized web page layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model and a visual effect model.

[0139] The cell grid division unit 30 is used to divide the web pages of the target website into a plurality of cell grids.

[0140] The cell state calculation unit 40 is used to calculate, for any cell grid, a second cell state of the cell grid at the next moment based on the first cell state of the cell grid and its cell neighbor grids at the current moment and in combination with the optimized web page layout parameters.

[0141] The cell state updating unit 50 is used to simultaneously update each cell grid from its respective first cell state to a corresponding second cell state at the next moment, so as to dynamically render the light and shadow effects of the web page of the target website.

[0142] Optionally, the optimized web page layout parameter obtaining unit 20 may include: a model evaluation result obtaining subunit, a multi-objective function building subunit and a web page layout parameter updating subunit.

[0143] The model evaluation result obtaining subunit is used to obtain the model evaluation results of the user attention model, the computational cost model and the visual effect model under the current web page layout parameters respectively.

[0144] The multi-objective function construction subunit is used to construct a multi-objective function based on the evaluation results of each model and its corresponding weight coefficients.

[0145] The web page layout parameter updating subunit is used to calculate the gradient of the multi-objective function, use the gradient descent method to update the current web page layout parameters, and obtain the optimized web page layout parameters of the target website.

[0146] Optionally, a multi-objective function is defined as:

[0147]

[0148] in, The current web page layout parameters; It is the user attention model; To calculate the cost model; It is a visual effects model; , , is the weight coefficient, satisfying + + =1.

[0149] Optionally, the web page layout parameter update subunit is used to calculate the gradient of the multi-objective function:

[0150]

[0151] in, The current web page layout parameters, including all parameters that need to be optimized , … , is the gradient of the multi-objective function;

[0152] Update the current web page layout parameters according to the calculated gradient of the multi-objective function:

[0153]

[0154] in, is the learning rate, The updated web page layout parameters;

[0155] Until the preset convergence condition is reached, the last updated web page layout parameters are confirmed as the optimized web page layout parameters of the target website.

[0156] Optionally, the website dynamic light and shadow rendering processing device may further include: a user feedback optimization unit.

[0157] The user feedback optimization unit is used for the web page layout parameter updating subunit to calculate the gradient of the multi-objective function, use the gradient descent method to update the current web page layout parameters, obtain the optimized web page layout parameters of the target website, and then obtain the user's interaction data on the web page of the target website; use the interaction data to adjust the algorithm parameters of the multi-objective function, wherein the algorithm parameters include weight coefficients and / or learning rates; based on the adjusted algorithm parameters, re-trigger the web page layout parameter updating subunit.

[0158] Optionally, the cell state calculation unit may be specifically used to input the first cell state of the cell grid and its cell neighbor grid at the current moment and the optimized web page layout parameters into the formula:

[0159]

[0160] The second cell state of the cell grid at the next moment is obtained, wherein: is the second cell state of the cell grid at the next moment, is the state transition function of the cellular automaton, is the cell grid at the current moment The first cell state; is the cell neighbor grid of the cell grid at the current moment The cell state set; is the optimized web page layout parameter.

[0161] Optionally, the visual attribute information includes brightness and saturation of at least one of a product image area, a product video area, and a text description area on the webpage of the target website.

[0162] The present invention provides a website dynamic light and shadow rendering processing device, which is used to: obtain the current web page layout parameters of the web page of the target website, wherein the current web page layout parameters include visual attribute information of multiple elements on the target website; use a predefined multi-objective function to optimize the current web page layout parameters to obtain the optimized web page layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model and a visual effect model; divide the web page of the target website into multiple cell grids; for any cell grid: based on the first cell state of the cell grid and its cell neighbor grid at the current moment, combined with the optimized web page layout parameters, calculate the second cell state of the cell grid at the next moment; at the next moment, simultaneously update each cell grid from its respective first cell state to the corresponding second cell state, so as to dynamically render the light and shadow effects of the web page of the target website. The present invention optimizes the web page layout parameters of the website in combination with the user attention, computational cost and visual effect model, divides the web page into multiple cell grids, and each cell grid dynamically updates the light and shadow effects, thereby realizing the dynamic adaptive subdivision rendering of the light and shadow effects of the website, improving the user experience and optimizing the resource utilization.

[0163] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0164] The website dynamic light and shadow rendering processing device includes a processor and a memory. The above-mentioned current web page layout parameter acquisition unit 10, optimized web page layout parameter acquisition unit 20, cell grid division unit 30, cell state calculation unit 40 and cell state update unit 50 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0165] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set. By adjusting the kernel parameters to combine the biomorphic optimization algorithm with the cellular automation technology, dynamic adjustment of the website layout, adaptive optimization of light and shadow effects, and efficient use of resources can be achieved, providing users with a richer, smoother and energy-saving browsing experience, while bringing higher operational efficiency and performance to website operators.

[0166] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the website dynamic light and shadow rendering processing method is implemented.

[0167] An embodiment of the present invention provides a processor, which is used to run a program, wherein the website dynamic light and shadow rendering processing method is executed when the program is running.

[0168] like Figure 6 As shown, an embodiment of the present invention provides an electronic device 1000, which includes at least one processor 1001, at least one memory 1002 and a bus 1003 connected to the processor 1001; wherein the processor 1001 and the memory 1002 communicate with each other through the bus 1003; the processor 1001 is used to call the program instructions in the memory 1002 to execute the above-mentioned website dynamic light and shadow rendering processing method. The electronic device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0169] The present invention also provides a computer program product, which, when executed on an electronic device, is suitable for executing a program that initializes the steps of a website dynamic light and shadow rendering processing method.

[0170] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, electronic devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0171] In a typical configuration, an electronic device includes one or more processors (CPU), a memory, and a bus. The electronic device may also include an input / output interface, a network interface, and the like.

[0172] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0173] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0174] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0175] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0176] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0177] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0178] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A website dynamic light and shadow rendering processing method, characterized in that: include: Obtaining current web page layout parameters of a web page of a target website, wherein the current web page layout parameters include visual attribute information of multiple elements on the target website; Optimizing the current webpage layout parameters using a predefined multi-objective function to obtain optimized webpage layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model, and a visual effect model; Dividing the webpage of the target website into a plurality of cell grids; For any of the cell grids: based on the first cell states of the cell grid and its cell neighbor grids at the current moment, combined with the optimized web page layout parameters, calculate the second cell state of the cell grid at the next moment; At the next moment, simultaneously updating each of the cell grids from the respective first cell states to the corresponding second cell states, so as to dynamically render the light and shadow effects of the webpage of the target website; The method of optimizing the current web page layout parameters using a predefined multi-objective function to obtain the optimized web page layout parameters of the target website includes: Respectively obtaining model evaluation results of the user attention model, the computational cost model, and the visual effect model under the current webpage layout parameters; Based on the evaluation results of each model and its corresponding weight coefficient, a multi-objective function is constructed; The gradient of the multi-objective function is calculated, and the current web page layout parameters are updated using a gradient descent method to obtain the optimized web page layout parameters of the target website.

2. The method according to claim 1, characterized in that The multi-objective function is defined as: in, is the current web page layout parameter; is the user attention model; for the computational cost model; It is a visual effects model; , , is the weight coefficient, satisfying + + =1.

3. The method according to claim 2, characterized in that The step of calculating the gradient of the multi-objective function, updating the current web page layout parameters using a gradient descent method, and obtaining the optimized web page layout parameters of the target website includes: Calculate the gradient of the multi-objective function: in, The current web page layout parameters include all parameters that need to be optimized. , … , is the gradient of the multi-objective function; Update the current webpage layout parameters according to the calculated gradient of the multi-objective function: in, is the learning rate, The updated web page layout parameters; The above steps are repeated until a preset convergence condition is reached, and the last updated web page layout parameters are confirmed as the optimized web page layout parameters of the target website.

4. The method according to claim 3, characterized in that After calculating the gradient of the multi-objective function, updating the current webpage layout parameters using the gradient descent method, and obtaining the optimized webpage layout parameters of the target website, the method further includes: Obtaining user interaction data on the webpage of the target website; Using the interaction data to adjust algorithm parameters of the multi-objective function, wherein the algorithm parameters include the weight coefficient and / or the learning rate; Based on the adjusted algorithm parameters, the step of calculating the gradient of the multi-objective function is re-executed, and the current web page layout parameters are updated using the gradient descent method to obtain the optimized web page layout parameters of the target website.

5. The method according to claim 1, characterized in that The calculating of the second cell state of the cell grid at the next moment based on the first cell state of the cell grid and its cell neighbor grids at the current moment and combining the optimized webpage layout parameters comprises: The first cell state of the cell grid and its cell neighbor grid at the current moment and the optimized web page layout parameters are input into the formula: The second cell state of the cell grid at the next moment is obtained, wherein: is the second cell state of the cell grid at the next moment, is the state transition function of the cellular automaton, is the cell grid at the current moment The first cell state; is the cell neighbor grid of the cell grid at the current moment The cell state set; is the optimized web page layout parameter.

6. The method according to claim 1, characterized in that The visual attribute information includes the brightness and saturation of at least one area among a commodity picture area, a product video area, and a text description area on the webpage of the target website.

7. A website dynamic light and shadow rendering processing device, characterized in that: include: a current web page layout parameter obtaining unit, an optimized web page layout parameter obtaining unit, a cell grid division unit, a cell state calculation unit and a cell state update unit, The current web page layout parameter obtaining unit is used to obtain the current web page layout parameters of the web page of the target website, wherein the current web page layout parameters include visual attribute information of various elements on the target website; The optimized web page layout parameter obtaining unit is used to optimize the current web page layout parameters using a predefined multi-objective function to obtain the optimized web page layout parameters of the target website, wherein the multi-objective function is constructed based on a user attention model, a computational cost model, and a visual effect model; The cell grid division unit is used to divide the webpage of the target website into a plurality of cell grids; The cell state calculation unit is used to calculate, for any of the cell grids, a second cell state of the cell grid at a next moment based on the first cell state of the cell grid and its cell neighbor grids at the current moment and in combination with the optimized web page layout parameters; The cell state updating unit is used to simultaneously update each of the cell grids from the respective first cell states to the corresponding second cell states at the next moment, so as to dynamically render the light and shadow effects of the webpage of the target website; The optimized web page layout parameter obtaining unit includes: a model evaluation result obtaining subunit, a multi-objective function building subunit and a web page layout parameter updating subunit; The model evaluation result obtaining subunit is used to obtain model evaluation results of the user attention model, the computational cost model and the visual effect model under the current web page layout parameters respectively; The multi-objective function construction subunit is used to construct a multi-objective function based on the evaluation results of each model and its corresponding weight coefficient; The web page layout parameter updating subunit is used to calculate the gradient of the multi-objective function, update the current web page layout parameters using the gradient descent method, and obtain the optimized web page layout parameters of the target website.

8. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the website dynamic light and shadow rendering processing method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the website dynamic light and shadow rendering processing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Webpage display method and device, computer equipment and storage medium

    CN110889060A

  • Method and system for translating a legacy web page into a three-dimensional virtual reality (VR) immersive space

    US20190005716A1

Cited By

  • Art expression method based on dynamic light and shadow

    CN120894486A