List generation method, device, computer device and storage medium

By obtaining and processing the identification and data of the list to be generated, creating and configuring corresponding list elements, and using page effect information in the document object model to generate lists, the problem of insufficient dynamic list loading performance in the existing technology is solved, and more efficient list generation and loading performance is achieved.

CN115080892BActive Publication Date: 2025-06-13JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110282920.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-16
Publication Date
2025-06-13
Estimated Expiration
2041-03-16

AI Technical Summary

Technical Problem

In the prior art, dynamic lists have major drawbacks in loading performance, especially in terms of frames per second (FPS).

Method used

By obtaining the identification of the list to be generated, determining the corresponding list data, creating corresponding area units and initial list elements, and obtaining page effect information in the document object model, using this information to describe the initial list elements to generate the list to be generated.

Benefits of technology

It effectively improves the list generation effect and loading performance, improves the number of frames per second (FPS), and significantly improves the loading speed of the generated list.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080892B_ABST
    Figure CN115080892B_ABST
Patent Text Reader

Abstract

The present application provides a list generation method, apparatus, computer device, and storage medium. The method includes obtaining an identifier of a list to be generated; determining first list data corresponding to the identifier of the list to be generated, where the first list data includes: unit types of at least one area unit corresponding to the list to be generated, and a plurality of list element identifiers corresponding to the unit types; creating, in a list running environment, area units corresponding to the unit types, and configuring a plurality of initial list elements corresponding to the plurality of list element identifiers respectively in the area units; obtaining a first document object model corresponding to the area units; and using a plurality of page effect information to describe the corresponding plurality of initial list elements respectively to generate the list to be generated. It can effectively improve the list generation effect, effectively improve the frames per second (FPS) of the generated list, and improve the loading performance of the generated list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a list generation method, apparatus, computer device, and storage medium. Background Art

[0002] In related technologies, the dynamic list technology mainly uses self-implemented lists. Taking the Weex project (i.e., Web Storm, a framework for developing high-performance native applications using a popular Web development experience) as an example, the list-related components use a custom scroll bar Scroller class. However, at the bottom layer of the list implementation, it depends on the process of generating a Document Object Model (DOM) by Vue (Vue is a progressive framework for building user interfaces).

[0003] In this way, the generated list has significant defects in loading performance (usually measured by Frames Per Second, FPS). Summary of the Invention

[0004] This application aims to at least solve one of the technical problems in the related technologies to some extent.

[0005] To this end, the purpose of this application is to propose a list generation method, apparatus, computer device, and storage medium, which can effectively improve the list generation effect, effectively improve the frames per second (FPS) of the generated list, and improve the loading performance of the generated list.

[0006] To achieve the above object, the list generation method proposed in the first aspect embodiment of this application, which is applied to a client, includes: obtaining an identifier of a list to be generated; determining first list data corresponding to the identifier of the list to be generated, where the first list data includes: unit types of at least one region unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types; creating a region unit corresponding to the unit type in a list running environment, and configuring multiple initial list elements corresponding to the multiple list element identifiers in the region unit; obtaining a first document object model corresponding to the region unit, where the first document object model includes: multiple page effect information corresponding to the multiple list element identifiers respectively; using the multiple page effect information to describe the corresponding multiple initial list elements respectively to generate the list to be generated.

[0007] The list generation method proposed in the first aspect embodiment of this application obtains the identifier of the list to be generated, and determines the first list data corresponding to the identifier of the list to be generated. The first list data includes: the unit types of at least one area unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types. In the list running environment, it creates area units corresponding to the unit types, and configures multiple initial list elements corresponding to the multiple list element identifiers in the area units, obtains the first document object model corresponding to the area units, and the first document object model includes: multiple page effect information corresponding to the multiple list element identifiers respectively. Using the multiple page effect information to describe the corresponding multiple initial list elements respectively to generate the list to be generated can effectively improve the list generation effect, effectively improve the frames per second (FPS) of the generated list, and improve the loading performance of the generated list.

[0008] To achieve the above object, the list generation device proposed in the second aspect embodiment of this application is applied to a client and includes: a first acquisition module for acquiring the identifier of the list to be generated; a determination module for determining the first list data corresponding to the identifier of the list to be generated, where the first list data includes: the unit types of at least one area unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types; a first creation module for creating area units corresponding to the unit types in the list running environment, and configuring multiple initial list elements corresponding to the multiple list element identifiers in the area units; a second acquisition module for acquiring the first document object model corresponding to the area units, and the first document object model includes: multiple page effect information corresponding to the multiple list element identifiers respectively; a generation module for using the multiple page effect information to describe the corresponding multiple initial list elements respectively to generate the list to be generated.

[0009] The list generation device proposed in the second aspect embodiment of this application obtains the identifier of the list to be generated, and determines the first list data corresponding to the identifier of the list to be generated. The first list data includes: the unit types of at least one area unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types. In the list running environment, it creates area units corresponding to the unit types, and configures multiple initial list elements corresponding to the multiple list element identifiers in the area units, obtains the first document object model corresponding to the area units, and the first document object model includes: multiple page effect information corresponding to the multiple list element identifiers respectively. Using the multiple page effect information to describe the corresponding multiple initial list elements respectively to generate the list to be generated can effectively improve the list generation effect, effectively improve the frames per second (FPS) of the generated list, and improve the loading performance of the generated list.

[0010] A third aspect embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the list generation method proposed in the first aspect embodiment of the present application is implemented.

[0011] A fourth aspect embodiment of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the list generation method proposed in the first aspect embodiment of the present application is implemented.

[0012] A fifth aspect embodiment of the present application provides a computer program product. When the instruction processor in the computer program product executes, the list generation method proposed in the first aspect embodiment of the present application is executed.

[0013] Additional aspects and advantages of the present application will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and / or additional aspects and advantages of the present application will become apparent and be easily understood from the following description of the embodiments in conjunction with the drawings, where:

[0015] Figure 1 is a flowchart of the list generation method proposed in an embodiment of the present application;

[0016] Figure 2 is a flowchart of the list generation method proposed in another embodiment of the present application;

[0017] Figure 3 is a flowchart of the list generation method proposed in another embodiment of the present application;

[0018] Figure 4 is a schematic diagram of an application scenario in an embodiment of the present application;

[0019] Figure 5 is a schematic structural diagram of the list generation device proposed in an embodiment of the present application;

[0020] Figure 6 is a schematic structural diagram of the list generation device proposed in another embodiment of the present application;

[0021] Figure 7 shows a block diagram of an exemplary computer device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present application and should not be construed as a limitation of the present application. On the contrary, the embodiments of the present application include all changes, modifications, and equivalents that fall within the spirit and scope of the appended claims.

[0023] Figure 1 It is a schematic flowchart of a list generation method proposed in an embodiment of the present application.

[0024] It should be noted that the execution subject of the list generation method in this embodiment is a list generation device, which can be implemented in software and / or hardware, and this device can be configured in an electronic device. The electronic device can include, but is not limited to, a terminal, a server, etc.

[0025] As Figure 1 shown, the list generation method includes:

[0026] The list generation method in the embodiments of the present application can be specifically applied to a client. The client refers to a program corresponding to the server that provides local services to customers. It is usually installed on a client machine and needs to cooperate with the server to run. The client in the embodiments of the present application can specifically be a client with a list display function and capable of interacting with users based on this list function, and there is no limitation on this.

[0027] S101: Obtain the identifier of the list to be generated.

[0028] It can be understood that on the page of the client, usually one or more lists may be generated, and the currently to-be-generated list can be referred to as the list to be generated.

[0029] The identifier of the list to be generated can be uniquely used to identify the currently to-be-generated list. For example, assuming that multiple lists are generated on the page of the client, the identifier of the list to be generated can be used to uniquely identify the currently to-be-generated list, and this identifier of the list to be generated can be specifically used to subsequently identify and read out the corresponding list data from the document object model of the page (the document object model of the page can be referred to as the second document object model), and specific reference can be made to the subsequent embodiments.

[0030] The application scenario in the embodiments of the present application can specifically be a scenario of generating a dynamic list. Then the currently to-be-generated list can specifically be a partial list in the overall list or one of multiple lists, and there is no limitation on this.

[0031] In the process of specific implementation of the embodiments of the present application, the identifier of the list to be generated can be obtained from the server. For example, when the client interface displays the current interface, the corresponding background interface of the server can be called according to the functions provided by the current interface to obtain the identifier of the list to be generated. Or, it can also be to call the configuration file associated with the current interface and obtain the identifier of the list to be generated according to this configuration file, and there is no limitation on this.

[0032] S102: Determine the first list data corresponding to the identifier of the list to be generated. The first list data includes: the unit types of at least one area unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types.

[0033] After obtaining the identifier of the list to be generated as described above, the first list data corresponding to the identifier of the list to be generated can be determined. Among them, the list data corresponding to the list to be generated can be referred to as the first list data. And the list data corresponding to the list to be generated can be specifically, for example, the identifiers of the list elements included in the list to be generated (the list elements can be specifically controls in the list, etc., and the list element identifier can be uniquely used to identify the list element), and the unit types of the area units covered by the list to be generated.

[0034] The area unit therein can be referred to as a floor, which can be understood as each area arranged from top to bottom in the list. Among them, the unit type can be used to describe the attribute characteristics of the corresponding area unit, and there is no limitation on this.

[0035] The first list data obtained as described above includes: the unit types of at least one area unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types. That is to say, in the first list data, it can include the unit types corresponding to each area unit among at least one area unit covered by the list to be generated, and the identifiers of the list elements that can be configured in each area unit (the list elements can be specifically controls that can be configured in the area unit, etc.).

[0036] In some embodiments, as Figure 2 shown, Figure 2 is a schematic flowchart of a list generation method proposed in another embodiment of the present application. Determining the first list data corresponding to the identifier of the list to be generated includes:

[0037] S201: Obtain the second Document Object Model of the page to which the list to be generated belongs. The second Document Object Model is used to manage the second list data of multiple lists in the page. The second list data includes: the unit types of multiple area units corresponding to the multiple lists respectively, and the list element identifiers corresponding to the unit types.

[0038] Among them, the Document Object Model (DOM) corresponding to the page to which the list to be generated belongs can be referred to as the second document object model. This second document object model can be regarded as a page rendering tree, and the page rendering tree can include the list data of all lists in the page (the list data of all lists in the page can be referred to as the second list data).

[0039] The above-mentioned second document object model can be dynamically created during the process of generating the list, and there is no limitation on this.

[0040] S202: Determine the second list data of the list corresponding to the identifier of the list to be generated from the second document object model, and use the second list data as the first list data.

[0041] That is to say, in the embodiments of the present application, the first list data corresponding to the identifier of the list to be generated can be directly parsed from the pre-created second document object model according to the identifier of the list to be generated, so as to effectively improve the generation effect of the dynamic list and assist in improving the loading performance of the dynamic list.

[0042] S103: Create a regional unit corresponding to the unit type in the list running environment, and configure multiple initial list elements corresponding to multiple list element identifiers in the regional unit.

[0043] In the embodiments of the present application, in order to effectively improve the coherence and generation efficiency of the list generation, the above-mentioned list running environment can also be created when it is determined that the current interface of the client loads the page to which the list to be generated belongs.

[0044] The list running environment among them can be specifically, for example, the execution context (JSContext) of JS (Java Script). The JSContext stores the information required for function execution, such as variable objects, scope chains, this pointers, etc. Of course, the list running environment can also be any other possible software or hardware environment that supports list running, and there is no limitation on this.

[0045] That is to say, the embodiments of the present application support the following application scenarios: when it is determined that the current interface of the client loads the page to which the list to be generated belongs, the list running environment JSContext can be first created, so as to manage all lists in the page based on the JSContext.

[0046] In the embodiments of the present application, when it is determined that the current interface of the client loads the page to which the list to be generated belongs, a list running environment is created, so as to assist in subsequently creating area units corresponding to the unit type in the list running environment, and configuring multiple initial list elements corresponding to multiple list element identifiers respectively in the area units, realizing the hybrid implementation of the native list management process and the list management of the engine (such as the JS engine) of the list running environment supported by the client, so that the loading performance of the generated list is relatively close to the loading performance of the native list.

[0047] Among them, when creating area units corresponding to the unit type in the list running environment, for example, if there are multiple area units arranged from top to bottom in the list, each area unit can be created one by one in the order from top to bottom, and there is no limitation on this.

[0048] After creating area units corresponding to the unit type in the list running environment, multiple initial list elements corresponding to multiple list element identifiers can be configured in each area unit. It can be understood that since there are multiple list element identifiers corresponding to the unit type of the area unit (the list element can specifically be a control that can be configured in the area unit), the list elements initially configured in each area unit can be called initial list elements.

[0049] In the embodiments of the present application, it is supported to configure attribute parameters, etc. of the corresponding initial list elements in combination with the page effect information in the first Document Object Model corresponding to the area unit, so as to form the list to be generated. For details, please refer to the following.

[0050] S104: Obtain the first Document Object Model corresponding to the area unit, where the first Document Object Model includes: multiple page effect information respectively corresponding to multiple list element identifiers.

[0051] Among them, the Document Object Model (DOM for short) corresponding to the area unit can be called the first Document Object Model. This first Document Object Model can be regarded as a floor rendering tree (and the concept of a floor can be understood as an area unit). In this floor rendering tree, it can include the page effect information corresponding to all list elements in the area unit (this page effect information can be used to configure the display effects of the corresponding list elements in the area unit, and the display effects include, for example, display size, color, position, size, etc., and there is no limitation on this).

[0052] The above-mentioned first Document Object Model can be dynamically created during the process of generating the list, and there is no limitation on this.

[0053] S105: Use multiple page effect information to describe corresponding multiple initial list elements respectively to generate a list to be generated.

[0054] After creating a regional unit corresponding to the unit type in the list running environment, configuring multiple initial list elements corresponding to multiple list element identifiers respectively in the regional unit, and obtaining a first document object model corresponding to the regional unit, multiple page effect information in the first document object model can be used to describe corresponding multiple initial list elements respectively, so as to generate a list to be generated.

[0055] For example, create a regional unit A corresponding to unit type A in the list running environment, and configure multiple initial list elements (assumed to be initial list element A1, initial list element A2,..., initial list element A7) corresponding to multiple list element identifiers respectively in the regional unit A. Then, the first document object model corresponding to the regional unit A includes: multiple page effect information (page effect information A1, page effect information A2,..., page effect information A7) corresponding to multiple list element identifiers (identifier 1 of initial list element A1, identifier 2 of initial list element A2,..., identifier 7 of initial list element A7) respectively. Then, page effect information A1 can be used to describe the configured initial list element A1, page effect information A2 can be used to describe the configured initial list element A2,..., page effect information A7 can be used to describe the configured initial list element A7. Among them, using page effect information A1 to describe the configured initial list element A1 can be specifically, for example: page effect information A1 indicates setting the length and width of the configured initial list element A1 to a and setting the color to b. Correspondingly, set the length and width of the configured initial list element A1 to a and set the color to b. Thus, after describing all the initial list elements, the list formed on the current page is used as the generated list to be generated, and so on, without limitation.

[0056] In this embodiment, by obtaining the identifier of the list to be generated and determining the first list data corresponding to the identifier of the list to be generated, the first list data includes: the unit type of at least one regional unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit type, creating a regional unit corresponding to the unit type in the list running environment, configuring multiple initial list elements corresponding to multiple list element identifiers respectively in the regional unit, obtaining a first document object model corresponding to the regional unit, the first document object model includes: multiple page effect information corresponding to multiple list element identifiers respectively, using multiple page effect information to describe corresponding multiple initial list elements respectively to generate a list to be generated, which can effectively improve the list generation effect, effectively improve the frames per second (FPS) of the generated list, and improve the loading performance of the generated list.

[0057] Figure 3 It is a schematic flowchart of a list generation method proposed in another embodiment of the present application.

[0058] As Figure 3 shown, the list generation method includes:

[0059] S301: Obtain the identifier of the list to be generated.

[0060] For the description of S301, reference can be specifically made to the above embodiments and will not be elaborated here.

[0061] S302: In the list running environment, create a second Document Object Model of the page to which the list to be generated belongs.

[0062] The list running environment herein can be specifically, for example, the execution context (JSContext) of JS (Java Script). The JSContext stores the information required for function execution, such as the variable object, scope chain, this pointer, etc. Of course, the list running environment can also be any other possible software or hardware environment that supports list running, and no limitation is imposed thereon.

[0063] That is to say, the embodiments of the present application support the following application scenarios: when it is determined that the current interface of the client loads the page to which the list to be generated belongs, the list running environment JSContext can be first created, so as to manage all the lists in the page based on the JSContext. That is to say, when managing all the lists in the page based on the JSContext, a second Document Object Model of the page to which the list to be generated belongs can be first created in the list running environment. Among them, the corresponding relationship between the list and the page can be a one-to-one relationship, and no limitation is imposed thereon.

[0064] For example, in the generated JSContext, a corresponding second Document Object Model PageDom is created for the list to be generated. One list to be generated can correspond to one Page Dom. Based on the second Document Object Model PageDom, the second list data corresponding to the corresponding list is managed, and the second list data is recorded in the global data variable Global Data in the JSContext. The second list data can at least include: the unit types of multiple regional units respectively corresponding to multiple lists, and the list element identifiers corresponding to the unit types. For the concepts of regional units, unit types, list element identifiers, etc., reference can be specifically made to the above embodiments and will not be elaborated here.

[0065] S303: Create a first document object model according to the unit types of at least one region unit corresponding to the list to be generated in the second document object model, and multiple page effect information respectively corresponding to multiple list element identifiers corresponding thereto.

[0066] After creating the second document object model of the page to which the list to be generated belongs in the above list running environment, a first document object model can also be created according to the unit types of at least one region unit corresponding to the list to be generated in the second document object model, and multiple page effect information respectively corresponding to multiple list element identifiers corresponding thereto.

[0067] That is to say, in the embodiments of the present application, it is supported to first create a second document object model at the page dimension, and then create a first document object model at the floor dimension (region unit dimension). The second document object model at the page dimension can include the list data of all lists in the page, and the first document object model at the floor dimension can be the page effect information including the list elements of the corresponding floor, and there is no limitation thereto.

[0068] For example, a first document object model Dom corresponding to the floor (region unit) can be created under the second document object model Page Dom. The first document object model Dom is the page effect information of all list elements in the corresponding floor (region unit), and the page effects of the floor are all recorded in the first document object model Dom.

[0069] S304: Determine the first list data corresponding to the identifier of the list to be generated. The first list data includes: the unit types of at least one region unit corresponding to the list to be generated, and multiple list element identifiers corresponding to the unit types.

[0070] S305: Create a region unit corresponding to the unit type in the list running environment, and configure multiple initial list elements respectively corresponding to multiple list element identifiers in the region unit.

[0071] S306: Obtain the first document object model corresponding to the region unit. The first document object model includes: multiple page effect information respectively corresponding to multiple list element identifiers.

[0072] S307: Describe the corresponding multiple initial list elements with multiple page effect information respectively to generate the list to be generated.

[0073] For the illustrative description of S304 - S307, reference can be specifically made to the above embodiments and will not be elaborated herein.

[0074] S308: Obtain the target list element identifier and the target page effect information corresponding to the target list element identifier.

[0075] After using multiple page effect information to describe the corresponding multiple initial list elements to generate a list to be generated, the reuse of the regional units of the list can also be implemented. Specifically, a target list element identifier and target page effect information corresponding to the target list element identifier can be obtained.

[0076] Among them, the list element to be reused can be called a target list element, and the target list element identifier can be used to uniquely identify the target list element.

[0077] Suppose there is a list A, which includes multiple list elements A1, A2, and A3. Then, assuming that list element A1 is to be reused, list element A1 can be called a target list element, and the identifier of list element A1 can be called target list element identifier A1.

[0078] The above-mentioned target page effect information can be used to describe the page effect of the reused list element. Suppose the page effect of target list element A1 after reuse is b, then the page effect being b can be called the target page effect information.

[0079] S309: Generate an intermediate document object model according to the target list element identifier and the target page effect information.

[0080] After obtaining the target list element identifier and the target page effect information corresponding to the target list element identifier as described above, an intermediate document object model can be generated according to the target list element identifier and the target page effect information.

[0081] For example, the floor (regional unit) to which the target list element belongs can be determined, and an intermediate document object model can be generated according to the target list element identifier, the target page effect information, and the page effect information of other list elements in this regional unit, and there is no limitation on this.

[0082] S310: Update the first document object model according to the intermediate document object model.

[0083] Optionally, in some embodiments, updating the first document object model according to the intermediate document object model includes: determining the difference information between the intermediate document object model and the first document object model; if the difference information meets the set conditions, then according to the target page effect information, update the page effect information of the list element identifier corresponding to the target list element identifier in the first document object model, so as to realize the reuse of the regional unit of the list, reduce the memory consumption of the list data and page effect information involved in the regional unit of the list, and thus greatly assist in improving the list generation efficiency and loading performance efficiency.

[0084] Among them, the difference information can be used to describe the differences between the intermediate document object model and the first document object model. The differences can be, for example, the differences between the target page effect information and the page effect information of the corresponding list elements in the first document object model, and there is no limitation on this.

[0085] For example, the first document object model Dom with the same unit type as the regional unit to which the target list element belongs can be determined from the second document object model Page Dom. Then, the intermediate document object model Dom is generated using the target list element identifier and the target page effect information. Then, the difference information between the intermediate document object model and the first document object model is determined, and the difference information is compared with the set conditions (the set conditions can be, for example, that the difference between the target page effect information and the page effect information of the corresponding list elements in the first document object model meets the preset difference value, and there is no limitation on this). If the difference information meets the set conditions, the page effect information of the list element identifier corresponding to the target list element in the first document object model is updated according to the target page effect information.

[0086] In this embodiment, the list generation effect can be effectively improved, the frames per second (FPS) of the generated list can be effectively increased, and the loading performance of the generated list can be improved. By constructing a list running environment and creating a second document object model in the page dimension, and then creating a first document object model in the floor dimension (regional unit dimension), the second document object model in the page dimension can contain the list data of all lists in the page, and the first document object model in the floor dimension can be the page effect information containing the list elements of the corresponding floor, which can effectively assist the reuse of the regional units of the subsequent lists, effectively assist in increasing the scrolling frame rate of the dynamic list, and improve the smoothness of the dynamic list loading. The reuse of the regional units of the list is effectively realized, the memory consumption occupied by the list data and page effect information involved in the regional units of the list is reduced, thereby greatly assisting in improving the list generation efficiency and loading performance efficiency.

[0087] For example, as Figure 4 shown, Figure 4It is a schematic diagram of an application scenario in an embodiment of the present application, including a server, a local operating system, and a JS engine of a client. On the client side, a list running environment JS Context is created based on the JS engine. In the generated JS Context, a corresponding second document object model Page Dom is created for the list to be generated. One list to be generated can correspond to one Page Dom. Based on this second document object model Page Dom, the corresponding second list data of the corresponding list is managed, and the second list data is recorded in the global data variable Global Data in the JS Context. A first document object model Dom corresponding to a floor (area unit) can be created under the second document object model Page Dom. The first document object model Dom is the page effect information of all list elements in the corresponding floor (area unit). The page effects of the floors to be displayed are all recorded in the first document object model Dom. And if the difference information (Dom Differ) between the intermediate document object model and the first document object model meets the set conditions, then according to the target page effect information, the page effect information of the list element identifier corresponding to the target list element identifier in the first document object model is updated.

[0088] Figure 5 It is a schematic structural diagram of a list generation device proposed in an embodiment of the present application.

[0089] As Figure 5 shown, the list generation device 50 is applied to the client and includes:

[0090] A first acquisition module 501, configured to acquire an identifier of a list to be generated;

[0091] A determination module 502, configured to determine first list data corresponding to the identifier of the list to be generated. The first list data includes: the unit types of at least one area unit corresponding to the list to be generated, and a plurality of list element identifiers corresponding to the unit types;

[0092] A first creation module 503, configured to create an area unit corresponding to the unit type in the list running environment, and configure a plurality of initial list elements corresponding to the plurality of list element identifiers respectively in the area unit;

[0093] A second acquisition module 504, configured to acquire a first document object model corresponding to the area unit. The first document object model includes: a plurality of page effect information corresponding to the plurality of list element identifiers respectively;

[0094] A generation module 505, configured to use the plurality of page effect information to describe the corresponding plurality of initial list elements respectively to generate the list to be generated.

[0095] In some embodiments of the present application, the determining module 502 is specifically configured to:

[0096] Obtain a second document object model of the page to which the list to be generated belongs. The second document object model is used to manage second list data of multiple lists in the page. The second list data includes: unit types of multiple region units respectively corresponding to the multiple lists, and list element identifiers corresponding to the unit types;

[0097] Determine, from the second document object model, the second list data of the list corresponding to the identifier of the list to be generated, and use the second list data as the first list data.

[0098] In some embodiments of the present application, as Figure 6 shown, the device 50 further includes:

[0099] A second creation module 506, configured to create a second document object model of the page to which the list to be generated belongs in the list running environment before determining the first list data corresponding to the identifier of the list to be generated;

[0100] A third creation module 507, configured to create a first document object model according to the unit types of at least one region unit corresponding to the list to be generated in the second document object model, and multiple page effect information respectively corresponding to the multiple list element identifiers corresponding thereto.

[0101] In some embodiments of the present application, as Figure 6 shown, the device 50 further includes:

[0102] A reuse module 508, configured to obtain a target list element identifier and target page effect information corresponding to the target list element identifier, generate an intermediate document object model according to the target list element identifier and the target page effect information, and update the first document object model according to the intermediate document object model.

[0103] In some embodiments of the present application, the reuse module 508 is specifically configured to:

[0104] Determine the difference information between the intermediate document object model and the first document object model;

[0105] If the difference information meets the set conditions, update the page effect information of the list element identifier corresponding to the target list element identifier in the first document object model according to the target page effect information.

[0106] In some embodiments of the present application, as Figure 6 shown, the device 50 further includes:

[0107] A fourth creation module 509, configured to create a list running environment when it is determined that the current interface of the client loads the page to which the list to be generated belongs.

[0108] Corresponding to the list generation method provided in the foregoing Figures 1 to 4 embodiment, the present application further provides a list generation device. Since the list generation device provided in the embodiments of the present application corresponds to the list generation method provided in the foregoing Figures 1 to 4 embodiment, the implementation manners of the list generation method are also applicable to the list generation device provided in the embodiments of the present application, and will not be described in detail in the embodiments of the present application.

[0109] In this embodiment, by obtaining the identifier of the list to be generated and determining the first list data corresponding to the identifier of the list to be generated, the first list data includes: the unit types of at least one area unit corresponding to the list to be generated, and a plurality of list element identifiers corresponding to the unit types. Area units corresponding to the unit types are created in the list running environment, and a plurality of initial list elements corresponding to the plurality of list element identifiers are respectively configured in the area units. The first document object model corresponding to the area unit is obtained, and the first document object model includes: a plurality of page effect information respectively corresponding to the plurality of list element identifiers. The plurality of initial list elements are respectively described by using the plurality of page effect information to generate the list to be generated, which can effectively improve the list generation effect, effectively improve the frames per second (FPS) of the generated list, and improve the loading performance of the generated list.

[0110] To implement the above embodiment, the present application further proposes a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the list generation method proposed in the foregoing embodiments of the present application is implemented.

[0111] To implement the above embodiment, the present application further proposes a non-transitory computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the list generation method proposed in the foregoing embodiments of the present application is implemented.

[0112] To implement the above embodiment, the present application further proposes a computer program product. When the instruction processor in the computer program product executes, the list generation method proposed in the foregoing embodiments of the present application is executed.

[0113] Figure 7 A block diagram of an exemplary computer device suitable for implementing the embodiments of the present application is shown. Figure 7 The computer device 12 shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.

[0114] Such as Figure 7As shown, the computer device 12 is presented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects different system components (including the system memory 28 and the processing unit 16).

[0115] The bus 18 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnection (PCI) bus.

[0116] The computer device 12 typically includes a variety of computer system-readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0117] The memory 28 may include computer system-readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 can be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 7 not shown, commonly referred to as a "hard disk drive").

[0118] Although Figure 7Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (such as a Compact Disc Read Only Memory (hereinafter referred to as: CD-ROM), a Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM) or other optical media) can be provided. In these cases, each drive can be connected to the bus 18 through one or more data medium interfaces. The memory 28 may include at least one program product having a set (such as at least one) of program modules configured to perform the functions of the embodiments of the present application.

[0119] A program / utility 40 having a set (at least one) of program modules 42 can be stored, for example, in the memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 42 generally execute the functions and / or methods in the embodiments described in the present application.

[0120] The computer device 12 can also communicate with one or more external devices 14 (such as a keyboard, a pointing device, a display 24, etc.), and can also communicate with one or more devices that enable a user to interact with the computer device 12, and / or communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 22. Moreover, the computer device 12 can also communicate with one or more networks (such as a Local Area Network (hereinafter referred to as: LAN), a Wide Area Network (hereinafter referred to as: WAN) and / or a public network, such as the Internet) through the network adapter 20. As shown in the figure, the network adapter 20 communicates with other modules of the computer device 12 through the bus 18. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0121] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the list generation method mentioned in the foregoing embodiments.

[0122] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only illustrative, and the true scope and spirit of the present application are pointed out by the following claims.

[0123] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

[0124] It should be noted that in the description of the present application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0125] Any process or method description in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be executed in a manner that is not shown or discussed, including in a substantially simultaneous manner according to the involved functions or in a reverse order, which should be understood by those skilled in the technical field of the embodiments of the present application.

[0126] It should be understood that each part of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following technologies well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0127] Those of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0128] In addition, each functional unit in various embodiments of the present application may be integrated into a processing module, may exist physically alone for each unit, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0129] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.

[0130] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0131] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A method for generating a list, characterized in that, applied to a client, the method includes: Obtaining an identifier of the list to be generated; Determining first list data corresponding to the identifier of the list to be generated, the first list data including: the unit types of at least one area unit corresponding to the list to be generated, and a plurality of list element identifiers corresponding to the unit types; Creating area units corresponding to the unit types in the list running environment, and configuring a plurality of initial list elements corresponding to the plurality of list element identifiers in the area units; Obtaining a first document object model corresponding to the area unit, the first document object model including: a plurality of page effect information respectively corresponding to the plurality of list element identifiers; Describing the plurality of initial list elements corresponding to the plurality of page effect information respectively to generate the list to be generated.

2. The method according to claim 1, characterized in that, The determining the first list data corresponding to the identifier of the list to be generated includes: Obtaining a second document object model of the page to which the list to be generated belongs, the second document object model being used to manage second list data of a plurality of lists in the page, the second list data including: the unit types of a plurality of area units respectively corresponding to the plurality of lists, and list element identifiers corresponding to the unit types; Determining, from the second document object model, the second list data of the list corresponding to the identifier of the list to be generated, and using the second list data as the first list data.

3. The method according to claim 2, characterized in that, Before the determining the first list data corresponding to the identifier of the list to be generated, it further includes: Creating a second document object model of the page to which the list to be generated belongs in the list running environment; Creating the first document object model according to the unit types of at least one area unit corresponding to the list to be generated in the second document object model and a plurality of page effect information respectively corresponding to the plurality of list element identifiers corresponding thereto.

4. The method according to claim 1, characterized in that, After the describing the plurality of initial list elements corresponding to the plurality of page effect information respectively to generate the list to be generated, it further includes: Obtaining a target list element identifier and target page effect information corresponding to the target list element identifier; Generating an intermediate document object model according to the target list element identifier and the target page effect information; Updating the first document object model according to the intermediate document object model.

5. The method according to claim 4, characterized in that, The updating the first document object model according to the intermediate document object model includes: Determining the difference information between the intermediate document object model and the first document object model; If the difference information meets the set conditions, then updating the page effect information of the list element identifier corresponding to the target list element identifier in the first document object model according to the target page effect information.

6. The method according to claim 1, It is characterized in that Before obtaining the identifier of the list to be generated, it further includes: When it is determined that the current interface of the client loads the page to which the list to be generated belongs, create the list running environment.

7. A list generation device It is characterized in that Applied to a client, the device includes: A first acquisition module, configured to acquire an identifier of a list to be generated; A determination module, configured to determine first list data corresponding to the identifier of the list to be generated, where the first list data includes: unit types of at least one area unit corresponding to the list to be generated, and a plurality of list element identifiers corresponding to the unit types; A first creation module, configured to create area units corresponding to the unit types in the list running environment, and configure a plurality of initial list elements corresponding to the plurality of list element identifiers in the area units respectively; A second acquisition module, configured to acquire a first document object model corresponding to the area unit, where the first document object model includes: a plurality of page effect information corresponding to the plurality of list element identifiers respectively; A generation module, configured to use the plurality of page effect information to describe the corresponding plurality of initial list elements respectively to generate the list to be generated.

8. The device according to claim 7 It is characterized in that The determination module is specifically configured to: Acquire a second document object model of the page to which the list to be generated belongs, where the second document object model is used to manage second list data of a plurality of lists in the page, and the second list data includes: unit types of a plurality of area units corresponding to the plurality of lists respectively, and list element identifiers corresponding to the unit types; Determine, from the second document object model, second list data of the list corresponding to the identifier of the list to be generated, and use the second list data as the first list data.

9. The device according to claim 8 It is characterized in that It further includes: A second creation module, configured to create a second document object model of the page to which the list to be generated belongs in the list running environment before determining the first list data corresponding to the identifier of the list to be generated; A third creation module, configured to create the first document object model according to the unit types of at least one area unit corresponding to the list to be generated in the second document object model, and a plurality of page effect information corresponding to a plurality of list element identifiers corresponding thereto respectively.

10. The device according to claim 7 It is characterized in that It further includes: A reuse module, configured to acquire a target list element identifier and target page effect information corresponding to the target list element identifier, generate an intermediate document object model according to the target list element identifier and the target page effect information, and update the first document object model according to the intermediate document object model.

11. The device according to claim 10 It is characterized in that The reuse module is specifically configured to: Determine the difference information between the intermediate document object model and the first document object model; If the difference information meets the set conditions, update the page effect information of the list element identifier corresponding to the target list element identifier in the first document object model according to the target page effect information.

12. The apparatus according to claim 7, wherein, further comprising: a fourth creation module, configured to create the list running environment when it is determined that the current interface of the client loads the page to which the list to be generated belongs.

13. A computer device, wherein, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, implementing the method according to any one of claims 1-6.

14. A storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and equipment for generating list

    CN102339291A

  • Webpage list display method and device

    CN110717120A