CN115828008A - Page data assembling method and device, storage medium and electronic equipment - Google Patents

Page data assembling method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115828008A
CN115828008A CN202211543173.9A CN202211543173A CN115828008A CN 115828008 A CN115828008 A CN 115828008A CN 202211543173 A CN202211543173 A CN 202211543173A CN 115828008 A CN115828008 A CN 115828008A
Authority
CN
China
Prior art keywords
data
page
item
page area
queried
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211543173.9A
Other languages
Chinese (zh)
Inventor
李温良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202211543173.9A priority Critical patent/CN115828008A/en
Publication of CN115828008A publication Critical patent/CN115828008A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure relates to a page data assembly method and device, a storage medium and an electronic device, wherein the method comprises the following steps: responding to a received page data assembly request, and determining a data dependence item to be queried according to the page data assembly request; for each data dependent item to be queried, reading a callback handle corresponding to the data dependent item from a preset cache database, and filling the callback handle into a page area corresponding to the data dependent item; when the data dependency item to be inquired does not exist in the preset cache database, the data dependency item read from the preset source database is stored in the preset cache database, and the data dependency item is filled in the corresponding page area; and when the callback handles corresponding to all the page areas are marked as the execution end, returning a page data assembly result, and avoiding repeated requests of data dependent items through the callback handles.

Description

Page data assembling method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page data assembly method and apparatus, a storage medium, and an electronic device.
Background
In the evaluation of APP (application program) use experience, the request efficiency of a page (containing corresponding data items) is the most basic item, and the faster and more efficient page (data) loading brings better use experience, currently, a waterfall type page data assembly mode is usually adopted by a mobile server to respond to a page request, the page data assembly mode presets relevant configuration items of page data before the corresponding page request, and is used for processing relevant interface dependencies and assembling corresponding page data according to the configuration items when the corresponding page request is made, and the server roughly comprises three steps of combining repeated data dependencies, calling a remote interface or reading a database and assembling data when responding to the APP request, wherein the data dependency items refer to one remote interface call requiring IO consumption (input output stream and memory consumption) or reading a local database.
However, in the step of merging the repeated dependency items, data dependency items corresponding to each page area in the whole page data structure need to be traversed, and a filling link of subsequent assembly data also needs to be traversed repeatedly, so that the page data assembly method takes a long time, in addition, an IO (input/output) in an interval process executed in different steps is blocked by the waterfall type page data assembly method, and the blocking process also takes a certain time, thereby further aggravating the problem that the waterfall type page data assembly method takes a long time.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a page data assembling method and apparatus, a storage medium, and an electronic device.
In a first aspect, an embodiment of the present disclosure provides a page data assembly method, where the method includes:
responding to a received page data assembly request, and determining a data dependence item to be queried corresponding to each page area according to the page data assembly request;
for each data dependency item to be queried corresponding to each page area, executing the following steps:
reading a callback handle corresponding to the to-be-queried data dependent item from a preset cache database, and filling the callback handle into a page area corresponding to the to-be-queried data dependent item;
reading a data dependency item to be queried in a preset cache database, reading the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database, storing the data dependency item read from the preset source database into the preset cache database, and filling the data dependency item into a corresponding page area;
and for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end.
In one possible embodiment, the method further comprises:
and when the data dependency item to be inquired exists in the preset cache database, directly filling the data dependency item read from the preset cache database into the corresponding page area.
In a possible implementation manner, the number of the data dependent items corresponding to the current page area exceeds one, and for each page area, when the data dependent item corresponding to the current page area is completely filled, identifying the callback handle corresponding to the current page area as the end of execution includes:
and when each data dependent item corresponding to each page area is filled, marking the callback handle of the current data dependent item corresponding to the current page area as the execution end until the callback handles of all the data dependent items corresponding to the current page area are marked as the execution end.
In one possible embodiment, the method further comprises:
and for a plurality of different data dependent items which are read simultaneously, filling the plurality of different data dependent items into respective corresponding page areas through multithread parallel processing.
In a possible implementation manner, the determining, according to the page data assembly request, the to-be-queried data dependent item corresponding to each page area includes:
acquiring a corresponding relation between a page area and a data dependence item from a page data assembly request;
and traversing each page area based on the corresponding relation between the page area and the data dependent item, and acquiring each to-be-queried data dependent item corresponding to the current page area according to the traversal sequence so as to execute subsequent operation on each to-be-queried data dependent item.
In one possible implementation, before the populating the data dependent item to the page area corresponding thereto, the method includes:
when a data dependent item is read from a preset source database, a callback handle corresponding to the data dependent item is marked as the beginning of execution, so that the filling progress is displayed in the process of filling the data dependent item to a page area corresponding to the data dependent item.
In one possible embodiment, the page is an application page or a web page.
In a second aspect, an embodiment of the present disclosure provides a page data assembling apparatus, including:
the data filling module is used for responding to the received page data assembly request and determining the data dependence item to be inquired corresponding to each page area according to the page data assembly request; filling the callback handle into a page area corresponding to the data dependency to be queried; filling the data dependent item into a page area corresponding to the data dependent item; for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end;
the data dependency item request module is used for reading a callback handle corresponding to the data dependency item to be queried from a preset cache database for each data dependency item to be queried corresponding to each page area, reading the data dependency item to be queried from the preset cache database, and reading the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database; storing the data dependence items read from the preset source database into a preset cache database,
and the data temporary storage module is used for providing a preset cache database.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the page data assembling method when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the page data assembly method described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure at least has part or all of the following advantages:
the page data assembling method disclosed by the embodiment of the disclosure is used for responding to a received page data assembling request, and determining a data dependence item to be inquired corresponding to each page area according to the page data assembling request; for each data dependency item to be queried corresponding to each page area, executing the following steps: reading a callback handle corresponding to the to-be-queried data dependent item from a preset cache database, and filling the callback handle into a page area corresponding to the to-be-queried data dependent item; reading a data dependency item to be queried in a preset cache database, reading the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database, storing the data dependency item read from the preset source database into the preset cache database, and filling the data dependency item into a corresponding page area; for each page area, when the data dependent item corresponding to the current page area is filled, the callback handle corresponding to the current page area is marked as the execution end, and page data assembly results are returned until the callback handles corresponding to all the page areas are marked as the execution end.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the related art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 schematically shows a flow diagram of a page data assembly method according to an embodiment of the disclosure;
FIG. 2 schematically shows an application flow diagram of a page data assembly method according to an embodiment of the present disclosure;
FIG. 3 is a block diagram schematically illustrating a structure of a page data assembling apparatus according to an embodiment of the present disclosure; and
fig. 4 schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Referring to fig. 1, an embodiment of the present disclosure provides a page data assembly method, including:
s1, responding to a received page data assembly request, and determining a data dependence item to be queried corresponding to each page area according to the page data assembly request;
in practical application, the page is an application page or a network page.
S2, for each to-be-queried data dependent item corresponding to each page area, reading a callback handle corresponding to the to-be-queried data dependent item from a preset cache database, and filling the callback handle into the page area corresponding to the to-be-queried data dependent item;
in practical application, the callback handle is used for modeling an asynchronous callback result, and generally, after the acquisition operation of the data dependent item is finished, the subsequent operation associated with the callback handle is triggered immediately so as to ensure the continuity between the acquisition of the data dependent item and the filling operation, and the asynchronous callback handle has a state for identifying whether the current callback operation is finished or not so as to judge whether the asynchronous operation is finished or not.
S3, reading the data dependence item to be queried in a preset cache database, reading the data dependence item to be queried from a preset source database when the data dependence item to be queried does not exist in the preset cache database, storing the data dependence item read from the preset source database into the preset cache database, and filling the data dependence item into a corresponding page area;
in practical application, the preset source database is a remote database or a local database.
And S4, for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end.
In this embodiment, in step S3, the method further includes:
and when the data dependency item to be inquired exists in the preset cache database, directly filling the data dependency item read from the preset cache database into the corresponding page area.
In this embodiment, the data dependent items obtained by the query are stored in the preset cache database, and can be directly read from the cache database when the same data dependent item is queried for the second time, so that the repeated reading of the same data dependent item to be queried from the preset source database is avoided, and the acquisition time of the data dependent item is saved.
In this embodiment, in step S4, the number of the data dependent items corresponding to the current page area exceeds one, and for each page area, when the data dependent item corresponding to the current page area is filled, identifying the callback handle corresponding to the current page area as the end of execution, includes:
and when each data dependent item corresponding to each page area is filled, marking the callback handle of the current data dependent item corresponding to the current page area as the execution end until the callback handles of all the data dependent items corresponding to the current page area are marked as the execution end.
In the embodiment, each data dependent item is filled into the corresponding page area in a time-saving manner by using the callback handle as a unit, so that all callback handle identifiers in the page area are all executed, and the callback handle identifiers are used as marks for completing filling of all data dependent items in the whole page area, thereby being capable of quickly determining the filling condition of one page area.
In this embodiment, in step S3, the method further includes:
and for a plurality of different data dependent items which are read simultaneously, filling the plurality of different data dependent items into respective corresponding page areas through multithread parallel processing.
The embodiment avoids the problem of long time consumption of the thread service by multi-thread parallel processing, and can execute the step of filling the data dependence item at the fastest speed so as to achieve the effect of saving time in the step.
In this embodiment, in step S1, the determining, according to the page data assembly request, the to-be-queried data dependent item corresponding to each page area includes:
acquiring a corresponding relation between a page area and a data dependence item from a page data assembly request;
and traversing each page area based on the corresponding relation between the page area and the data dependent item, and acquiring each to-be-queried data dependent item corresponding to the current page area according to the traversal sequence so as to execute subsequent operation on each to-be-queried data dependent item.
In the embodiment, the data dependent items to be queried are obtained in sequence by traversing each page area, so that the next step of sub-thread query on each data dependent item to be queried is facilitated.
In this embodiment, in step S3, before the data dependent item is filled into the page area corresponding to the data dependent item, the method includes:
when a data dependent item is read from a preset source database, a callback handle corresponding to the data dependent item is marked as the beginning of execution, so that the filling progress is displayed in the process of filling the data dependent item to a page area corresponding to the data dependent item.
The filling process of the data dependent item is determined by calling back the identifier of the handle, so that the filling progress of the data dependent item is conveniently checked.
Referring to fig. 2, the page is taken as an application page, the page structure includes 4 page areas, the data dependent item corresponding to the area 1 is a, the data dependent item corresponding to the area 2 is B, the data dependent items corresponding to the area 3 are a and C, and the data dependent item corresponding to the area 4 is D, for example, the page data assembly method of the embodiment is explained.
When receiving an APP page request, a data filling module directly traverses data dependent items corresponding to page areas 1, 2, 3, and 4, and sends the data dependent item request to a data dependent item request module for processing, the data dependent item request module analyzes and accepts according to the data dependent item request, the data dependent item request module returns an asynchronous callback handle of the data dependent item to the data filling module, and then reads the data dependent item from a data temporary storage module or a preset source database, when data filling of area 3 is performed, the handle reality of the data dependent item a is the same as the callback handle corresponding to the data dependent item a in area 1, this embodiment can ensure that the same data dependent item is extracted from the preset source database only once without traversing and merging dependent items, and when all asynchronous handles identify the execution completed results and return to filling areas 1, 2, 3, and 4, the filled page data is returned.
According to the page data assembling method, the interface request for reading the data dependent item is asynchronously processed by calling back the handle, the time overhead caused by thread blocking can be avoided, the query result of the data dependent item is stored by utilizing the preset cache database, the repeated request is filtered in a mode of uniformly managing the response data by the context of the query result, unnecessary time consumption is avoided, meanwhile, in the process of filtering the repeated request, request dependence does not need to be combined in advance, the response time of the page request of the server side is further saved, and therefore, the time consumption of the server side for assembling the page data is greatly saved, and the user experience of the link is guaranteed to the maximum extent.
The whole data assembly process of the page data assembly method of the embodiment accords with the NIO asynchronous non-blocking characteristic, all page dependent data items are filled by operating asynchronous callback handles, the process is not required to be blocked for the next operation, and the time overhead is further optimized.
Referring to fig. 3, an embodiment of the present disclosure provides a page data assembling apparatus, including:
the data filling module 11 is configured to, in response to the received page data assembly request, determine a to-be-queried data dependent item corresponding to each page area according to the page data assembly request; filling the callback handle into a page area corresponding to the data dependency to be queried; filling the data dependent item into a page area corresponding to the data dependent item; for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end;
a data dependency item request module 12, configured to, for each data dependency item to be queried corresponding to each page area, read a callback handle corresponding to the data dependency item to be queried from a preset cache database, read the data dependency item to be queried in the preset cache database, and read the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database; storing the data dependence items read from the preset source database into a preset cache database,
and the data temporary storage module 13 is used for providing a preset cache database.
In practical applications, the data stuffing module 11 includes a traversal iteration unit and an asynchronous response stuffer, wherein,
the traversal iteration unit is used for responding to the received page data assembly request and determining the data dependence item to be inquired corresponding to each page area according to the page data assembly request; for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end;
the asynchronous response populator is used for populating the callback handle into a page area corresponding to the data dependency item to be queried; and filling the data dependent item into a page area corresponding to the data dependent item.
In this embodiment, the data dependent item request module 12 is further configured to:
and when the data dependency item to be inquired exists in the preset cache database, directly filling the data dependency item read from the preset cache database into the corresponding page area.
In this embodiment, the number of the data dependent items corresponding to the current page area exceeds one, and the data padding module 11 is further configured to:
and when each data dependent item corresponding to each page area is filled, marking the callback handle of the current data dependent item corresponding to the current page area as the execution end until the callback handles of all the data dependent items corresponding to the current page area are marked as the execution end.
In this embodiment, the data padding module 11 is further configured to:
and for a plurality of different data dependent items which are read simultaneously, filling the plurality of different data dependent items into respective corresponding page areas through multithread parallel processing.
In this embodiment, the data padding module 11 is further configured to:
acquiring a corresponding relation between a page area and a data dependence item from a page data assembly request;
and traversing each page area based on the corresponding relation between the page area and the data dependent item, and acquiring each to-be-queried data dependent item corresponding to the current page area according to the traversal sequence so as to execute subsequent operation on each to-be-queried data dependent item.
In this embodiment, the data padding module 11 is further configured to:
when a data dependent item is read from a preset source database, a callback handle corresponding to the data dependent item is marked as the beginning of execution, so that the filling progress is displayed in the process of filling the data dependent item to a page area corresponding to the data dependent item.
In this embodiment, in the data filling module 11, the page is an application page or a web page.
The page data assembling device of the embodiment caches all handles through the data temporary storage module, manages all data dependent items of the page by combining the data dependent item request module, achieves that all extraction operations of the same dependent item are only performed once, saves IO (input/output) overhead, avoids a page analysis operation required by waterfall type page data assembling, and avoids the overhead of corresponding time.
The page data assembling device of this embodiment assembles page data according to a corresponding relationship between page areas and data dependent items, and reduces time consumption to the maximum extent in the whole data assembling process, which is different from a conventional waterfall type page data assembling method, and the page data assembling device of this embodiment avoids time consumption of this step because the data dependent items are repeatedly requested, and at the same time, does not need to additionally traverse the data dependent items of each page area of the whole page structure, and avoids time consumption of this step, and the time saving effect of this part is more obvious when the page structure is more complex, and in addition, different from a blocking manner caused by a waterfall type BIO (the server implementation mode is a mode of connecting one thread, i.e., when a client has a connection request, the server needs to start one thread to process), the device of this embodiment conforms to the design specification of NIO (synchronous non-blocking IO, and an event-driven idea is adopted to monitor IO events from multiple clients by one multiplexer), and the whole data assembling process is completely completed by a corresponding formula, thereby avoiding the time problem caused by the waterfall steps of the waterfall-distributed type page data assembling method, further reducing the time consumption of the page data assembling device, and compared with the conventional waterfall-over-distributed type page data assembling method, the advantages of this embodiment, which can reduce the time consumption of the waterfall-over-by the conventional waterfall-distributed type page data assembling method, and the time consumption, and the waterfall the time consumption of this embodiment, and the waterfall the more obvious waiting method.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present invention. One of ordinary skill in the art can understand and implement it without inventive effort.
In the second embodiment, any plurality of the data filling module 11, the data dependency request module 12, and the data temporary storage module 13 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. At least one of the data population module 11, the data dependency request module 12 and the data staging module 13 may be implemented at least partially as a hardware circuit, 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 a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware by any other reasonable way of integrating or packaging a circuit, or in any one of three implementations of software, hardware and firmware, or in any suitable combination of any of them. Alternatively, at least one of the data population module 11, the data dependency request module 12 and the data staging module 13 may be implemented at least in part as a computer program module that, when executed, may perform a corresponding function.
Referring to fig. 4, an electronic device provided in an embodiment of the present disclosure includes a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, where the processor 1110, the communication interface 1120, and the memory 1130 complete communication with each other through the communication bus 1140;
a memory 1130 for storing computer programs;
the processor 1110, when executing the program stored in the memory 1130, implements a page data assembly method as follows:
responding to a received page data assembly request, and determining a data dependence item to be queried corresponding to each page area according to the page data assembly request;
for each data dependency item to be queried corresponding to each page area, executing the following steps:
reading a callback handle corresponding to the to-be-queried data dependent item from a preset cache database, and filling the callback handle into a page area corresponding to the to-be-queried data dependent item;
reading a data dependency item to be queried in a preset cache database, reading the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database, storing the data dependency item read from the preset source database into the preset cache database, and filling the data dependency item into a corresponding page area;
and for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end.
The communication bus 1140 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 1140 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 1120 is used for communication between the electronic device and other devices.
The Memory 1130 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory 1130 may also be at least one memory device located remotely from the processor 1110.
The Processor 1110 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
Embodiments of the present disclosure also provide a computer-readable storage medium. The computer readable storage medium stores thereon a computer program which, when executed by a processor, implements the page data assembly method as described above.
The computer-readable storage medium may be contained in the apparatus/device described in the above embodiments; or may be present alone without being assembled into the device/apparatus. The computer-readable storage medium carries one or more programs which, when executed, implement a page data assembly method according to an embodiment of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for assembling page data, the method comprising:
responding to a received page data assembly request, and determining a data dependence item to be queried corresponding to each page area according to the page data assembly request;
for each data dependency item to be queried corresponding to each page area, executing the following steps:
reading callback handles corresponding to the data dependence items to be queried from a preset cache database, and filling the callback handles into the page areas corresponding to the data dependence items to be queried;
reading a data dependency item to be queried in a preset cache database, reading the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database, storing the data dependency item read from the preset source database into the preset cache database, and filling the data dependency item into a corresponding page area;
and for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end.
2. The method of claim 1, further comprising:
and when the data dependency item to be inquired exists in the preset cache database, directly filling the data dependency item read from the preset cache database into the corresponding page area.
3. The method of claim 1, wherein the number of data dependencies corresponding to the current page area exceeds one, and wherein for each page area, when the data dependencies corresponding to the current page area are completely filled, identifying the callback handle corresponding to the current page area as being completed by execution comprises:
and when each data dependent item corresponding to each page area is filled, marking the callback handle of the current data dependent item corresponding to the current page area as the execution end until the callback handles of all the data dependent items corresponding to the current page area are marked as the execution end.
4. The method of claim 1, further comprising:
and for a plurality of different data dependent items which are read simultaneously, filling the plurality of different data dependent items into respective corresponding page areas through multithread parallel processing.
5. The method according to claim 1, wherein the determining the data dependency to be queried corresponding to each page area according to the page data assembly request comprises:
acquiring a corresponding relation between a page area and a data dependence item from a page data assembly request;
and traversing each page area based on the corresponding relation between the page area and the data dependent item, and acquiring each to-be-queried data dependent item corresponding to the current page area according to the traversal sequence so as to execute subsequent operation on each to-be-queried data dependent item.
6. The method of claim 1, wherein prior to said populating said data dependent items to their corresponding page areas, said method comprises:
when a data dependent item is read from a preset source database, a callback handle corresponding to the data dependent item is marked as the beginning of execution, so that the filling progress is displayed in the process of filling the data dependent item to a page area corresponding to the data dependent item.
7. The method of claim 1, wherein the page is an application page or a web page.
8. A page data assembling apparatus, comprising:
the data filling module is used for responding to the received page data assembly request and determining the data dependence item to be inquired corresponding to each page area according to the page data assembly request; filling the callback handle into a page area corresponding to the data dependency to be queried; filling the data dependent item into a page area corresponding to the data dependent item; for each page area, when the data dependent item corresponding to the current page area is filled, marking the callback handle corresponding to the current page area as the execution end, and returning a page data assembly result until the callback handles corresponding to all the page areas are marked as the execution end;
the data dependency item request module is used for reading a callback handle corresponding to the data dependency item to be queried from a preset cache database for each data dependency item to be queried corresponding to each page area, reading the data dependency item to be queried from the preset cache database, and reading the data dependency item to be queried from a preset source database when the data dependency item to be queried does not exist in the preset cache database; storing the data dependence items read from the preset source database into a preset cache database,
and the data temporary storage module is used for providing a preset cache database.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the page data assembling method according to any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the page data assembling method of any one of claims 1 to 7.
CN202211543173.9A 2022-12-02 2022-12-02 Page data assembling method and device, storage medium and electronic equipment Pending CN115828008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211543173.9A CN115828008A (en) 2022-12-02 2022-12-02 Page data assembling method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211543173.9A CN115828008A (en) 2022-12-02 2022-12-02 Page data assembling method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115828008A true CN115828008A (en) 2023-03-21

Family

ID=85545040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211543173.9A Pending CN115828008A (en) 2022-12-02 2022-12-02 Page data assembling method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115828008A (en)

Similar Documents

Publication Publication Date Title
CN111104421A (en) Data query method and device based on data interface standard configuration
CN108255620B (en) Service logic processing method, device, service server and system
CN108600311B (en) Method and device for simulating interface data by client
CN106919438B (en) Workflow processing method and framework device in virtualization environment
CN110515795B (en) Big data component monitoring method and device and electronic equipment
CN112581018A (en) Process task management method, system, device and storage medium
CN110990001A (en) IVR (Interactive Voice response) process execution method and device
CN108549652B (en) Hotel dynamic data acquisition method and device, electronic equipment and readable storage medium
CN112182452A (en) Page component rendering processing method, device, equipment and computer readable medium
CN110489242B (en) Distributed data computing method, device, terminal equipment and storage medium
CN107526636B (en) Resource identification method and device
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN110569315B (en) Data processing method and device based on data warehouse
CN115828008A (en) Page data assembling method and device, storage medium and electronic equipment
CN114647548A (en) Log generation method and device
CN116702668A (en) Regression testing method and device, electronic equipment and storage medium
CN113127314A (en) Method and device for detecting program performance bottleneck and computer equipment
CN116089040A (en) Service flow scheduling method and device, electronic equipment and storage medium
CN112637002B (en) Test resource deleting method and device, storage medium and electronic equipment
CN113886376A (en) Data cleaning method and device, electronic equipment and medium
CN113377652A (en) Test data generation method and device
CN108804311B (en) Method and device for executing test file
CN104063287A (en) Process management method and device
CN109150993B (en) Method for obtaining network request tangent plane, terminal device and storage medium
CN111124854A (en) Method, system, terminal and storage medium for distributing smoking test cases

Legal Events

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