CN115237487A - Page rendering method and device, storage medium and electronic device - Google Patents

Page rendering method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115237487A
CN115237487A CN202210447093.7A CN202210447093A CN115237487A CN 115237487 A CN115237487 A CN 115237487A CN 202210447093 A CN202210447093 A CN 202210447093A CN 115237487 A CN115237487 A CN 115237487A
Authority
CN
China
Prior art keywords
data
storage area
list
display
height
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210447093.7A
Other languages
Chinese (zh)
Inventor
肖飞扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210447093.7A priority Critical patent/CN115237487A/en
Publication of CN115237487A publication Critical patent/CN115237487A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

The application discloses a page rendering method and device, a storage medium and an electronic device, and relates to the field of smart home, wherein the method comprises the following steps: under the condition that a display page receives an operation event of a target object to a first scrolling list, acquiring an operation attribute corresponding to the operation event; acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page; and generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page.

Description

Page rendering method and device, storage medium and electronic device
Technical Field
The invention relates to the field of communication, in particular to a page rendering method and device, a storage medium and an electronic device.
Background
With the progress of scientific technology and the development of artificial intelligence, intelligent algorithms are applied to daily life more and more, the intelligent development of the intelligent algorithms is very important, and the most important problem of intelligence is to intelligently solve the urgent needs of users.
With the development of big data and artificial intelligence, personalized recommendation is more and more common in various APPs, and people are used to receive more recommendation services all the time. At present, when a user browses a structure similar to a scrolling list, the user often unconsciously performs a lot of slide-up and loading operations, so that too much data and a dom structure exist on a display page at the same time, the performance of an APP consumes a lot of performance when the APP renders the things, and a phenomenon similar to blocking occurs.
Aiming at the problems that in the related art, when a user performs a slide-up loading operation on an APP, due to the fact that too much data exists in a display page, the performance of the APP consumes much performance when rendering resources, the problem of blocking and the like can occur, and an effective solution is not provided yet.
Disclosure of Invention
The embodiment of the invention provides a page rendering method and device, a storage medium and an electronic device, which are used for at least solving the problems that in the related technology, when a user carries out slide-up loading on an APP and more operations are carried out, due to too much data existing in a display page at the same time, the performance of the APP consumes much performance when rendering resources, and the performance is blocked.
According to an embodiment of the present invention, a method for rendering a page is provided, including: under the condition that a display page receives an operation event of a target object to a first rolling list, acquiring an operation attribute corresponding to the operation event; acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating cached data to be rendered of the display page; and generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page.
In an exemplary embodiment, the acquiring target data to be rendered of the display page from a storage area according to the operation attribute includes: under the condition that the sliding direction indicates that the target object performs a pull-down operation event on a first scroll list, determining the data to be rendered in a first storage area, wherein the display height corresponding to the data to be rendered is consistent with the sliding height; determining data to be rendered in a second storage area under the condition that the sliding direction indicates that the target object performs an operation event of sliding up on a first scroll list, wherein the display height corresponding to the data to be rendered is consistent with the sliding height; wherein the storage area includes: a first storage area and a second storage area, the first storage area being used for caching data to be rendered at the top of the display page, the second storage area being used for caching data to be rendered at the bottom of the display page, the operation attributes at least including: the sliding height and the sliding direction.
In an exemplary embodiment, the acquiring target data to be rendered of the display page from a storage area according to the operation attribute includes: determining a first height of display data of the first scrolling list in a data display list before the target object performs the operation event on the first scrolling list, wherein the data display list comprises: display data of the first scrolling list, data in the storage area; determining a sliding height and a sliding direction corresponding to an operation event in the process that the target object executes the operation event on the first scroll list, wherein the operation attribute at least comprises: a sliding height and a sliding direction; determining whether to reorganize the data display list according to the first height and the sliding height; and under the condition that the data display list is determined not to be reassembled, acquiring target data to be rendered of the display page from the storage area according to the sliding height and the sliding direction.
In an exemplary embodiment, after determining whether to reorganize the data display list according to the first height and the sliding height, the method further includes: under the condition that the data display list is determined to be reassembled, sending a first data request to a data source corresponding to the scrolling list; and under the condition of receiving first updating data sent by the data source according to the first data request, reorganizing the data display list according to the first updating data.
In an exemplary embodiment, determining whether to reorganize the data display list based on the first height and the slide height includes at least one of: in a case where the sliding direction indicates an operation event in which the target object performs a pull-down on a first scroll list, determining that a difference value between the first height and the sliding height determines a first size relationship with a second height of the data in the first storage area in the data display list; determining to re-organize the data display list if the first size relationship indicates that the difference value is less than the second height; in a case where the sliding direction indicates an operation event in which the target object performs an up-sliding on a first scroll list, determining a sum value of the first height and the sliding height determines a second size relationship with data in the second storage area at a third height of the data display list; in a case that the second size relationship indicates that the sum value is greater than the third height, determining to reorganize the data display list, wherein the storage area includes: the display device comprises a first storage area and a second storage area, wherein the first storage area is used for caching data to be rendered at the top of the display page, and the second storage area is used for caching data to be rendered at the bottom of the display page.
In an exemplary embodiment, after displaying the second scrolling list on the display page, the method further comprises: sending a second data request to a data source corresponding to the rolling list; and under the condition of receiving second updating data sent by the data source according to the second data request, updating the data of the first storage area and the second storage area according to the second updating data and display data.
In one exemplary embodiment, updating the data of the first and second storage areas according to the second update data and the display data includes: in a case where the sliding direction indicates that the target object performs a pull-down operation event on the first scroll list, updating the data of the first storage area according to the second update data, and updating the data of the second storage area according to the display data; in a case where the sliding direction indicates that the target object performs an operation event of sliding up the first scroll list, the data of the second storage area is updated according to the second update data, and the data of the first storage area is updated according to the display data.
According to another embodiment of the present invention, there is also provided a page rendering apparatus, including: the first acquisition module is used for acquiring operation attributes corresponding to operation events of a target object on a first rolling list under the condition that the display page receives the operation events; a second obtaining module, configured to obtain target data to be rendered of the display page from a storage area according to the operation attribute, where the storage area is used to indicate cached data to be rendered of the display page; and the generating module is used for generating a second scroll list for responding to the operation event according to the target data to be rendered and displaying the second scroll list on the display page.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the rendering method of the page when running.
According to another aspect of the embodiments of the present invention, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the rendering method of the page through the computer program.
In the embodiment of the invention, under the condition that a display page receives an operation event of a target object to a first scrolling list, the operation attribute corresponding to the operation event is obtained; acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page; generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page; in the embodiment of the invention, the storage area is set, when a user executes an operation event on the rolling list, the second rolling list is determined according to the storage area, and the dom structure of the page is reduced under the condition of not influencing the user experience, so that the purpose of performance optimization is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
FIG. 1 is a hardware environment diagram of a rendering method of a page according to an embodiment of the present application;
FIG. 2 is a flow diagram of a method of rendering a page according to an embodiment of the invention;
FIG. 3 is a system frame diagram of a method of rendering a page in accordance with an alternative embodiment of the present invention;
FIG. 4 is a flow diagram of a method for rendering a page in accordance with an alternative embodiment of the invention;
fig. 5 is a block diagram of a rendering apparatus for a page according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, a rendering method of a page is provided. The page rendering method is widely applied to full-house intelligent digital control application scenes such as Smart homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent residential House (Intellignee House) ecology and the like. Alternatively, in the present embodiment, the above page rendering method may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide services (e.g., application services, etc.) for the terminal or a client installed on the terminal, set up a database on the server or separately from the server, and provide data storage services for the server 104, and configure cloud computing and/or edge computing services on the server or separately from the server, and provide data operation services for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity ), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligent robot of sweeping the floor, intelligence window cleaning robot, intelligence mopping robot, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen treasured, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a method for rendering a page is provided, and fig. 2 is a flowchart of the method for rendering a page according to the embodiment of the present invention, where the flowchart includes the following steps:
step S202, when a display page receives an operation event of a target object to a first scrolling list, acquiring an operation attribute corresponding to the operation event;
step S204, acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page;
step S206, generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page.
Through the steps, under the condition that the display page receives the operation event of the target object to the first scrolling list, the operation attribute corresponding to the operation event is obtained; acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating cached data to be rendered of the display page; generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page; in the embodiment of the invention, the storage area is set, when a user executes an operation event on the scrolling list, the second scrolling list is determined according to the storage area, and the dom structure of the page is reduced under the condition of not influencing the user experience, so that the purpose of performance optimization is achieved.
It should be noted that, the operation attribute corresponding to the operation event is obtained, where the operation attribute includes: a sliding direction and a sliding height, comprising:
acquiring a first abscissa and a first ordinate, which correspond to a target part of a target object in the display page when the target object just contacts the scroll list; acquiring a first abscissa and a first ordinate, which correspond to a target part of a target object in the display page when the target object leaves the scroll list; according to a first difference value of the first abscissa and the second abscissa and a second difference value of the first ordinate and the second ordinate; determining the sliding height and the sliding direction corresponding to the operation event according to the first difference value and the second difference value; wherein the first difference is obtained by subtracting the first abscissa from the second abscissa; the second difference is obtained by subtracting the first ordinate from the second ordinate.
Specifically, determining the sliding height and the sliding direction corresponding to the operation event according to the first difference and the second difference includes: under the condition that the first difference value is a negative number, determining that the sliding mode indicates that the target object executes a leftward operation event on the first rolling list, wherein the absolute value of the first difference value is a sliding height; determining that the sliding mode indicates that the target object performs a rightward operation event on the first rolling list under the condition that the first difference is a positive number, wherein the first difference is a sliding height; determining that the sliding mode indicates that the target object performs an operation event of sliding up on the first scroll list under the condition that the second difference is a negative number, wherein the absolute value of the second difference is a sliding height; and in the case that the second difference value is a positive number, determining that the sliding mode indicates that the target object performs an operation event of sliding up on the first scroll list, wherein the second difference value is a sliding height.
In an exemplary embodiment, acquiring target data to be rendered of the display page from a storage area according to the operation attribute includes: determining the data to be rendered in the first storage area under the condition that the sliding direction indicates that the target object performs a pull-down operation event on a first scrolling list, wherein the display height corresponding to the data to be rendered is consistent with the sliding height; determining data to be rendered in the second storage area under the condition that the sliding direction indicates that the target object performs an operation event of sliding up on a first scroll list, wherein the display height corresponding to the data to be rendered is consistent with the sliding height; wherein the storage area includes: a first storage area and a second storage area, the first storage area being used for caching data to be rendered at the top of the display page, the second storage area being used for caching data to be rendered at the bottom of the display page, the operation attributes at least including: the sliding height and the sliding direction.
That is, in a case where it is determined that the target object performs the operation event of the pull-down on the first scroll list, determining data to be rendered among the data to be rendered at the top of the display page; and under the condition that the target object executes the upslide operation event on the first scroll list, determining data to be rendered in the data to be rendered at the bottom of the display page, wherein the display height corresponding to the data to be rendered is consistent with the sliding height, so that the data to be rendered can accurately render the display page.
In an exemplary embodiment, the acquiring target data to be rendered of the display page from a storage area according to the operation attribute includes: determining a first height of display data of the first scrolling list in a data display list before the target object performs the operation event on the first scrolling list, wherein the data display list comprises: display data of the first scrolling list, data in the first storage area, data in the second storage area; determining the sliding height and the sliding direction corresponding to the operation event in the process that the target object executes the operation event on the first scrolling list; determining whether to reorganize the data display list according to the first height and the sliding height; and under the condition that the data display list is determined not to be recombined, acquiring target data to be rendered of the display page from the storage area according to the sliding height and the sliding direction.
Specifically, the data display list is divided into three parts: data in the first storage area, display data of the first scroll list, data in the second storage area, in general scale of 2; determining a first height of a topmost or bottommost display data of the first scrolling list in the data display list before the target object performs the operation event on the first scrolling list; and determining whether to reorganize the data display list according to the first height and the sliding height; and under the condition that the data display list is not required to be recombined, acquiring target data to be rendered of the display page from different storage areas. Under the condition that the data display list is determined to be reassembled, sending a first data request to a data source corresponding to the scrolling list; and under the condition of receiving first updating data sent by the data source according to the first data request, reorganizing the data display list according to the first updating data.
In an exemplary embodiment, determining whether to reorganize the data display list based on the first height and the slide height includes at least one of: in a case where the sliding direction indicates an operation event in which the target object performs a pull-down on a first scroll list, determining that a difference value between the first height and the sliding height determines a first size relationship with a second height of the data in the first storage area in the data display list; determining to reassemble the data display list if the first size relationship indicates that the difference is less than the second height; in a case where the sliding direction indicates an operation event in which the target object performs an up-sliding on a first scroll list, determining a sum value of the first height and the sliding height determines a second size relationship with data in the second storage area at a third height of the data display list; determining to reorganize the data display list if the second size relationship indicates that the sum value is greater than the third height.
The embodiment of the present invention provides a manner of determining whether to reassemble the data display list according to the first height and the sliding height, specifically: in the case that the sliding direction indicates that the target object performs a pull-down operation event on the first scroll list and the topmost display data of the first scroll list is at a first height in the data display list, determining a difference value between the first height and the sliding height and a second height of the topmost data in the first storage area in the data display list; determining to reorganize the data display list if the difference is less than the second height; in the case that the sliding direction indicates that the target object performs a sliding-up operation event on the first scroll list and the topmost display data of the first scroll list is at a first height in the data display list, determining a sum value of the first height and the sliding height and a third height of the topmost data in the second storage area in the data display list; determining to reorganize the data display list if the sum is greater than the third height.
In an exemplary embodiment, after displaying the second scrolling list on the display page, the method further comprises: sending a second data request to a data source corresponding to the rolling list; and under the condition that second updating data sent by the data source according to the second data request is received, updating the data of the first storage area and the second storage area according to the second updating data and the display data.
That is, after the second scroll list is displayed, the data in the first storage area and the data in the second storage area need to be updated, specifically, a second data request is sent to the data source corresponding to the scroll list, and the data in the first storage area and the data in the second storage area are updated according to the received data. Specifically, in a case where the sliding direction indicates that the target object performs a pull-down operation event on the first scroll list, the data of the first storage area is updated according to the second update data, and the data of the second storage area is updated according to the display data; and in the case that the sliding direction indicates that the target object performs an operation event of sliding up on the first scroll list, updating the data of the second storage area according to the second updating data, and updating the data of the first storage area according to the display data.
In one exemplary embodiment, generating a second scrolling list for responding to the operational event according to the target data to be rendered comprises: and inputting the data to be rendered to a preset model in sequence, so that the preset model generates the second scroll list according to the data to be rendered in the sequence.
In order to better understand the process of the rendering method of the page, the following describes a flow of the implementation method of the rendering of the page with reference to an optional embodiment, but is not limited to the technical solution of the embodiment of the present invention.
After entering a scroll list page, as shown in fig. 3, after a sliding behavior of a user is determined by local logic, it is determined that a new display data list is generated from an above layer (equivalent to a first storage region in the above embodiment) or a below layer (equivalent to a second storage region in the above embodiment), and at the same time, the above and below layers of data are updated, and finally, a screen (intermediate data display layer) (equivalent to a display page in the above embodiment) is rendered by using the generated new data list (equivalent to a second scroll list in the above embodiment).
In this embodiment, a rendering method of a page is provided, and fig. 4 is a flowchart of a rendering method of a page according to an optional embodiment of the present invention, as shown in fig. 4, specifically including:
step 1: the application to the scroll list is divided into three parts, namely an above layer, a below layer and a screen layer, wherein the above layer and the below layer are hidden parts, and the screen layer is a display part seen by a user.
Step 2: when a user slides a page, acquiring a scrolltop (a rolling height) of the page and recording the last scrolltop, and calculating whether a rolling list needs to be recombined or not according to a difference value;
and step 3: and when the rolling list needs to be recombined, calculating to obtain data of a new screen layer needing to display the list, and updating the above, below and data corresponding to the screen layer.
And 4, step 4: data change, page rendering.
With the continuous development of network information, data and recommendation obtained by a user can be more and more, when the user slides upwards to obtain more and more data during immersion, the situation that the mobile phone is more and more jammed when browsing a page can be found, and the method has no adverse effect on the using process of the user under the condition that the DOM rendering of the page is not increased, and the performance is improved. The problem of the user when sliding up and loading more operations to APP execution, because the display page has too much data simultaneously, the performance of APP will consume very much performance when rendering resources, can appear blocking etc is solved.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the methods of the embodiments of the present invention.
In this embodiment, a rendering device for a page is further provided, and the rendering device for a page is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may embody a combination of software and/or hardware of predetermined functions. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware or a combination of software and hardware is also possible and contemplated.
FIG. 5 is a block diagram of an apparatus for rendering a page according to an embodiment of the present invention; as shown in fig. 5, includes:
the first obtaining module 52 is configured to, when the display page receives an operation event of a target object on a first scroll list, obtain an operation attribute corresponding to the operation event;
a second obtaining module 54, configured to obtain target data to be rendered of the display page from a storage area according to the operation attribute, where the storage area is used to indicate cached data to be rendered of the display page;
a generating module 56, configured to generate a second scroll list used for responding to the operation event according to the target data to be rendered, and display the second scroll list on the display page.
By the device, the first acquisition module acquires the operation attribute corresponding to the operation event when the display page receives the operation event of the target object to the first scroll list; the second obtaining module is used for obtaining target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page; the generating module is used for generating a second scroll list used for responding to the operation event according to the target data to be rendered and displaying the second scroll list on the display page; in the embodiment of the invention, the storage area is set, when the user slides and scrolls the list, the second scrolling list is determined according to the storage area, and the dom structure of the page is reduced under the condition of not influencing the user experience, so that the purpose of performance optimization is achieved.
In an exemplary embodiment, the generating module 56 is configured to determine the data to be rendered in the first storage area in a case that the sliding direction indicates that the target object performs a pull-down operation event on a first scroll list, where a display height corresponding to the data to be rendered is consistent with the sliding height; determining data to be rendered in the second storage area under the condition that the sliding direction indicates that the target object performs an operation event of sliding up on the first scroll list, wherein the display height corresponding to the data to be rendered is consistent with the sliding height; wherein the storage area includes: a first storage area and a second storage area, the first storage area being used for caching data to be rendered at the top of the display page, the second storage area being used for caching data to be rendered at the bottom of the display page, the operation attributes at least including: the sliding height and the sliding direction.
In an exemplary embodiment, the generating module 56 is configured to determine a first height of the display data of the first scroll list in a data display list before the target object performs the operation event on the first scroll list, where the data display list includes: display data of the first scrolling list, data in the first storage area, data in the second storage area; determining a sliding height and a sliding direction corresponding to an operation event in the process that the target object executes the operation event on the first scroll list, wherein the operation attribute at least comprises: sliding height and sliding direction; determining whether to reorganize the data display list according to the first height and the sliding height; and under the condition that the data display list is determined not to be recombined, acquiring target data to be rendered of the display page from the storage area according to the sliding height and the sliding direction.
In an exemplary embodiment, the apparatus further comprises: the updating module is used for sending a first data request to a data source corresponding to the scrolling list under the condition that the data display list is determined to be recombined; and under the condition of receiving first updating data sent by the data source according to the first data request, reorganizing the data display list according to the first updating data.
In an exemplary embodiment, the updating module is configured to determine that a difference between the first height and the sliding height determines a first size relationship with the data in the first storage area at a second height of the data display list in a case where the sliding direction indicates that the target object performs a pull-down operation event on a first scrolling list; determining to reorganize the display list of data if the first size relationship indicates that the difference value is less than the second height; determining a sum of the first height and the sliding height to determine a second size relationship with data in the second storage area at a third height of the data display list in a case where the sliding direction indicates that the target object performs an operation event of sliding up on a first scroll list; determining to reorganize the data display list in a case that the second size relationship indicates that the sum value is greater than the third height, wherein the storage area includes: the data processing device comprises a first storage area and a second storage area, wherein the first storage area is used for caching data to be rendered at the top of the display page, and the second storage area is used for caching data to be rendered at the bottom of the display page.
In an exemplary embodiment, the updating module is configured to send a second data request to a data source corresponding to the scrolling list; and under the condition of receiving second updating data sent by the data source according to the second data request, updating the data of the first storage area and the second storage area according to the second updating data and display data.
In an exemplary embodiment, the updating module is configured to update the data of the first storage area according to the second update data and update the data of the second storage area according to the display data in a case where the sliding direction indicates that the target object performs a pull-down operation event on the first scroll list; and in the case that the sliding direction indicates that the target object performs a sliding-up operation event on the first scrolling list, updating the data of the second storage area according to the second updating data, and updating the data of the first storage area according to the display data.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
Alternatively, in this embodiment, the storage medium may be configured to store program codes for performing the following steps:
the method comprises the steps that S1, under the condition that a display page receives an operation event of a target object to a first rolling list, operation attributes corresponding to the operation event are obtained;
s2, acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page;
and S3, generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring an operation attribute corresponding to an operation event of a target object on a first scrolling list under the condition that the display page receives the operation event;
s2, acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page;
and S3, generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, which can store program codes.
Optionally, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented in a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented in program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed in an order different from that described, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps thereof may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for rendering a page, comprising:
under the condition that a display page receives an operation event of a target object to a first scrolling list, acquiring an operation attribute corresponding to the operation event;
acquiring target data to be rendered of the display page from a storage area according to the operation attribute, wherein the storage area is used for indicating the cached data to be rendered of the display page;
and generating a second scroll list for responding to the operation event according to the target data to be rendered, and displaying the second scroll list on the display page.
2. The method for rendering the page according to claim 1, wherein acquiring the target data to be rendered of the display page from the storage area according to the operation attribute comprises:
determining the data to be rendered in a first storage area under the condition that the sliding direction indicates that the target object performs a pull-down operation event on a first scroll list, wherein the display height corresponding to the data to be rendered is consistent with the sliding height;
determining data to be rendered in a second storage area under the condition that the sliding direction indicates that the target object performs an operation event of sliding up on a first scroll list, wherein the display height corresponding to the data to be rendered is consistent with the sliding height;
wherein the storage area includes: a first storage area and a second storage area, the first storage area being used for caching data to be rendered at the top of the display page, the second storage area being used for caching data to be rendered at the bottom of the display page, the operation attributes at least including: the sliding height and the sliding direction.
3. A method of rendering a page as claimed in claim 2, wherein after displaying the second scrolling list on the display page, the method further comprises:
sending a second data request to a data source corresponding to the rolling list;
and under the condition that second updating data sent by the data source according to the second data request is received, updating the data of the first storage area and the second storage area according to the second updating data and the display data.
4. The method for rendering a page according to claim 3, wherein updating the data of the first and second storage areas according to the second update data and the display data comprises:
in a case where the sliding direction indicates that the target object performs a pull-down operation event on the first scroll list, updating the data of the first storage area according to the second update data, and updating the data of the second storage area according to the display data;
and in the case that the sliding direction indicates that the target object performs an operation event of sliding up on the first scroll list, updating the data of the second storage area according to the second updating data, and updating the data of the first storage area according to the display data.
5. The method for rendering the page according to claim 1, wherein acquiring target data to be rendered of the display page from a storage area according to the operation attribute comprises:
determining a first height of display data of the first scrolling list in a data display list before the target object performs the operation event on the first scrolling list, wherein the data display list comprises: display data of the first scrolling list, data in the storage area;
determining a sliding height and a sliding direction corresponding to the operation event in the process that the target object executes the operation event on the first scroll list, wherein the operation attribute at least comprises: a sliding height and a sliding direction;
determining whether to reorganize the data display list according to the first height and the sliding height;
and under the condition that the data display list is determined not to be recombined, acquiring target data to be rendered of the display page from the storage area according to the sliding height and the sliding direction.
6. The method for rendering a page of claim 5, wherein after determining whether to reorganize the data display list according to the first height and the sliding height, the method further comprises:
under the condition that the data display list is determined to be reassembled, sending a first data request to a data source corresponding to the scrolling list;
and under the condition of receiving first updating data sent by the data source according to the first data request, reorganizing the data display list according to the first updating data.
7. The method for rendering a page as claimed in claim 5, wherein determining whether to reorganize the data display list according to the first height and the sliding height comprises at least one of:
in a case where the sliding direction indicates that the target object performs a pull-down operation event on a first scroll list, determining that a difference between the first height and the sliding height determines a first size relationship with data in a first storage area at a second height of the data display list; determining to reorganize the data display list if the first size relationship indicates that the difference is less than the second height;
determining a sum of the first height and the sliding height to determine a second size relationship with data in a second storage area at a third height of the data display list in a case where the sliding direction indicates that the target object performs an operation event of sliding up on a first scroll list; determining to reorganize the data display list in a case that the second size relationship indicates that the sum value is greater than the third height, wherein the storage area includes: the data processing device comprises a first storage area and a second storage area, wherein the first storage area is used for caching data to be rendered at the top of the display page, and the second storage area is used for caching data to be rendered at the bottom of the display page.
8. An apparatus for rendering a page, comprising:
the first acquisition module is used for acquiring operation attributes corresponding to operation events when the display page receives the operation events of a target object on a first rolling list;
a second obtaining module, configured to obtain target data to be rendered of the display page from a storage area according to the operation attribute, where the storage area is used to indicate cached data to be rendered of the display page;
and the generating module is used for generating a second scroll list for responding to the operation event according to the target data to be rendered and displaying the second scroll list on the display page.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210447093.7A 2022-04-26 2022-04-26 Page rendering method and device, storage medium and electronic device Pending CN115237487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210447093.7A CN115237487A (en) 2022-04-26 2022-04-26 Page rendering method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210447093.7A CN115237487A (en) 2022-04-26 2022-04-26 Page rendering method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115237487A true CN115237487A (en) 2022-10-25

Family

ID=83667634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210447093.7A Pending CN115237487A (en) 2022-04-26 2022-04-26 Page rendering method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115237487A (en)

Similar Documents

Publication Publication Date Title
US20230244679A1 (en) Advice provision method for user using household appliance while viewing terminal screen
WO2015131531A1 (en) Widget display method, apparatus, and terminal
CN103425483B (en) Method and storage medium for dynamically customized menus
CN113055255A (en) Scene configuration method and device of intelligent household appliance, storage medium and electronic equipment
CN110958618B (en) Control method and device based on Bluetooth gateway, computer equipment and storage medium
CN109189295A (en) display control method, device and terminal device
CN114697150B (en) Command issuing method and device, storage medium and electronic device
EP3104553A1 (en) Method for controlling multiple devices connected via network
WO2023168856A1 (en) Associated scene recommendation method and device, storage medium, and electronic device
CN115167164A (en) Method and device for determining equipment scene, storage medium and electronic device
CN114896003A (en) Page configuration method and device, storage medium and electronic device
CN115237487A (en) Page rendering method and device, storage medium and electronic device
CN116027937A (en) Rendering method and device of component to be edited, storage medium and electronic device
CN114864047A (en) Recipe recommendation method, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium, and electronic apparatus
CN115714810A (en) Method and device for sending push message, storage medium and electronic device
CN114677830A (en) Reminding method of water use message, storage medium and electronic device
CN115062221A (en) Method and device for determining corpus hotness, storage medium and electronic device
CN115616930A (en) Control instruction sending method and device, storage medium and electronic device
CN115032907A (en) Method and device for updating perception parameters, storage medium and electronic device
CN114900382B (en) Control method of intelligent equipment, storage medium and electronic device
CN114691730A (en) Storage position prompting method and device, storage medium and electronic device
CN115934200A (en) Resource pushing method and device, storage medium and electronic device
CN115453897A (en) Method and device for determining intention instruction, storage medium and electronic device
CN116521164A (en) Layout method and device of function entrance, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination