CN110928613A - Method and device for acquiring page data, electronic equipment and readable storage medium - Google Patents

Method and device for acquiring page data, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110928613A
CN110928613A CN201910936852.4A CN201910936852A CN110928613A CN 110928613 A CN110928613 A CN 110928613A CN 201910936852 A CN201910936852 A CN 201910936852A CN 110928613 A CN110928613 A CN 110928613A
Authority
CN
China
Prior art keywords
page
target
sub
data
template
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
CN201910936852.4A
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201910936852.4A priority Critical patent/CN110928613A/en
Publication of CN110928613A publication Critical patent/CN110928613A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

According to the method, the device, the electronic equipment and the readable storage medium for acquiring the page data, after a page request for a target page is received, a page ID of the target page is determined according to the page request, a target sub-template corresponding to the page ID is determined from a pre-constructed template library according to the page ID, wherein the sub-template corresponds to a sub-region of the target page, data corresponding to the target sub-template is acquired, and data corresponding to all the target sub-templates are integrated to obtain the data of the target page. According to the scheme, when page data integration is carried out, the target sub-templates corresponding to the pages can be obtained directly from the preset module library, the full-scale templates do not need to be developed again for each page, then the data corresponding to each target sub-template is obtained, and finally the data corresponding to all the target sub-templates are integrated to obtain all the data required by the pages, so that the expansibility is strong.

Description

Method and device for acquiring page data, electronic equipment and readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method and a device for acquiring page data, electronic equipment and a readable storage medium.
Background
After a user inputs an address in an address bar of a browser or clicks one module of a client, the client responds to the operation of the user and displays a target page, the client needs to acquire page data of the target page in order to display the target page, the client generates a page request for acquiring the page data of the target page in order to acquire the page data of the target page, and the page request is sent to a server through a terminal where the client is located.
When an existing server responds to a received page request to acquire page data, a full-size template is developed by taking a target page corresponding to the page request as a whole according to the received page request, and then the page data is acquired according to the full-size template.
The method for acquiring the page data mainly aims at template development. In the process of implementing the invention, the inventor finds that different pages need to develop different templates, the templates corresponding to the pages are not universal, the data format cannot be customized individually, when the pages are changed, the re-development must be carried out according to the full-scale template fields, and when the maintenance is carried out, the whole template needs to be modified and updated, so that the workload is huge.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present invention provide a method, an apparatus, an electronic device, and a readable storage medium for acquiring page data.
In view of this, in a first aspect, an embodiment of the present invention provides a method for acquiring page data, including:
determining a page ID of a target page according to a received page request aiming at the target page;
determining a target sub-template corresponding to the page ID from a preset template library according to the page ID, wherein the sub-template corresponds to a sub-region divided by the target page, and the target page comprises at least one sub-region;
acquiring data corresponding to each target sub-template;
and integrating the data corresponding to all the target sub-templates to obtain the data of the target page.
In a possible embodiment, the determining, by the page request, a target sub-template corresponding to the page ID from a preset template library according to the page ID includes:
determining a sub-template corresponding to the page ID from a preset template library according to the page ID;
and determining a target sub-template matched with the attribute information of the target page in the sub-templates according to the attribute information of each sub-template in the sub-templates.
In one possible embodiment, the acquiring data corresponding to the target sub-template includes:
determining a template expression corresponding to the target sub-template, and acquiring data corresponding to the target sub-template by executing the template expression;
and/or
And acquiring elements corresponding to the target sub-template, and determining data corresponding to the target sub-template according to the elements.
In a possible embodiment, the page request includes attribute information of the target page, and determining data corresponding to the target sub-template according to the element includes:
determining a target element matched with the attribute information of the target page in the elements according to the attribute information of the elements;
acquiring the configuration content of the target element;
if the configuration content is preset static data, acquiring the static data as data corresponding to the target sub-template;
and if the configuration content is a preset page expression, acquiring data corresponding to the target sub-template through the page expression.
In one possible embodiment, before acquiring data corresponding to each of the target sub-templates, the method further includes:
acquiring a page expression corresponding to the page ID according to the page request, and executing the page expression to obtain dynamic data corresponding to the page expression;
acquiring data corresponding to the target template through a page expression in the configuration content of the target element, wherein the data includes:
and determining data corresponding to the page expression in the configuration content of the target element from the dynamic data as data corresponding to the target sub-template.
In a possible embodiment, integrating data corresponding to all target sub-templates to obtain data of the target page includes:
determining the position of a sub-area corresponding to each target sub-module in the target page;
and integrating data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to all the target sub-templates in the target page to obtain the data of the target page.
In one possible embodiment, the method further comprises:
acquiring a page rule corresponding to the page ID according to the page request, and executing the page rule to obtain rule data;
and after the data of the target page is obtained, screening the data of the target page according to the rule data to obtain the data which accords with the rule data, paging the screened data according to the page number in the page request, and sending the paged data to the terminal.
In a second aspect, an embodiment of the present invention further provides an apparatus for acquiring page data, including:
the page ID determining module is used for determining the page ID of the target page according to the received page request aiming at the target page;
the target sub-module determining module is used for determining a target sub-module corresponding to the page ID from a preset template library according to the page ID, wherein the sub-module corresponds to a sub-region divided by the target page, and the target page comprises at least one sub-region;
the data acquisition module is used for acquiring data corresponding to each target sub-template;
and the data integration module is used for integrating the data corresponding to all the target sub-templates to obtain the data of the target page.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, a communication interface, and a bus;
the processor, the memory and the communication interface complete mutual communication through the bus;
the communication interface is used for information transmission between external devices;
the processor is configured to call program instructions in the memory to perform the steps of the method for acquiring page data of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a readable storage medium, where the readable storage medium stores computer instructions, and the computer instructions cause a computer to execute the steps of the method for acquiring page data according to the first aspect.
Compared with the prior art, the method for acquiring the page data provided by the embodiment of the invention has the advantages that after the page request aiming at the target page is received, the page ID of the target page is determined according to the page request, the target sub-template corresponding to the page ID is determined from the pre-constructed template library according to the page ID, wherein the sub-template corresponds to the sub-region divided by the target page, one target page possibly comprises a plurality of sub-regions, then the data corresponding to each target sub-module is determined according to the target sub-template, and the data corresponding to all the target sub-templates are integrated to obtain the data of the target page. According to the scheme, when page data integration is carried out, the target sub-templates corresponding to the pages can be obtained directly from the preset module library, the full-scale templates do not need to be developed again for each page, then the data corresponding to each target sub-template is obtained, and finally all data required by the pages can be obtained by integrating the data corresponding to all the target sub-templates.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a method for acquiring page data according to an embodiment of the present invention;
fig. 2 is a block diagram of an apparatus for acquiring page data according to an embodiment of the present invention;
FIG. 3 is a block diagram of an electronic device provided in one embodiment of the invention;
fig. 4 is a block diagram of another electronic device provided in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Fig. 1 is a flowchart of a method for acquiring page data according to an embodiment of the present invention, as shown in fig. 1, the method includes:
s11, determining the page ID of the target page according to the received page request aiming at the target page.
The page ID is the unique identification of the page, the page ID and the page are in one-to-one correspondence, and one page ID corresponds to only one page.
The page request is used for requesting page data corresponding to a target page.
Alternatively, the page request is terminal-transmitted/implemented, wherein the terminal may be implemented in various forms, for example, a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a PAD (tablet), a PMP (portable multimedia player), a navigation device, etc., and a fixed terminal such as a digital TV, a desktop computer, etc.
S12, determining a target sub-template corresponding to the page ID from a preset template library according to the page ID, wherein the sub-template corresponds to sub-regions divided by the target page, and the target page comprises at least one sub-region.
In this embodiment, the target page is divided according to a preset page division rule, the target page is divided into at least one sub-region, and then each sub-region may correspond to one or more sub-templates. The page division rule is preset according to requirements, for example, if the target page includes a text title and a picture, the target page can be divided into two sub-regions, one sub-region is a region corresponding to the text title, the other sub-region is a region corresponding to the picture, and the positions of the divided sub-regions in the target page are different, that is, the sub-regions are not overlapped.
In a possible implementation manner, the determining, by the page request, a target sub-template corresponding to the page ID from a preset template library according to the page ID includes:
s121: and determining a sub-template corresponding to the page ID from a preset template library according to the page ID.
The page ID is the unique identification of the target page, so the sub-template corresponding to the page ID is the sub-template corresponding to the target page. Since the target page may be divided into a plurality of sub-regions, each sub-region may correspond to one or more sub-templates in the template library, however, since both the sub-template itself and the target page itself have some attributes, there may be sub-templates in the sub-templates corresponding to the sub-regions that conflict with the attributes of the target page, for example, a certain sub-region corresponds to a sub-template containing a picture, and there may be many sub-templates containing pictures in the template library, but these sub-templates containing pictures are not necessarily applicable to the target page. Therefore, in this embodiment, sub-modules obtained according to the page ID need to be screened, and sub-modules having conflicts with the attributes of the target page are removed, so that the target sub-page conforming to the attributes of the target page is left. In this embodiment, page data needs to be acquired according to a target sub-template corresponding to a target page, so in order to acquire all page data required by the target page, it is first ensured that all target sub-templates corresponding to the target page can be acquired, which requires acquiring all sub-modules corresponding to the target page, and then all the acquired sub-modules are screened through the following S122, so that all target sub-modules meeting the requirements of the target page are determined.
S122: and determining a target sub-template matched with the attribute information of the target page in all the sub-templates according to the attribute information of each sub-template in all the sub-templates.
For example, since the sub-templates are preset and all have certain attributes, by matching the attributes of the sub-templates with the attributes of the target page, the sub-module whose attributes match with the attributes of the target page is determined as the target sub-module, that is, the sub-module that can be displayed in the target page, for example: the attribute of the sub-template A is 'only displayed in the range of version 5.0.0-5.1.0', and the attribute of the target page is 'displayed in the client of version 5.1.2', the attribute of the sub-template A is not matched with the attribute of the target page, and the sub-template A is not the target sub-template. The same similar attributes are a crowd label, whether to log in, the online and offline time, dynamic display and the like.
In a possible implementation manner, the template library includes a local template library and a remote template library (for example, the remote template library may be stored in Redis, which is a non-relational database), when determining all sub-templates corresponding to the page ID, first, whether all sub-templates matching the page ID exist in the local template library is searched according to the page ID, and if all sub-templates matching the page ID do not exist in the locally stored template library, the sub-templates matching the page ID stored in the remote template library are read, so as to determine all sub-templates matching the page ID.
And S13, acquiring data corresponding to each target sub-template.
In one possible implementation manner, the data corresponding to each target sub-module is obtained through one or two (specifically, one or two are determined according to specific situations) of the following manners:
the first method is as follows: and determining a template expression corresponding to the target sub-template, and acquiring data corresponding to the target sub-template by executing the template expression.
The template expression is a preset expression corresponding to a target sub-template, the expression is used for acquiring data, the data acquisition is divided into two types, one type is the acquisition of the data of the whole sub-template, and the returned data and structure of the whole sub-template (including the position of a sub-area corresponding to the sub-template in a target page and the distribution form of the data in the sub-template) are obtained. The other is simple data acquisition, that is, data fragments in the sub-template are smaller in granularity, for example, data corresponding to the sub-template includes first data and second data, the acquisition of the data of the whole sub-template is that the first data and the second data are both acquired, and the simple data acquisition is that only the first data or the second data is acquired, that is, only partial data of the sub-template is acquired, but not all data. In this embodiment, the data and structure corresponding to the whole sub-template are obtained in this step, and the method is suitable for a scenario in which no page dynamic configuration is required and the data completely depends on the output of the service interface.
The second method comprises the following steps: and acquiring elements corresponding to the target sub-template, and determining data corresponding to the target sub-template according to the elements.
In one possible implementation manner, the page request includes attribute information of the target page, and the data corresponding to the target sub-template is determined according to the element, including the following steps:
s131: and determining a target element matched with the attribute information of the target page in the elements according to the attribute information of the elements.
One sub-module may have a plurality of elements, each element has its own attribute information, and only when the attribute information of the element itself matches with the attribute information of the target page, the data corresponding to the element can be displayed in the target page, so that the elements are screened according to the attribute information of the element, and the element whose attribute information matches with the attribute information of the target page is determined to be the target element, that is, the element that can be displayed in the target page. The process of element screening is similar to the process of template screening, and the difference is only that the processed objects are different, the elements are child nodes of the child templates, and the granularity is finer.
S132: and acquiring the configuration content of the target element.
The configuration content of the target element is the type of data corresponding to the target element, and is generally divided into static data and dynamic data, wherein the static data is fixed content set in advance, and the dynamic data is content obtained by executing a page expression.
S133: and if the configuration content is preset static data, acquiring the static data as data corresponding to the target sub-template.
S134: and if the configuration content is a preset page expression, acquiring data corresponding to the target sub-template through the page expression.
The page expression is a method required to be called for acquiring dynamic data of a page, and the method comprises a local method and a remote RPC method, wherein the local method is a method only stored locally and can be directly called, and the Remote Procedure Call (RPC) is a remote procedure call which requests service from a remote computer program through a network.
In one possible embodiment, before acquiring data corresponding to each of the target sub-templates, the method further includes: and acquiring all page expressions corresponding to the page ID according to the page request, executing the all page expressions (including but not limited to execution in an asynchronous calling mode), acquiring dynamic data corresponding to the all page expressions, and storing the dynamic data into context environment variables of a rendering thread of a target page for subsequent use.
After receiving the page request, all the page expressions corresponding to the page ID of the target page are asynchronously called, so that when the corresponding data is obtained through the page expression in the configuration content of the target element, the data corresponding to the page expression is normally obtained, and therefore, the data corresponding to the page expression in the configuration content of the target element is directly searched from all the data obtained according to all the page expressions. If the data corresponding to the page expression is not completely acquired when the corresponding data is acquired through the page expression in the configuration content of the target element, the waiting is blocked until the data of the page expression is completely acquired, and the execution speed of the page expression can be increased to avoid the situation, so that when the page expression corresponding to the target element is determined, the page expression is executed in advance and the corresponding data is acquired, and the corresponding data can be directly acquired without waiting for the execution of the page expression.
And S14, integrating the data corresponding to all the target sub-templates to obtain the data of the target page.
In this embodiment, each target sub-template corresponds to one sub-region of the target page, so that the position of each sub-region corresponding to each target sub-template in the target page is determined, then the position of the data corresponding to each sub-module can be determined according to the position of each sub-region corresponding to each target sub-template in the target page, and then the integration of the data corresponding to all the target sub-templates is completed according to the position of the data corresponding to each sub-module, so as to obtain the data of the target page. In one possible embodiment, the method further comprises:
and acquiring a page rule corresponding to the page ID according to the page request, and executing the page rule to obtain rule data, wherein the page rule is preset according to requirements.
And after the data of the target page is obtained, screening the data of the target page according to the rule data to obtain the data which accords with the rule data, paging the screened data according to the page number in the page request, and sending the paged data to the terminal.
The obtained data of the target page is further screened through the rule data, and the data blocks of the unnecessary sub-templates, elements or deeper sub-nodes are generally deleted. Or alternatively, reserved, and not needed for deletion. The corresponding rule types are: pit priority rules, ABTest selection rules, random distribution rules, advertisement data acquisition rules, and the like.
When the obtained data of the target page is further screened according to the rule data, sub-template association logic processing is further performed, for example, the sub-template A and the sub-template B have an association relationship, and in the previous screening processing, the sub-template A is removed, and in the step, the sub-template B is also removed.
Note that the order of the numbers used to identify the steps in this embodiment does not necessarily indicate the execution order of the steps.
The method for acquiring page data provided by the embodiment of the invention comprises the steps of determining the page ID of a target page according to a page request after receiving the page request aiming at the target page, determining all target sub-templates corresponding to the page ID from a pre-constructed template library according to the page ID, wherein one sub-template corresponds to one sub-region divided by the target page, one target page possibly comprises a plurality of sub-regions, then determining corresponding data according to the target sub-templates, and integrating the data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to all the target sub-templates in the target page to obtain the data of the target page. According to the scheme, when page data integration is carried out, the target sub-templates corresponding to the pages can be obtained directly from the preset module library, the full-scale templates do not need to be developed again for each page, then the data corresponding to each target sub-template is obtained, and finally all data required by the pages can be obtained by integrating the data corresponding to all the target sub-templates.
The method for acquiring the page data provided by the embodiment is suitable for the static loading and dynamic loading pages.
As shown in fig. 2, an embodiment of the present invention further provides an apparatus for acquiring page data, where the apparatus may include:
a page ID determining module 201, configured to determine a page ID of a target page according to a received page request for the target page;
a target sub-module determining module 202, configured to determine, according to the page ID, all target sub-templates corresponding to the page ID from a preset template library, where one sub-template corresponds to one sub-region divided by the target page, and the target page includes at least one sub-region;
a data obtaining module 203, configured to obtain data corresponding to each target sub-template;
and the data integration module 204 is configured to integrate data corresponding to all target sub-templates to obtain data of the target page.
In a possible embodiment, the page request includes attribute information of the target page, and the sub-module determining module 202 determines, according to the page ID, a target sub-template corresponding to the page ID from a preset template library, including:
determining a sub-template corresponding to the page ID from a preset template library according to the page ID;
and determining a target sub-template matched with the attribute information of the target page in the sub-templates according to the attribute information of each sub-template in the sub-templates.
In one possible embodiment, the data obtaining module 203 obtains data corresponding to the target sub-template, including:
determining a template expression corresponding to the target sub-template, and acquiring data corresponding to the target sub-template by executing the template expression;
and/or
And acquiring elements corresponding to the target sub-template, and determining data corresponding to the target sub-template according to the elements.
In a possible embodiment, the page request includes attribute information of the target page, and the determining, by the data obtaining module 203, data corresponding to the target sub-template according to the element includes:
determining a target element matched with the attribute information of the target page in the elements according to the attribute information of the elements;
acquiring the configuration content of the target element;
if the configuration content is preset static data, acquiring the static data as data corresponding to the target sub-template;
and if the configuration content is a preset page expression, acquiring data corresponding to the target sub-template through the page expression.
In a possible embodiment, the data integration module 204 integrates data corresponding to all target sub-templates to obtain data of the target page, including:
determining the position of a sub-area corresponding to each target sub-module in the target page;
and integrating data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to all the target sub-templates in the target page to obtain the data of the target page.
In one possible embodiment, the apparatus further comprises:
the dynamic data acquisition module is used for acquiring all page expressions corresponding to the page ID according to the page request after receiving the page request sent by the terminal, and executing all the page expressions to obtain dynamic data corresponding to all the page expressions;
the data obtaining module 203 obtains data corresponding to the target template through a page expression in the configuration content of the target element, including:
and determining data corresponding to the page expression in the configuration content of the target element from the dynamic data as data corresponding to the target sub-template.
In one possible embodiment, the apparatus further comprises:
the rule data determining module is used for acquiring a page rule corresponding to the page ID according to the page request and executing the page rule to obtain rule data;
and the data screening module is used for screening the data of the target page according to the rule data to obtain the data which accords with the rule data after the data of the target page is obtained, paging the screened data according to the page number in the page request and sending the paged data to the terminal.
As shown in fig. 3, the present embodiment discloses an electronic device, including: a processor 301, a memory 302, a communication interface 303, and a bus 304;
the processor 301, the memory 302 and the communication interface 303 complete mutual communication through the bus 304;
the communication interface 303 is used for information transmission between external devices; the external device is, for example, a user equipment UE;
the processor 301 is configured to invoke program instructions in the memory 302 to perform methods as provided by the method embodiments, including, for example:
determining a page ID of a target page after receiving a page request aiming at the target page sent by a terminal;
determining all target sub-templates corresponding to the page ID from a preset template library according to the page ID, wherein one sub-template corresponds to one sub-region divided by the target page, and the target page comprises at least one sub-region;
acquiring data corresponding to each target sub-template;
and integrating data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to the target sub-templates on the target page to obtain the data of the target page.
Fig. 4 is a schematic structural diagram of an electronic device according to another embodiment of the present invention. The mobile terminal 400 shown in fig. 4 includes: at least one processor 401, memory 402, at least one network interface 404, and other user interfaces 403. The various components in the mobile terminal 400 are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communication between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that memory 402 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data rate Synchronous Dynamic random access memory (ddr SDRAM ), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application programs 4022 include various application programs, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
In this embodiment of the present invention, by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application 4022, the processor 401 is configured to execute the method steps provided by the method embodiments, for example, including:
determining a page ID of a target page after receiving a page request aiming at the target page sent by a terminal;
determining all target sub-templates corresponding to the page ID from a preset template library according to the page ID, wherein one sub-template corresponds to one sub-region divided by the target page, and the target page comprises at least one sub-region;
acquiring data corresponding to each target sub-template;
and integrating data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to the target sub-templates on the target page to obtain the data of the target page.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The Processor 401 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the method in combination with the hardware.
Embodiments of the present invention also provide a readable storage medium, where the non-transitory computer readable storage medium stores computer instructions, where the computer instructions cause the computer to execute the method provided by the method embodiments, for example, including:
determining a page ID of a target page after receiving a page request aiming at the target page sent by a terminal;
determining all target sub-templates corresponding to the page ID from a preset template library according to the page ID, wherein one sub-template corresponds to one sub-region divided by the target page, and the target page comprises at least one sub-region;
acquiring data corresponding to each target sub-template;
and integrating data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to the target sub-templates on the target page to obtain the data of the target page.
It should be noted that, in this document, 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 phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
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.
Through the above description of the embodiments, those skilled in the art will clearly understand that the methods described in the embodiments of the present invention can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention or the method according to some parts of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for acquiring page data is characterized by comprising the following steps:
determining a page ID of a target page according to a received page request aiming at the target page;
determining a target sub-template corresponding to the page ID from a preset template library according to the page ID, wherein the sub-template corresponds to a sub-region divided by the target page, and the target page comprises at least one sub-region;
acquiring data corresponding to each target sub-template;
and integrating the data corresponding to all the target sub-templates to obtain the data of the target page.
2. The method of claim 1, wherein the page request includes attribute information of the target page, and determining a target sub-template corresponding to the page ID from a preset template library according to the page ID comprises:
determining a sub-template corresponding to the page ID from a preset template library according to the page ID;
and determining a target sub-template matched with the attribute information of the target page in the sub-templates according to the attribute information of each sub-template in the sub-templates.
3. The method of claim 1, wherein the obtaining data corresponding to the target sub-template comprises:
determining a template expression corresponding to the target sub-template, and acquiring data corresponding to the target sub-template by executing the template expression;
and/or
And acquiring elements corresponding to the target sub-template, and determining data corresponding to the target sub-template according to the elements.
4. The method of claim 3, wherein the page request includes attribute information of the target page, and determining data corresponding to the target sub-template from the elements comprises:
determining a target element matched with the attribute information of the target page in the elements according to the attribute information of the elements;
acquiring the configuration content of the target element;
if the configuration content is preset static data, acquiring the static data as data corresponding to the target sub-template;
and if the configuration content is a preset page expression, acquiring data corresponding to the target sub-template through the page expression.
5. The method of claim 4, wherein prior to obtaining data corresponding to each of the target sub-templates, the method further comprises:
acquiring a page expression corresponding to the page ID according to the page request, and executing the page expression to obtain dynamic data corresponding to the page expression;
acquiring data corresponding to the target template through a page expression in the configuration content of the target element, wherein the data includes:
and determining data corresponding to the page expression in the configuration content of the target element from the dynamic data as data corresponding to the target sub-template.
6. The method of claim 1, wherein integrating data corresponding to all target sub-templates to obtain data of the target page comprises:
determining the position of a sub-area corresponding to each target sub-module in the target page;
and integrating data corresponding to all the target sub-templates according to the positions of the sub-regions corresponding to all the target sub-templates in the target page to obtain the data of the target page.
7. The method of claim 1, further comprising:
acquiring a page rule corresponding to the page ID according to the page request, and executing the page rule to obtain rule data;
and after the data of the target page is obtained, screening the data of the target page according to the rule data to obtain the data which accords with the rule data, paging the screened data according to the page number in the page request, and sending the paged data to the terminal.
8. An apparatus for obtaining page data, comprising:
the page ID determining module is used for determining the page ID of the target page according to the received page request aiming at the target page;
the target sub-module determining module is used for determining a target sub-module corresponding to the page ID from a preset template library according to the page ID, wherein the sub-module corresponds to a sub-region divided by the target page, and the target page comprises at least one sub-region;
the data acquisition module is used for acquiring data corresponding to each target sub-template;
and the data integration module is used for integrating the data corresponding to all the target sub-templates to obtain the data of the target page.
9. An electronic device, comprising: a processor, a memory, a communication interface, and a bus;
the processor, the memory and the communication interface complete mutual communication through the bus;
the communication interface is used for information transmission between external devices;
the processor is configured to call program instructions in the memory to perform the steps of the method of retrieving page data according to any one of claims 1 to 7.
10. A readable storage medium storing computer instructions for causing a computer to perform the steps of the method of retrieving page data according to any one of claims 1 to 7.
CN201910936852.4A 2019-09-29 2019-09-29 Method and device for acquiring page data, electronic equipment and readable storage medium Pending CN110928613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910936852.4A CN110928613A (en) 2019-09-29 2019-09-29 Method and device for acquiring page data, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910936852.4A CN110928613A (en) 2019-09-29 2019-09-29 Method and device for acquiring page data, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN110928613A true CN110928613A (en) 2020-03-27

Family

ID=69848767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910936852.4A Pending CN110928613A (en) 2019-09-29 2019-09-29 Method and device for acquiring page data, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110928613A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111913693A (en) * 2020-07-30 2020-11-10 北京数立得科技有限公司 Method and system for determining subclass template of service interface
CN114237796A (en) * 2021-12-17 2022-03-25 平安不动产有限公司 Page exporting method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066273A (en) * 2017-03-31 2017-08-18 北京奇艺世纪科技有限公司 A kind of style sheet update method and device
CN107085574A (en) * 2016-02-15 2017-08-22 阿里巴巴集团控股有限公司 A kind of page data processing method and server
CN107273290A (en) * 2017-06-13 2017-10-20 北京奇艺世纪科技有限公司 The A/B method of testings and device of a kind of Page Service
CN107273548A (en) * 2017-07-20 2017-10-20 阿里巴巴集团控股有限公司 The implementation method and device of dynamic page
CN107506193A (en) * 2017-08-18 2017-12-22 平安科技(深圳)有限公司 A kind of development approach of subsystem page, storage medium and server
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085574A (en) * 2016-02-15 2017-08-22 阿里巴巴集团控股有限公司 A kind of page data processing method and server
CN107066273A (en) * 2017-03-31 2017-08-18 北京奇艺世纪科技有限公司 A kind of style sheet update method and device
CN107273290A (en) * 2017-06-13 2017-10-20 北京奇艺世纪科技有限公司 The A/B method of testings and device of a kind of Page Service
CN107273548A (en) * 2017-07-20 2017-10-20 阿里巴巴集团控股有限公司 The implementation method and device of dynamic page
CN107506193A (en) * 2017-08-18 2017-12-22 平安科技(深圳)有限公司 A kind of development approach of subsystem page, storage medium and server
CN108829885A (en) * 2018-06-27 2018-11-16 珠海市君天电子科技有限公司 Page generation method, device, server, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111913693A (en) * 2020-07-30 2020-11-10 北京数立得科技有限公司 Method and system for determining subclass template of service interface
CN111913693B (en) * 2020-07-30 2023-11-14 北京数立得科技有限公司 Service interface subclass template determining method and system
CN114237796A (en) * 2021-12-17 2022-03-25 平安不动产有限公司 Page exporting method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN109815430B (en) Request processing method and device, data processing server and readable storage medium
CN110321177B (en) Mobile application localized loading method and device and electronic equipment
CN106528578B (en) Information display method and device
CN107479868B (en) Interface loading method, device and equipment
CN110321504B (en) Page processing method and device
CN113190781A (en) Page layout method, device, equipment and storage medium
CN110928613A (en) Method and device for acquiring page data, electronic equipment and readable storage medium
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN110989897B (en) Screenshot picture acquisition method and device, terminal device and storage medium
CN110347984B (en) Policy page changing method and device, computer equipment and storage medium
CN113569257A (en) User authority management method and device in gray scale release
CN114003818A (en) Page recommendation method, device, server and storage medium
CN107330087B (en) Page file generation method and device
CN105183453A (en) Webpage-based information acquiring method and apparatus
CN110232155B (en) Information recommendation method for browser interface and electronic equipment
CN111367606A (en) Application page display method, device, terminal and medium
CN112202894A (en) Information acquisition method and device and data processing method and device
CN111626021A (en) Presentation generation method and device
CN110363189B (en) Document content restoration method and device, electronic equipment and readable storage medium
CN113076165A (en) Page checking method and device
CN110874253B (en) Display method and display system
CN109344377B (en) Data processing method, device, electronic equipment and storage medium
CN112784527A (en) Document merging method and device and electronic equipment
CN113535304B (en) Method and device for inserting, displaying and editing third-party model in design software

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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CB02 Change of applicant information