Page data assembly method and device, storage medium and electronic equipment
By using a cached database and asynchronous callback mechanism during the page data assembly process, combined with multi-threaded processing, the excessive time consumption and IO blocking issues of the waterfall-style page data assembly method are resolved, resulting in faster page loading efficiency and an optimized user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2022-12-02
- Publication Date
- 2026-05-15
AI Technical Summary
The existing waterfall-style page data assembly method is too time-consuming and suffers from IO blocking issues, resulting in low page loading efficiency.
By employing a cached database and an asynchronous callback mechanism, data dependencies are read from the cached database and processed in parallel using multi-threading to directly populate the page area, avoiding duplicate requests and IO blocking.
It significantly shortens page data assembly time, improves page loading efficiency, reduces IO overhead, and optimizes user experience.
Smart Images

Figure CN115828008B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for assembling page data, a storage medium, and an electronic device. Background Technology
[0002] In app (application) user experience evaluation, the request efficiency of a page (containing corresponding data items) is the most basic factor. The faster and more efficient the page (data) loading, the better the user experience. Currently, mobile servers typically adopt a waterfall-style page data assembly method to respond to page requests. This method pre-configures relevant page data items before responding to the page request, which is used to handle relevant interface dependencies and assemble the corresponding page data according to the configuration items when responding to the page request. When the server responds to the app request, it generally involves three steps: merging duplicate data dependencies, calling remote interfaces or reading databases, and assembling data. Among them, data dependencies refer to a remote interface call or a local database read that requires IO consumption (input / output stream and memory consumption).
[0003] However, the step of merging duplicate dependencies requires traversing the data dependencies corresponding to each page area in the entire page data structure. The subsequent data assembly and filling steps also require repeated traversal. Therefore, the page data assembly method is very time-consuming. In addition, the waterfall-style page data assembly method will block IO (input / output) during the interval between different steps, and this blocking process will also take some time. Therefore, it further exacerbates the problem of the excessive time consumption of the waterfall-style page data assembly method. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this disclosure provide a page data assembly method and apparatus, a storage medium, and an electronic device.
[0005] In a first aspect, embodiments of this disclosure provide a method for assembling page data, the method comprising:
[0006] In response to the received page data assembly request, determine the data dependencies to be queried for each page area based on the page data assembly request;
[0007] For each data dependency corresponding to each page region, perform the following steps:
[0008] Retrieve the callback handle corresponding to the data dependency of the data to be queried from the preset cache database, and populate the page area corresponding to the data dependency of the data to be queried with the callback handle;
[0009] The system reads the data dependency to be queried from the preset cache database. If the data dependency to be queried does not exist in the preset cache database, it reads the data dependency to be queried from the preset source database. The data dependency read from the preset source database is stored in the preset cache database, and the data dependency is filled into the corresponding page area.
[0010] For each page region, when the data dependencies corresponding to the current page region are filled, the callback handle corresponding to the current page region is marked as executed. This process continues until the callback handles corresponding to all page regions are marked as executed, at which point the page data assembly result is returned.
[0011] In one possible implementation, the method further includes:
[0012] If the data dependency to be queried exists in the preset cache database, the data dependency read from the preset cache database will be directly filled into the corresponding page area.
[0013] In one possible implementation, the number of data dependencies corresponding to the current page region exceeds one. For each page region, when the data dependencies corresponding to the current page region are fully populated, marking the callback handle corresponding to the current page region as executed is complete, including:
[0014] When each data dependency in each page area is populated, the callback handle of the current data dependency in the current page area is marked as executed, until the callback handles of all data dependencies in the current page area are marked as executed.
[0015] In one possible implementation, the method further includes:
[0016] For multiple different data dependencies read simultaneously, multi-threaded parallel processing is used to fill the corresponding page areas of each different data dependency.
[0017] In one possible implementation, determining the data dependencies to be queried for each page region based on the page data assembly request includes:
[0018] Obtain the correspondence between page regions and data dependencies from the page data assembly request;
[0019] Based on the correspondence between page regions and data dependencies, each page region is traversed, and each data dependency corresponding to the current page region is obtained in the traversal order, so as to perform subsequent operations on each data dependency.
[0020] In one possible implementation, before populating the corresponding page area with the data dependencies, the method includes:
[0021] When a data dependency is read from a preset source database, its corresponding callback handle is marked as the start of execution, so as to display the filling progress during the process of filling the data dependency into its corresponding page area.
[0022] In one possible implementation, the page is an application page or a web page.
[0023] Secondly, embodiments of this disclosure provide a page data assembly apparatus, comprising:
[0024] The data population module is used to respond to the received page data assembly request, determine the data dependency to be queried corresponding to each page area according to the page data assembly request; populate the callback handle into the page area corresponding to the data dependency to be queried; populate the data dependency into the page area corresponding to it; for each page area, when the data dependency corresponding to the current page area is populated, mark the callback handle corresponding to the current page area as the end of execution, until the callback handles corresponding to all page areas are marked as the end of execution, and return the page data assembly result;
[0025] The data dependency request module is used to, for each data dependency to be queried corresponding to each page area, read the callback handle corresponding to the data dependency to be queried from the preset cache database, read the data dependency to be queried from the preset cache database, and if the data dependency to be queried does not exist in the preset cache database, read the data dependency to be queried from the preset source database; and store the data dependency read from the preset source database into the preset cache database.
[0026] The data temporary storage module is used to provide a preset cache database.
[0027] Thirdly, embodiments of this disclosure provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0028] Memory, used to store computer programs;
[0029] The processor, when executing a program stored in memory, implements the page data assembly method described above.
[0030] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the page data assembly method described above.
[0031] Compared with the prior art, the technical solutions provided in this disclosure have at least some or all of the following advantages:
[0032] The page data assembly method described in this disclosure, in response to a received page data assembly request, determines the data dependency to be queried corresponding to each page region based on the page data assembly request; for each data dependency to be queried corresponding to each page region, the following steps are performed: reading the callback handle corresponding to the data dependency to be queried from a preset cache database, and filling the callback handle into the page region corresponding to the data dependency to be queried; reading the data dependency to be queried from the preset cache database; if the data dependency to be queried does not exist in the preset cache database, reading the data dependency to be queried from the preset source database. The obtained data dependencies are stored in a preset cache database, and the data dependencies are populated into their corresponding page areas. For each page area, when the data dependencies corresponding to the current page area are populated, the callback handle corresponding to the current page area is marked as executed. This process continues until the callback handles corresponding to all page areas are marked as executed, at which point the page data assembly result is returned. This method combines callback handles and the cache database to directly avoid duplicate requests for data dependencies. Compared with the existing technology that avoids duplicate requests for data dependencies by traversing the data dependencies corresponding to each page area in the entire page data structure, this method greatly saves the time required for page data assembly requests. Attached Figure Description
[0033] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0034] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0035] Figure 1 This illustration schematically shows a flowchart of a page data assembly method according to an embodiment of the present disclosure;
[0036] Figure 2 This illustration schematically shows an application flow diagram of the page data assembly method according to an embodiment of the present disclosure;
[0037] Figure 3 A schematic diagram illustrating the structure of a page data assembly apparatus according to an embodiment of the present disclosure is shown; and
[0038] Figure 4 A schematic block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0040] See Figure 1 The embodiments of this disclosure provide a method for assembling page data, the method comprising:
[0041] S1, in response to the received page data assembly request, determine the data dependencies to be queried for each page area according to the page data assembly request;
[0042] In practical applications, the page is an application page or a web page.
[0043] S2, for each data dependency corresponding to each page area, read the callback handle corresponding to the data dependency from the preset cache database, and fill the callback handle into the page area corresponding to the data dependency.
[0044] In practical applications, callback handles are used to model operations on asynchronous callback results. Generally, after the data dependency retrieval operation is completed, the subsequent operation associated with the callback handle will be triggered immediately to ensure the continuity of data dependency retrieval and filling operations. Asynchronous callback handles have status indicators to indicate whether the current callback operation has ended, which is used to determine whether the asynchronous operation is completed.
[0045] S3, read the data dependency to be queried from the preset cache database. If the data dependency to be queried does not exist in the preset cache database, read the data dependency to be queried from the preset source database, store the data dependency read from the preset source database into the preset cache database, and fill the corresponding page area with the data dependency.
[0046] In practical applications, the default source database is either a remote database or a local database.
[0047] S4. For each page region, when the data dependencies corresponding to the current page region are filled, mark the callback handle corresponding to the current page region as executed. Until the callback handles corresponding to all page regions are marked as executed, return the page data assembly result.
[0048] In this embodiment, step S3 further includes:
[0049] If the data dependency to be queried exists in the preset cache database, the data dependency read from the preset cache database will be directly filled into the corresponding page area.
[0050] This embodiment stores the retrieved data dependencies in a preset cache database. When querying the same data dependency a second time, it can be read directly from the cache database, avoiding repeated reading of the same data dependency from the preset source database and saving time in obtaining data dependencies.
[0051] In this embodiment, in step S4, the number of data dependencies corresponding to the current page area exceeds one. For each page area, when the data dependencies corresponding to the current page area are filled, marking the callback handle corresponding to the current page area as executed is complete. This includes:
[0052] When each data dependency in each page area is populated, the callback handle of the current data dependency in the current page area is marked as executed, until the callback handles of all data dependencies in the current page area are marked as executed.
[0053] This embodiment uses data dependencies as units and fills each data dependency into its corresponding page area in the most time-efficient way through callback handles. The completion of all callback handles in the page area serves as a sign that all data dependencies in the entire page area have been filled, which can quickly determine the filling status of a page area.
[0054] In this embodiment, step S3 further includes:
[0055] For multiple different data dependencies read simultaneously, multi-threaded parallel processing is used to fill the corresponding page areas of each different data dependency.
[0056] This embodiment avoids the problem of long processing time of threaded services by using multi-threaded parallel processing, and can execute the step of populating data dependencies at the fastest speed, so as to achieve the effect of saving time in this step.
[0057] In this embodiment, step S1, determining the data dependencies to be queried for each page region based on the page data assembly request, includes:
[0058] Obtain the correspondence between page regions and data dependencies from the page data assembly request;
[0059] Based on the correspondence between page regions and data dependencies, each page region is traversed, and each data dependency corresponding to the current page region is obtained in the traversal order, so as to perform subsequent operations on each data dependency.
[0060] This embodiment obtains the dependencies of the data to be queried in order by traversing each page area, which facilitates the next step of querying each data dependency in a separate thread.
[0061] In this embodiment, in step S3, before filling the corresponding page area with the data dependency, the method includes:
[0062] When a data dependency is read from a preset source database, its corresponding callback handle is marked as the start of execution, so as to display the filling progress during the process of filling the data dependency into its corresponding page area.
[0063] This embodiment uses the identifier of the callback handle to determine the data dependency population process, making it convenient to view the data dependency population progress.
[0064] See Figure 2 Taking a page as an application page, with a page structure including 4 page areas, and the data dependency corresponding to area 1 is A, the data dependency corresponding to area 2 is B, the data dependencies corresponding to area 3 are A and C, and the data dependency corresponding to area 4 is D, the page data assembly method of this embodiment is explained.
[0065] When the data filling module receives a request from the APP page, it directly traverses the data dependencies corresponding to page areas 1, 2, 3, and 4, and hands the data dependency request over to the data dependency request module for processing. The data dependency request module analyzes and accepts the data dependency request, and returns the asynchronous callback handle of the data dependency to the data filling module. Then, it reads the data dependency from the data temporary storage module or the preset source database. When filling data in area 3, the handle of data dependency A is actually the same as the callback handle corresponding to data dependency A in area 1. In this embodiment, the same data dependency can be ensured to be retrieved from the preset source database only once without traversing and merging dependencies first. After all asynchronous handles have returned the results of the completed execution to the filling areas 1, 2, 3, and 4, the filled page data is returned.
[0066] The page data assembly method in this embodiment asynchronously processes the interface requests for reading data dependencies through callback handles, which avoids the time overhead caused by thread blocking. Furthermore, it uses a preset cache database to store the query results of data dependencies and filters duplicate requests by uniformly managing response data in the context of query results, thus avoiding unnecessary time consumption. At the same time, during the process of filtering duplicate requests, there is no need to merge request dependencies in advance, which further saves the response time of server-side page requests. Therefore, it greatly saves the time spent by the server in assembling page data and maximizes the user experience in this stage.
[0067] The entire data assembly process of the page data assembly method in this embodiment conforms to the asynchronous and non-blocking characteristics of NIO. All page-dependent data items are filled by operating asynchronous callback handles. In this process, there is no need to block the process to perform the next operation, which further optimizes the time overhead.
[0068] See Figure 3 The embodiments of this disclosure provide a page data assembly apparatus, including:
[0069] The data filling module 11 is used to respond to the received page data assembly request, determine the data dependency to be queried corresponding to each page area according to the page data assembly request; fill the callback handle into the page area corresponding to the data dependency to be queried; fill the data dependency into the page area corresponding to it; for each page area, when the data dependency corresponding to the current page area is filled, mark the callback handle corresponding to the current page area as the end of execution, until the callback handles corresponding to all page areas are marked as the end of execution, and return the page data assembly result;
[0070] The data dependency request module 12 is used to, for each data dependency to be queried corresponding to each page area, read the callback handle corresponding to the data dependency to be queried from the preset cache database, read the data dependency to be queried from the preset cache database, and if the data dependency to be queried does not exist in the preset cache database, read the data dependency to be queried from the preset source database; and store the data dependency read from the preset source database into the preset cache database.
[0071] The data temporary storage module 13 is used to provide a preset cache database.
[0072] In practical applications, the data population module 11 includes a traversal iteration unit and an asynchronous response populationr, wherein,
[0073] The traversal iteration unit is used to respond to the received page data assembly request and determine the data dependencies to be queried for each page area according to the page data assembly request. For each page area, when the data dependencies corresponding to the current page area are filled, the callback handle corresponding to the current page area is marked as the end of execution. The page data assembly result is returned when the callback handles corresponding to all page areas are marked as the end of execution.
[0074] An asynchronous response filler is used to fill the page area corresponding to the data dependency to be queried with callback handles; and to fill the page area corresponding to the data dependency.
[0075] In this embodiment, the data dependency request module 12 is further configured to:
[0076] If the data dependency to be queried exists in the preset cache database, the data dependency read from the preset cache database will be directly filled into the corresponding page area.
[0077] In this embodiment, since the number of data dependencies corresponding to the current page area exceeds one, the data filling module 11 is further configured to:
[0078] When each data dependency in each page area is populated, the callback handle of the current data dependency in the current page area is marked as executed, until the callback handles of all data dependencies in the current page area are marked as executed.
[0079] In this embodiment, the data filling module 11 is further configured to:
[0080] For multiple different data dependencies read simultaneously, multi-threaded parallel processing is used to fill the corresponding page areas of each different data dependency.
[0081] In this embodiment, the data filling module 11 is further configured to:
[0082] Obtain the correspondence between page regions and data dependencies from the page data assembly request;
[0083] Based on the correspondence between page regions and data dependencies, each page region is traversed, and each data dependency corresponding to the current page region is obtained in the traversal order, so as to perform subsequent operations on each data dependency.
[0084] In this embodiment, the data filling module 11 is further configured to:
[0085] When a data dependency is read from a preset source database, its corresponding callback handle is marked as the start of execution, so as to display the filling progress during the process of filling the data dependency into its corresponding page area.
[0086] In this embodiment, the page in the data filling module 11 is an application page or a web page.
[0087] The page data assembly device in this embodiment caches all handles through a data temporary storage module and manages all data dependencies of the page in conjunction with a data dependency request module. This ensures that the extraction operation of all identical dependencies is performed only once, which saves IO overhead and avoids the page analysis operation required for waterfall-style page data assembly, thus avoiding the corresponding time overhead.
[0088] The page data assembly device in this embodiment assembles page data according to the correspondence between page regions and data dependencies, minimizing time consumption throughout the data assembly process. Unlike the traditional waterfall-style page data assembly method, this embodiment avoids duplicate requests for data dependencies and does not require additional traversal of data dependencies across all page regions of the entire page structure, thus avoiding time consumption in this step. The more complex the page structure, the more significant this time saving effect becomes. Furthermore, unlike the blocking mechanism of waterfall-style BIO (where the server implementation mode is one thread per connection, meaning the server needs to start a thread to process each client connection request), this embodiment's device conforms to the NIO (Synchronous Non-blocking I / O, which uses an event-driven approach to implement a multiplexer that listens for I / O events from multiple clients) design specification. The entire data assembly process is completed entirely through reactive processing, avoiding the time waiting issues between steps in the waterfall-style page data assembly method, further shortening the overall page data assembly time. The more complex the page structure, the more significant the time reduction advantage of this embodiment's device compared to the traditional waterfall solution becomes. Typically, the page request time consumption in this embodiment can save more than 1 / 3 of the time compared to the waterfall method.
[0089] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0090] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0091] In the second embodiment described above, any plurality of the data filling module 11, data dependency request module 12, and data temporary storage module 13 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. At least one of the data filling module 11, data dependency request module 12, and data temporary storage module 13 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the data filling module 11, data dependency request module 12, and data temporary storage module 13 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0092] See Figure 4 The electronic device provided in the embodiments of this disclosure includes a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140.
[0093] Memory 1130 is used to store computer programs;
[0094] When processor 1110 executes a program stored in memory 1130, it implements the following page data assembly method:
[0095] In response to the received page data assembly request, determine the data dependencies to be queried for each page area based on the page data assembly request;
[0096] For each data dependency corresponding to each page region, perform the following steps:
[0097] Retrieve the callback handle corresponding to the data dependency in the preset cache database, and populate the page area corresponding to the data dependency in the query.
[0098] The system reads the data dependency to be queried from the preset cache database. If the data dependency to be queried does not exist in the preset cache database, it reads the data dependency to be queried from the preset source database. The data dependency read from the preset source database is stored in the preset cache database, and the data dependency is filled into the corresponding page area.
[0099] For each page region, when the data dependencies corresponding to the current page region are filled, the callback handle corresponding to the current page region is marked as executed. This process continues until the callback handles corresponding to all page regions are marked as executed, at which point the page data assembly result is returned.
[0100] The aforementioned communication bus 1140 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.
[0101] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.
[0102] The memory 1130 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1130 may also be at least one storage device located remotely from the aforementioned processor 1110.
[0103] The processor 1110 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0104] Embodiments of this disclosure also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the page data assembly method described above.
[0105] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the page data assembly method according to the embodiments of this disclosure.
[0106] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0107] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0108] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for assembling page data, characterized in that, The method includes: In response to the received page data assembly request, determine the data dependencies to be queried for each page area based on the page data assembly request; For each data dependency corresponding to each page region, perform the following steps: Retrieve the callback handle corresponding to the data dependency of the data to be queried from the preset cache database, and populate the page area corresponding to the data dependency of the data to be queried with the callback handle; The system reads the data dependency to be queried from the preset cache database. If the data dependency to be queried does not exist in the preset cache database, it reads the data dependency to be queried from the preset source database. The data dependency read from the preset source database is stored in the preset cache database, and the data dependency is filled into the corresponding page area. For each page region, when the data dependencies corresponding to the current page region are filled, the callback handle corresponding to the current page region is marked as finished, until the callback handles corresponding to all page regions are marked as finished, and then the page data assembly result is returned. The step of determining the data dependencies to be queried for each page region based on the page data assembly request includes: Obtain the correspondence between page regions and data dependencies from the page data assembly request; Based on the correspondence between page regions and data dependencies, each page region is traversed, and each data dependency corresponding to the current page region is obtained in the traversal order, so as to perform subsequent operations on each data dependency.
2. The method according to claim 1, characterized in that, The method further includes: If the data dependency to be queried exists in the preset cache database, the data dependency read from the preset cache database will be directly filled into the corresponding page area.
3. The method according to claim 1, characterized in that, The number of data dependencies corresponding to the current page area exceeds one. For each page area, when the data dependencies corresponding to the current page area are fully populated, the callback handle corresponding to the current page area is marked as having finished execution, including: When each data dependency in each page area is populated, the callback handle of the current data dependency in the current page area is marked as executed, until the callback handles of all data dependencies in the current page area are marked as executed.
4. The method according to claim 1, characterized in that, The method further includes: For multiple different data dependencies read simultaneously, multi-threaded parallel processing is used to fill the corresponding page areas of each different data dependency.
5. The method according to claim 1, characterized in that, Before populating the corresponding page area with the data dependencies, the method includes: When a data dependency is read from a preset source database, its corresponding callback handle is marked as the start of execution, so as to display the filling progress during the process of filling the data dependency into its corresponding page area.
6. The method according to claim 1, characterized in that, The page can be an application page or a web page.
7. A page data assembly device, characterized in that, include: The data population module is used to respond to the received page data assembly request and determine the data dependencies to be queried for each page area according to the page data assembly request; Populate the callback handle into the page area corresponding to the data dependency to be queried; The data dependencies are filled into their corresponding page areas. For each page area, when the data dependencies of the current page area are filled, the callback handle of the current page area is marked as executed. The execution ends when the callback handles of all page areas are marked as executed. The page data assembly result is then returned. The data dependency request module is used to read the callback handle corresponding to the data dependency to be queried from the preset cache database for each data dependency to be queried for each page area, and to read the data dependency to be queried from the preset cache database. If the data dependency to be queried does not exist in the preset cache database, the data dependency to be queried is read from the preset source database. Data dependencies read from the preset source database will be stored in the preset cache database. The data temporary storage module is used to provide a preset cache database; The step of determining the data dependencies to be queried for each page region based on the page data assembly request includes: Obtain the correspondence between page regions and data dependencies from the page data assembly request; Based on the correspondence between page regions and data dependencies, each page region is traversed, and each data dependency corresponding to the current page region is obtained in the traversal order, so as to perform subsequent operations on each data dependency.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the page data assembly method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the page data assembly method according to any one of claims 1-6.