CN112130855A - Method and device for generating page - Google Patents

Method and device for generating page Download PDF

Info

Publication number
CN112130855A
CN112130855A CN202010975373.6A CN202010975373A CN112130855A CN 112130855 A CN112130855 A CN 112130855A CN 202010975373 A CN202010975373 A CN 202010975373A CN 112130855 A CN112130855 A CN 112130855A
Authority
CN
China
Prior art keywords
data
control
page
card
control set
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
CN202010975373.6A
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 CN202010975373.6A priority Critical patent/CN112130855A/en
Publication of CN112130855A publication Critical patent/CN112130855A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for generating a page, and relates to the technical field of computers. One embodiment of the method comprises: the method comprises the steps that a request for generating a page by a client side can be received through a server side, and one or more card areas of the page corresponding to an application identifier are obtained; the card area contains a control set; the control set contains controls; respectively acquiring data of the card area, the control set and the control, wherein the control data comprises a service system associated with the control; the client receives page data sent by the server and generates a page; by acquiring the data of each control in each control set in each card, the problem that the atomic controls in the cards are difficult to control is solved, and the expansibility and flexibility of generating pages are increased from the control level; by setting the service system associated with the control, the defect that the control in one card cannot be adapted to a plurality of different service systems is overcome.

Description

Method and device for generating page
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating a page.
Background
In application development, user page presentation of a terminal (e.g., a cell phone terminal) may be card-based; the concept of cards was proposed by Google in 2012, cards being an aggregate of information. The design is then widely used in application design and development of terminals (especially mobile phone terminals) with the advantage of better focusing on displaying and expressing information in a card-based unit.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the method for controlling the user interface based on the card mode in the terminal application generally takes the whole card as a unit at present, and has the problem that components in the card are difficult to control; moreover, the business scene based on the card is single, and after the page adopts the design of the card, the display contents of all the cards are generally from the same business scene, and the same card can not adapt to a plurality of different business data.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating a page, which can receive, through a server, a request for generating a page by a client, and obtain one or more card areas of the page corresponding to an application identifier; the card area contains a control set; the control set contains controls; respectively acquiring data of the card area, the control set and the control, wherein the control data comprises a service system associated with the control; the client receives page data sent by the server and generates a page; by acquiring the data of each control in each control set in each card, the problem that the atomic controls in the cards are difficult to control is solved, and the expansibility and flexibility of generating pages are increased from the control level; by setting the service system associated with the control, the defect that the control in one card cannot be adapted to a plurality of different service systems is overcome.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for generating a page, including: receiving a request for generating a page sent by a client, wherein the request comprises an application identifier; acquiring an identifier of a card area contained in the page corresponding to the application identifier, an identifier of a control set contained in the card area and an identifier of a control contained in the control set according to the application identifier; acquiring card area data according to the identification of the card area, and acquiring control set data according to the identification of the control set; acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control; and generating page data and sending the page data based on the card region data, the control set data and the control data.
Optionally, the method of generating a page is characterized in that,
the card region data comprises the style and the interaction data of the card region, the control set data comprises the style and the interaction data of the control set, and the control data comprises the style and the interaction data of the control.
Optionally, the method of generating a page is characterized in that,
each control contains the control data, the interaction data corresponding to the control data is sourced from the business system associated with the control, and the business systems associated with the controls are not completely the same.
To achieve the above object, according to a second aspect of the embodiments of the present invention, there is provided a method for generating a page, including: sending a request for generating a page, and receiving page data returned corresponding to the request; acquiring card area data contained in the page data, control set data corresponding to the card area data and control data corresponding to the control set data; and generating a page according to the card region data, the control set data and the control data.
Optionally, the method of generating a page is characterized in that,
generating a page according to the card region data, the control set data and the control data, wherein the page comprises the following steps: associating the interaction of the card areas on the page according to the card interaction data contained in the card area data; determining the style of a card area on a page according to the card style data contained in the card area data, and drawing the card area; associating the interaction of the control sets in the card area on the page according to the control set interaction data contained in the control set data; determining the style of the control set in the card area on a page according to the control set style data contained in the control set data, and drawing the control set; associating the interaction of the controls in the control set on the page according to the control interaction data contained in the control data; and determining the style of the control in the control set on the page according to the control style data contained in the control data, and drawing the control.
Optionally, the method of generating a page is characterized in that,
generating a page according to the card region data, the control set data and the control data, wherein the page comprises the following steps: generating a first page by using local software according to the card region data, the control set data and the control data; when the first page is abnormal, a second page is obtained from a server to replace the first page; wherein the second page is generated based on HTML5 from the card region data, the control set data, the control data.
To achieve the above object, according to a third aspect of the embodiments of the present invention, there is provided an apparatus for generating a page, which is applied to a server, and includes: the system comprises a page control acquisition module, a page data acquisition module and a page data sending module; wherein,
the page acquiring control module is used for receiving a request for generating a page sent by a client, wherein the request comprises an application identifier; acquiring an identifier of a card area contained in the page corresponding to the application identifier, an identifier of a control set contained in the card area and an identifier of a control contained in the control set according to the application identifier;
the page data acquisition module is used for acquiring card area data according to the identification of the card area and acquiring control set data according to the identification of the control set; acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control;
and the page data sending module is used for generating page data and sending the page data based on the card region data, the control set data and the control data.
Optionally, the apparatus for generating a page is characterized in that,
the card region data comprises the style and the interaction data of the card region, the control set data comprises the style and the interaction data of the control set, and the control data comprises the style and the interaction data of the control.
Optionally, the apparatus for generating a page is characterized in that,
each control contains the control data, the interaction data corresponding to the control data is sourced from the business system associated with the control, and the business systems associated with the controls are not completely the same.
In order to achieve the above object, according to a fourth aspect of the embodiments of the present invention, there is provided an apparatus for generating a page, which is applied to a client, and includes: the device comprises a page data receiving module, a page data acquiring module and a page generating module; wherein,
the page data receiving module is used for sending a request for generating a page and receiving page data returned corresponding to the request;
the page data acquisition module is used for acquiring card area data contained in the page data, control set data corresponding to the card area data and control data corresponding to the control set data;
and the page generation module is used for generating a page according to the card area data, the control set data and the control data.
Optionally, the apparatus for generating a page is characterized in that,
generating a page according to the card region data, the control set data and the control data, wherein the page comprises the following steps: associating the interaction of the card areas on the page according to the card interaction data contained in the card area data; determining the style of a card area on a page according to the card style data contained in the card area data, and drawing the card area; associating the interaction of the control sets in the card area on the page according to the control set interaction data contained in the control set data; determining the style of the control set in the card area on a page according to the control set style data contained in the control set data, and drawing the control set; associating the interaction of the controls in the control set on the page according to the control interaction data contained in the control data; and determining the style of the control in the control set on the page according to the control style data contained in the control data, and drawing the control.
Optionally, the apparatus for generating a page is characterized in that,
generating a page according to the card region data, the control set data and the control data, wherein the page comprises the following steps: generating a first page by using local software according to the card region data, the control set data and the control data; when the first page is abnormal, a second page is obtained from a server to replace the first page; wherein the second page is generated based on HTML5 from the card region data, the control set data, the control data.
To achieve the above object, according to a fifth aspect of the embodiments of the present invention, there is provided an electronic device for generating a page, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the above methods of generating pages.
To achieve the above object, according to a sixth aspect of the embodiments of the present invention, there is provided a computer readable medium having a computer program stored thereon, wherein the program is configured to implement, when executed by a processor, any one of the methods of generating a page as described above.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps that a request for generating a page by a client side can be received through a server side, and one or more card areas of the page corresponding to an application identifier are obtained; the card area contains a control set; the control set contains controls; respectively acquiring data of the card area, the control set and the control, wherein the control data comprises a service system associated with the control; the client receives page data sent by the server to generate a page; by acquiring the data of each control in each control set in each card, the problem that the atomic controls in the cards are difficult to control is solved, and the expansibility and flexibility of generating pages are increased from the control level; by setting the service system associated with the control, the defect that the control in one card cannot be adapted to a plurality of different service systems is overcome.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic flowchart of a method for generating page data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process for generating a page according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a page layout according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a client generating a page according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an apparatus for generating a page according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an apparatus for generating a page according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, an embodiment of the present invention provides a method for generating a page, which is applied to a server, and the method may include the following steps:
step S101: receiving a request for generating a page sent by a client, wherein the request comprises an application identifier; and acquiring the identifier of a card area contained in the page corresponding to the application identifier, the identifier of a control set contained in the card area and the identifier of a control contained in the control set according to the application identifier.
Specifically, a request for generating a page is sent by a client side is received, and the request comprises an application identifier; the application identifier is an application identifier containing the page, for example: appId: abcd1234, the application identification may be a string of letters and data, such as abcd 1234; the application corresponding to the application identification comprises one or more pages; further, acquiring identifications of one or more card areas of the page corresponding to the application identifications, identifications of one or more control sets contained in the card areas, identifications of one or more controls contained in the control sets, and controls are atomic components constituting the page, for example: buttons, pictures, text boxes, etc., it being understood that the controls are page components of minimum granularity; further, the request for generating the page may further include other parameters related to the page, and the specific content of the request for generating the page, except the application identifier, is not limited in the present application.
Next, a card area and a control included in a page are described by taking fig. 3 as an example, as shown in fig. 3, the page 1 includes two card areas, which are "card 1" (an example of an identifier of the card area) and "card 2" (an example of an identifier of the card area), respectively, and the card 1 includes 3 control sets, which are "control set 1" (an example of an identifier of the control set), "control set 2" (an example of an identifier of the control set), and "control set 3" (an example of an identifier of the control set); the card 2 comprises 3 control sets, namely a control set 4, a control set 5 and a control set 6; the control sets 1 to 6 respectively include respective controls, and taking the control set 4 as an example, the controls included in the control set 4 are: "Picture 1" (which is an example of an identification of a control), "text 1" (which is an example of an identification of a control).
The invention does not limit the specific format and content of the application identifier, the identifier of the card area, the identifier of the control set and the identifier of the control; the number of the card areas, the number of the control sets and the number of the controls are set according to page design, and the number of the card areas, the number of the control sets and the number of the controls are not limited by the invention.
Step S102: acquiring card area data according to the identification of the card area, and acquiring control set data according to the identification of the control set; and acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control.
Specifically, there are two methods for acquiring card area data, control set data, and control data included in a page:
the first method comprises the following steps: through a configuration platform, according to the page design of the application, data of each card area associated with one or more pages of the application identifier, data of each control set contained in the card area, and data of controls contained in each control set are preset. When a request for generating a page is received, acquiring the data;
the second method comprises the following steps: establishing a data table of card area data, a data table of control set data and a data table of control data, and acquiring the card area data corresponding to the identification of the card area, the control set data corresponding to the identification of the control set and the control data corresponding to the identification of the control according to the application identification in the page request and information about the identification of the card area, the identification of the control set, the identification of the control and the like contained in the page request.
Further, assuming that the page data has been acquired by the first method or the second method, the following exemplifies card area data, control set data, and control data, specifically, card area data is acquired according to the identifier of the card area, for example, the card area data is as follows:
Figure BDA0002685583010000081
wherein, the card ID is 12345 which is the mark of the card area; "cardType" indicates the type of card, and the type of card area may be predefined, for example: indicating the type of the card area as a card area containing a plurality of control sets by '1001'; "cardStyle" indicates a style of the card, for example, the content contained in "cardStyle" is style data; for example: defining the edge distance between the card and the page by ' margin ' { top, left, bottom, right }, and defining the background color of the card area by ' back group color ' # FFFFFF '; by "background image": ht tps:// file.ddd.com/image ═ 11 defines the source of the card area background picture; "jumpDa ta" indicates an example of interaction data of a card area, and the interaction may be a press, a long press, a scroll, or the like; for example: data jump after long press, target address https:// card.dddd.com/home? id 66.
Further, the control set data is obtained according to the identifier of the control set, and it can be understood that the control set belongs to the above card area, for example, the control set data is as follows:
Figure BDA0002685583010000091
wherein, the "itemId" is 123456 is the identification of the control set, the "itemStyle" is the style of the control set, the overall layout mode of the control set is defined, and the content contained in the "itemStyle" is style data; for example, the control set margin is defined by "margin" { top, left, bottom, right } ", and the background color of the control set is defined by" background color ": # 000000"; by "background image": https:// file.ddd.com/image ═ 12345 defines the source of the background picture of the control set, "jumpData" indicates an example of interaction data of the control set, and the interaction may also be pressing, long pressing, scrolling, and the like; for example: data jump after long press, target address https:// service.dddd.com/home? id 22.
Further, acquiring the control data according to the identification of the control, wherein the control data comprises a service system associated with the control; for example, the page data of the control (taking a picture control as an example) is as follows:
"image1":{
"url":"https://file.ddd.com/imageid=12345678",
"jumpData":{"jumpUrl":https://s1.dddd.com/home?id=4567}
wherein "image1" is an identifier of the control, "url" indicates a picture source of the picture control, and is a style of the control, url and corresponding data are style data, "jumpData" indicates an example of interaction data of the control, and the interaction may also be click, long press, scroll, and the like; for example: after long press, data jump is performed, and interactive data (jump) is a target address "https:// s1.dddd. com/home? id 4567 "; it is understood that the target address may point to one system or may point to a different system, as in the example shown in fig. 3, for example, two controls, picture 1 and text 1, click picture 1, jump to s1 system, click text 1, jump to s2 system; that is, each control contains the control data, the interaction data corresponding to the control data is derived from the business system associated with the control, and the business systems associated with each control are not identical. It can be understood that through the above steps, the control of the controls in the page reaches the minimum granularity, and different controls can point to different systems, increasing the flexibility and expansibility of the application; furthermore, the interactive data through the card area and the interactive data of the control set can also jump to different service systems; but the flexibility is reduced; the picture or text and the like contain specific atomic-level control data, and the inside contains specific style fields, such as font size, font thickness, color and the like, and content to be displayed or specific picture links; further, the atomic-level control data can be expanded, the style of the control can be set by the client and the server, and the atomic-level control data can be dynamically generated according to parameters in the request of the client. That is, the card region data includes a style and interaction data of the card region, the control set data includes a style and interaction data of the control set, and the control data includes a style and interaction data of the control. And each control contains the control data, the interaction data corresponding to the control data is sourced from the business system associated with the control, and the business systems associated with each control are not completely the same.
Step S103: and generating page data and sending the page data based on the card region data, the control set data and the control data.
Specifically, the page data is obtained according to the steps described in steps S101 to S102, and further, according to a request for generating a page, page data is generated based on the card region data, the control set data, and the control data, and the page data is sent as feedback data of the request.
As shown in fig. 2, an embodiment of the present invention provides a method for generating a page, which is applied to a client, and the method may include the following steps:
step S201: sending a request for generating a page, and receiving page data returned corresponding to the request.
Specifically, a request for generating a page is sent, and page data returned by the server according to the request for generating the page is acquired. The description of the request for generating the page and the page data is consistent with steps S101 to S102, and is not repeated here.
Step S202: and obtaining card area data contained in the page data, control set data corresponding to the card area data and control data corresponding to the control set data.
Specifically, card area data contained in the page data, control set data corresponding to the card area data, and control data corresponding to the control set data are obtained according to the obtained page data. Examples of the card region data, the control set data, and the control data are consistent with step S102, and are not described herein again.
Step S203: and generating a page according to the card region data, the control set data and the control data.
Specifically, drawing a card area, a control set and a control respectively according to the card area data, the control set data and the control data, and generating a page; one embodiment of the application may utilize each card data to bind with each item in a list control (e.g., tableView) of an application, and finally implement rendering of the entire page.
The schematic flow is described in steps S401 to S411 in fig. 4, and will not be described herein again.
Further, according to the card region data, the control set data and the control data, a first page is generated by using local software; when the first page is abnormal, a second page is obtained from a server to replace the first page; wherein the second page is generated based on HTML5 from the card region data, the control set data, the control data. Specifically, the local software may be development software used for applying a native user page, and the used development language may use Objective C for the iOS system and Java for the Android system; the method comprises the steps of generating HTML5 (a new version of HTML) by using JavaScript, CSS and the like, generating two sets of pages based on local software generation and HTML5 generation, temporarily switching to the version of HTML5 to solve problems when problems occur on an application line generated by using the local software, and switching to local application after the local application version is repaired, namely, acquiring a second page from a server to replace the first page when the first page is abnormal, wherein the HTML5 (the HTML is indicated as Hyper Text Markup Language, namely, hypertext Markup Language), namely, JavaScript, CSS and the like, can be used for flexibly processing the switching of the application without re-uploading the application when the problem occurs in the application page, the problem that the local application and the HTML5 application are not communicated is solved, and the development efficiency and the user experience are improved.
As shown in fig. 4, an exemplary process for generating a page by a client is provided in an embodiment of the present invention, and the process may include the following steps;
step S401: page data corresponding to a return of the generate page request is received.
Specifically, the description of the page data is consistent with step S102, and is not repeated here.
Step S402: card zone data is acquired.
Step S403: and determining a card region style data and interaction data, and drawing the card.
Specifically, steps S402 to S403 describe a process of drawing a card according to card area data, that is, according to card interaction data included in the card area data, interaction of card areas on a related page; determining the style of a card area on a page according to the card style data contained in the card area data, and drawing the card area;
the detailed description of the card area data is consistent with step S102, and is not repeated here.
Step S404: and acquiring control set data contained in the card area.
Step S405: determining style data and interaction data of a control set, and drawing the control set.
Specifically, steps S404 to S405 describe a process of drawing a control set based on one control set data contained in the above-described card area, that is,
associating the interaction of the control sets in the card area on the page according to the control set interaction data contained in the control set data; determining the style of the control set in the card area on a page according to the control set style data contained in the control set data, and drawing the control set; the detailed description of the control set data is consistent with step S102, and is not repeated here.
Step S406: acquiring the controls contained in a control set.
Step S407: determining control style data and interaction data, and drawing the control.
Specifically, steps S406 to S407 describe a process of drawing a control according to the control data included in the control set, that is, according to the control interaction data included in the control data, associating interaction of the controls in the control set on a page; determining the style of the control in the control set on a page according to the control style data contained in the control data, and drawing the control; the detailed description of the control data is consistent with step S102, and is not repeated here.
Step S408: and judging whether all the controls are drawn.
Specifically, if yes, the step S409 is executed to circularly process the next control, and if no, the step S407 is executed to draw the next control.
Step S409: it is determined whether a next control set exists.
Specifically, if yes, it indicates that there are multiple control sets in the card area, step S405 is executed to loop through the next control set, and if no, step S410 is executed.
Step S410: it is determined whether a next card area exists.
Specifically, if yes, it is indicated that there are a plurality of card areas in the page, step S403 is executed to loop processing the next card area, and if no, step S411 is executed.
Step S411: and generating a page.
Specifically, based on the above steps, the drawing of the page is completed, and the page is further generated.
As shown in fig. 5, an embodiment of the present invention provides an apparatus 500 for generating a page, including: a page control acquiring module 501, a page data acquiring module 502 and a page data sending module 503; wherein,
the page control acquiring module 501 is configured to receive a request for generating a page sent by a client, where the request includes an application identifier; acquiring an identifier of a card area contained in the page corresponding to the application identifier, an identifier of a control set contained in the card area and an identifier of a control contained in the control set according to the application identifier;
the page data obtaining module 502 is configured to obtain card area data according to the identifier of the card area, and obtain control set data according to the identifier of the control set; acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control;
the page data sending module 503 is configured to generate page data and send the page data based on the card region data, the control set data, and the control data
Optionally, the module 501 for obtaining page controls further includes: the card region data comprises the style and the interaction data of the card region, the control set data comprises the style and the interaction data of the control set, and the control data comprises the style and the interaction data of the control.
Optionally, the module 502 for obtaining page data further includes: each control contains the control data, the interaction data corresponding to the control data is sourced from the business system associated with the control, and the business systems associated with the controls are not completely the same.
As shown in fig. 6, an embodiment of the present invention provides an apparatus 600 for generating a page, including: a page data receiving module 601, a page data acquiring module 602 and a page generating module 603; wherein,
the page data receiving module 601 is configured to send a request for generating a page, and receive page data returned in response to the request;
the page data obtaining module 602 is configured to obtain card area data included in the page data, control set data corresponding to the card area data, and control data corresponding to the control set data;
the page generating module 603 is configured to generate a page according to the card region data, the control set data, and the control data.
Optionally, the page generating module 603 is further configured to associate interaction of the card area on the page according to the card interaction data included in the card area data; determining the style of a card area on a page according to the card style data contained in the card area data, and drawing the card area; associating the interaction of the control sets in the card area on the page according to the control set interaction data contained in the control set data; determining the style of the control set in the card area on a page according to the control set style data contained in the control set data, and drawing the control set; associating the interaction of the controls in the control set on the page according to the control interaction data contained in the control data; and determining the style of the control in the control set on the page according to the control style data contained in the control data, and drawing the control.
Optionally, the page generating module 603 is further configured to generate a first page by using local software according to the card region data, the control set data, and the control data; when the first page is abnormal, a second page is obtained from a server to replace the first page; wherein the second page is generated based on HTML5 from the card region data, the control set data, the control data.
An embodiment of the present invention further provides an electronic device for generating a page, including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method provided by any one of the above embodiments.
Embodiments of the present invention further provide a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in any of the above embodiments.
Fig. 7 illustrates an exemplary system architecture 700 to which the method of generating pages or the apparatus for generating pages of embodiments of the invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. Various client applications, such as an e-mall client application, a web browser application, a search-type application, an instant messaging tool, a mailbox client, and the like, may be installed on the terminal devices 701, 702, and 703.
The terminal devices 701, 702, 703 may be various electronic devices having display screens and supporting various client applications, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a server providing support for client applications used by users with the terminal devices 701, 702, 703. The server can process the received request for generating the page, and feed back the page data to the terminal equipment, and the client generates the page according to the page data.
It should be noted that the method for generating a page provided in the embodiment of the present invention is generally executed by the terminal devices 701, 702, and 703 or the server 705, and accordingly, the apparatus for generating a page is generally disposed in the terminal devices 701, 702, and 703 or the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, a block diagram of a computer system 800 suitable for use in implementing a terminal device or server device of an embodiment of the present invention is shown. The terminal device or the server device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input section 808 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, 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 invention, 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor comprises a page obtaining control module, a page obtaining data module and a page sending data module. For example, the module for acquiring page data may be further described as a "module for acquiring a card region, a control set and control data according to a card region, a control set and a control identifier of a page", and a processor includes a module for receiving page data, a module for acquiring page data and a module for generating a page. The names of the modules do not limit the modules, for example, the page generation module can be further described as a module for generating pages according to card region data, control set data and control data of the pages "
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: a server receives a request for generating a page sent by a client, wherein the request comprises an application identifier; acquiring an identifier of a card area contained in the page corresponding to the application identifier, an identifier of a control set contained in the card area and an identifier of a control contained in the control set according to the application identifier; acquiring card area data according to the identification of the card area, and acquiring control set data according to the identification of the control set; acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control; and generating page data and sending the page data based on the card region data, the control set data and the control data. A client sends a request for generating a page and receives page data returned corresponding to the request; acquiring card area data contained in the page data, control set data corresponding to the card area data and control data corresponding to the control set data; and generating a page according to the card region data, the control set data and the control data.
The method comprises the steps that a request for generating a page by a client side can be received through a server side, and one or more card areas of the page corresponding to an application identifier are obtained; the card area contains a control set; the control set contains controls; respectively acquiring data of the card area, the control set and the control, wherein the control data comprises a service system associated with the control; the client receives page data sent by the server to generate a page; by acquiring the data of each control in each control set in each card, the problem that the atomic controls in the cards are difficult to control is solved, and the expansibility and flexibility of generating pages are increased from the control level; by setting the service system associated with the control, the defect that the control in one card cannot be adapted to a plurality of different service systems is overcome.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of generating a page, comprising:
receiving a request for generating a page sent by a client, wherein the request comprises an application identifier;
acquiring an identifier of a card area contained in the page corresponding to the application identifier, an identifier of a control set contained in the card area and an identifier of a control contained in the control set according to the application identifier;
acquiring card area data according to the identification of the card area, and acquiring control set data according to the identification of the control set; acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control;
and generating page data and sending the page data based on the card region data, the control set data and the control data.
2. The method of claim 1,
the card region data comprises the style and the interaction data of the card region, the control set data comprises the style and the interaction data of the control set, and the control data comprises the style and the interaction data of the control.
3. The method of claim 2,
each control contains the control data, the interaction data corresponding to the control data is sourced from the business system associated with the control, and the business systems associated with each control are not identical.
4. A method of generating a page, comprising:
sending a request for generating a page, and receiving page data returned corresponding to the request;
acquiring card area data contained in the page data, control set data corresponding to the card area data and control data corresponding to the control set data;
and generating a page according to the card region data, the control set data and the control data.
5. The method of claim 4,
generating a page according to the card region data, the control set data and the control data, wherein the page comprises the following steps:
associating the interaction of the card areas on the page according to the card interaction data contained in the card area data; determining the style of a card area on a page according to the card style data contained in the card area data, and drawing the card area;
associating the interaction of the control sets in the card area on the page according to the control set interaction data contained in the control set data; determining the style of the control set in the card area on a page according to the control set style data contained in the control set data, and drawing the control set;
associating the interaction of the controls in the control set on the page according to the control interaction data contained in the control data; and determining the style of the control in the control set on the page according to the control style data contained in the control data, and drawing the control.
6. The method of claim 4,
generating a page according to the card region data, the control set data and the control data, wherein the page comprises the following steps:
generating a first page by using local software according to the card region data, the control set data and the control data;
when the first page is abnormal, a second page is obtained from a server to replace the first page; wherein the second page is generated based on HTML5 from the card region data, the control set data, the control data.
7. An apparatus for generating a page, comprising: the system comprises a page control acquisition module, a page data acquisition module and a page data sending module; wherein,
the page acquiring control module is used for receiving a request for generating a page sent by a client, wherein the request comprises an application identifier; acquiring an identifier of a card area contained in the page corresponding to the application identifier, an identifier of a control set contained in the card area and an identifier of a control contained in the control set according to the application identifier;
the page data acquisition module is used for acquiring card area data according to the identification of the card area and acquiring control set data according to the identification of the control set; acquiring control data according to the identification of the control, wherein the control data comprises a service system associated with the control;
and the page data sending module is used for generating page data and sending the page data based on the card region data, the control set data and the control data.
8. An apparatus for generating a page, comprising:
the device comprises a page data receiving module, a page data acquiring module and a page generating module; wherein,
the page data receiving module is used for sending a request for generating a page and receiving page data returned corresponding to the request;
the page data acquisition module is used for acquiring card area data contained in the page data, control set data corresponding to the card area data and control data corresponding to the control set data;
and the page generation module is used for generating a page according to the card area data, the control set data and the control data.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-3 or 4-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-3 or 4-6.
CN202010975373.6A 2020-09-16 2020-09-16 Method and device for generating page Pending CN112130855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010975373.6A CN112130855A (en) 2020-09-16 2020-09-16 Method and device for generating page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010975373.6A CN112130855A (en) 2020-09-16 2020-09-16 Method and device for generating page

Publications (1)

Publication Number Publication Date
CN112130855A true CN112130855A (en) 2020-12-25

Family

ID=73845850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010975373.6A Pending CN112130855A (en) 2020-09-16 2020-09-16 Method and device for generating page

Country Status (1)

Country Link
CN (1) CN112130855A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469081A (en) * 2010-11-11 2012-05-23 中国移动通信集团公司 Smart card operation method, device and system
CN107066272A (en) * 2017-03-31 2017-08-18 北京奇艺世纪科技有限公司 A kind of method for updating pages and device
CN107423070A (en) * 2017-08-03 2017-12-01 北京奇艺世纪科技有限公司 A kind of page generation method and device
CN108089878A (en) * 2017-12-14 2018-05-29 腾讯科技(深圳)有限公司 Page info shows and generation method, apparatus and system
CN108664303A (en) * 2018-04-28 2018-10-16 北京小米移动软件有限公司 The display methods and device of web page contents
CN111193599A (en) * 2019-12-06 2020-05-22 腾讯科技(深圳)有限公司 Message processing method and device
CN111581567A (en) * 2019-02-18 2020-08-25 阿里巴巴集团控股有限公司 Page generation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469081A (en) * 2010-11-11 2012-05-23 中国移动通信集团公司 Smart card operation method, device and system
CN107066272A (en) * 2017-03-31 2017-08-18 北京奇艺世纪科技有限公司 A kind of method for updating pages and device
CN107423070A (en) * 2017-08-03 2017-12-01 北京奇艺世纪科技有限公司 A kind of page generation method and device
CN108089878A (en) * 2017-12-14 2018-05-29 腾讯科技(深圳)有限公司 Page info shows and generation method, apparatus and system
CN108664303A (en) * 2018-04-28 2018-10-16 北京小米移动软件有限公司 The display methods and device of web page contents
CN111581567A (en) * 2019-02-18 2020-08-25 阿里巴巴集团控股有限公司 Page generation method and device
CN111193599A (en) * 2019-12-06 2020-05-22 腾讯科技(深圳)有限公司 Message processing method and device

Similar Documents

Publication Publication Date Title
CN107832045B (en) Method and apparatus for cross programming language interface conversion
CN113031946B (en) Method and device for rendering page component
CN110020329B (en) Method, device and system for generating webpage
CN107330087B (en) Page file generation method and device
CN110688829A (en) Table generation method, device, equipment and storage medium
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN109413056B (en) Method and apparatus for processing information
CN113382083A (en) Webpage screenshot method and device
CN112947918A (en) Data display method and device
CN112905178A (en) Method, device, equipment and medium for generating business function page
CN110647327B (en) Method and device for dynamic control of user interface based on card
CN112486482A (en) Page display method and device
CN113553123B (en) Data processing method, device, electronic equipment and storage medium
CN113220381A (en) Click data display method and device
CN114255084A (en) Advertisement page display method, device and system
CN110941401A (en) Printing method and device
CN113342450A (en) Page processing method and device, electronic equipment and computer readable medium
CN115495175A (en) Picture display method and device, terminal equipment and computer medium
CN113784194A (en) Embedding method and device of video player
CN113282852A (en) Method and device for editing webpage
CN110908550B (en) Operation processing method and device in cursor hovering state
CN112445394A (en) Screenshot method and device
CN110618811A (en) Information presentation method and device
CN112130855A (en) Method and device for generating page
CN110858240A (en) Front-end module loading method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd