CN115421828A - Page rendering method and device, electronic equipment and storage medium - Google Patents

Page rendering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115421828A
CN115421828A CN202210927242.XA CN202210927242A CN115421828A CN 115421828 A CN115421828 A CN 115421828A CN 202210927242 A CN202210927242 A CN 202210927242A CN 115421828 A CN115421828 A CN 115421828A
Authority
CN
China
Prior art keywords
target
resource
data
page
identifier
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
CN202210927242.XA
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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210927242.XA priority Critical patent/CN115421828A/en
Publication of CN115421828A publication Critical patent/CN115421828A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

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

Abstract

The embodiment of the disclosure relates to a page rendering method, a page rendering device, a storage medium and an electronic device, wherein the page rendering method comprises the following steps: acquiring a target resource bit identifier corresponding to a target page, wherein the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating a layout position in the target page; determining target resource data corresponding to the target resource bit identifier; rendering the resource bit indicated by the target resource bit identification based on the target resource data. The method is used for solving the problem that the current page rendering method cannot flexibly support the adjustment of the modules in the page.

Description

Page rendering method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page rendering method and apparatus, an electronic device, and a storage medium.
Background
In order to better provide comprehensive, rich and high-quality information service for users. Before a page is rendered, various information of various industries is aggregated through various modes such as collection, mining and cooperation, and then different pages are rendered according to different industries, scenes, crowds and the like, so that differentiated information service and display are realized. At present, a page is rendered through a page building mode, a protocol is formed in a development platform and is issued to a client through a server, and the client can render according to the protocol. Generally, the current page rendering method cannot flexibly support the adjustment of modules in the page.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present disclosure provides a page rendering method, apparatus, storage medium, and electronic device.
In a first aspect, an embodiment of the present disclosure provides a page rendering method, including:
acquiring a target resource bit identifier corresponding to a target page, wherein the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating a layout position in the target page;
determining target resource data corresponding to the target resource bit identifier;
rendering the resource bit indicated by the target resource bit identification based on the target resource data.
In a second aspect, an embodiment of the present disclosure provides a page rendering apparatus, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a target resource bit identifier corresponding to a target page, the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating a layout position in the target page;
the determining module is used for determining target resource data corresponding to the target resource bit identifier;
and the rendering module is used for rendering the resource bit indicated by the target resource bit identification based on the target resource data.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement any one of the page rendering methods provided by the embodiments of the present disclosure.
In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is configured to execute any one of the page rendering methods provided in the embodiments of the present disclosure.
In a fifth aspect, the present disclosure further provides a computer program product, where the computer program product is configured to execute any one of the page rendering methods provided in the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has at least the following advantages: in the embodiment of the present disclosure, the target page is divided into at least one resource bit, target resource data corresponding to the target resource bit identifier may be acquired, and the resource bit indicated by the target resource bit identifier is rendered based on the target resource data, so that rendering for different resource bits in the target page may be implemented. Because the target resource data and the layout information indicated by the resource bits are distinguished, in the rendering process, if the adjustment of some modules in the page is involved, the resource bits corresponding to the positions can be divided according to the positions needing to be changed in the page, and the adjustment of the positions and the sequence of the modules can be realized by only adjusting the incidence relation between the resource bit identifiers and the resource data, so that the adjustment of the modules in the page can be flexibly supported.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of a page rendering method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a page partition resource bit according to an embodiment of the disclosure;
fig. 3 is a schematic diagram of an architecture of an application of a page rendering method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a page rendering apparatus 400 according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
In the related technology, page rendering can be performed through a page building mode, a brand new protocol is formed in a development platform by developing through negotiation between a server and a client, the protocol is issued to the client through a server, and the client can perform rendering according to the protocol, wherein the protocol does not distinguish business module information and layout information in a protocol layer, a division rule related to a business assembly is undefined in the protocol, and the division rule of the business assembly is not defined in the existing page division process. The page rendering mode through the page building mode at least has the following problems:
1. the server needs to cooperate with the client, the format of the service data issued by the server to the client needs to meet the client requirement, and the protocol needs negotiation between the client and the server.
2. Since the protocol layer does not distinguish the service module information from the layout information, it is difficult to maintain the protocol, and is not favorable for module (service data) adjustment, such as adjustment of module position and sequence, and adjustment of partial layout in the page.
3. Since the protocol is a completely new protocol generated, it cannot be implemented on old pages, i.e., progressively.
4. The division of the service components is not regular, the division granularity is inconsistent, the service components need to be bound by events, the construction process is complex, and the service components are difficult to maintain after construction is completed.
In order to solve the above problem, an embodiment of the present disclosure provides a page rendering method, which may be performed by a page rendering apparatus, where the apparatus may be implemented by software and/or hardware, and may be integrated on any electronic device with computing capability.
The page rendering method provided by the embodiment of the disclosure can obtain a target resource bit identifier corresponding to a target page, the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating one layout position in the target page; determining target resource data corresponding to the target resource bit identifier; and rendering the resource bit indicated by the target resource bit identification based on the target resource data so as to realize the rendering of the target page.
The target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating a layout position in the target page.
In some embodiments, the association of the resource bit identification with the resource data may be stored in a service data protocol. After the target resource bit identifier is obtained, the target resource data corresponding to the target resource bit identifier can be determined according to the incidence relation between the resource bit identifier and the resource data in the service data protocol.
Because the target resource data and the layout information indicated by the resource bits are distinguished, in the rendering process, if the adjustment of some modules in the page is involved, the resource bits corresponding to the positions can be divided according to the positions needing to be changed in the page, and the adjustment of the positions and the sequence of the modules can be realized by only adjusting the incidence relation between the resource bit identifiers and the resource data, so that the adjustment of the modules in the page can be flexibly supported.
In some embodiments, determining that the target resource bit identifies corresponding target resource data comprises: determining a target resource identifier set in association with the target resource bit identifier from a service data protocol; and acquiring target resource data indicated by the target resource identification.
The target resource data includes: target service data and a target component identifier corresponding to the target service data.
After the target resource bit identifier is obtained, the target resource identifier corresponding to the target resource bit identifier can be determined according to the association relationship between the resource bit identifier and the resource identifier, and the target resource data indicated by the target resource identifier can be obtained.
In some embodiments, rendering the resource bits indicated by the target resource bit identification based on the target resource data includes: acquiring a target service component indicated by a target component identifier; and mapping the target service data to a target service component for rendering so as to render the resource bit indicated by the target resource bit identifier.
Because the service module information of the target service data and the target service assembly is distinguished from the layout information indicated by the resource bit and is associated through the association relation between the resource bit identifier and the resource identifier, in the rendering process, if the adjustment of some modules in the page is involved, the resource bit corresponding to the position can be divided according to the position needing to be changed in the page, so as to flexibly support the adjustment of the modules in the page
Furthermore, since the incidence relation between the resource bit identifier and the resource identifier is stored in the service data protocol, the adjustment of the module position and the module sequence can be realized only by adjusting the incidence relation between the resource bit identifier and the resource identifier in the service data protocol, so that the adjustment of the module in the page can be flexibly supported, and the difficulty and the cost for maintaining the service data protocol can be reduced.
Fig. 1 is a schematic flowchart of a page rendering method according to an embodiment of the present disclosure, which may be applicable to a page rendering situation.
As shown in fig. 1, a schematic flowchart of a page rendering method provided in an embodiment of the present disclosure may include, but is not limited to, the following steps:
101. and acquiring a target resource bit identifier corresponding to the target page.
As shown in fig. 2, a schematic diagram of a page partition resource bit provided in the embodiment of the present disclosure is shown; the page 21 in fig. 2 is divided into 4 resource bits, which are a resource bit 22, a resource bit 23, a resource bit 24, and a resource bit 25, where each resource bit corresponds to a resource bit identifier, for example, the resource bit identifier may be represented by identifiers m1, m2, m3, and the like, and may also be represented in other forms in practice, which is not limited in the embodiment of the present disclosure.
In some embodiments, before obtaining the target resource bit identifier corresponding to the target page, at least one service function corresponding to the target page may be determined, and then at least one resource bit corresponding to the target page and resource data corresponding to each resource bit may be determined based on the at least one service function corresponding to the target page.
Wherein each resource bit corresponds to a service function; and in the service data protocol, the target resource bit identifier and the target resource identifier are set in an associated manner.
That is, the target page may be divided into at least one resource bit based on at least one service function corresponding to the target page, that is, each resource bit may be divided based on an independent function, and each resource bit may correspond to resource data related to the independent function.
102. And determining a target resource identifier set in association with the target resource bit identifier from the service data protocol.
In the embodiment of the disclosure, the service data protocol adds an association relationship between the resource bit identifier and the resource identifier on the basis of the existing protocol. Wherein the existing protocol may be a View Object (View Object) protocol or other protocol.
In the disclosed embodiments, dynamic view rendering (PMT) may be implemented based on a service data protocol. By restricting the association relationship between the resource bit identifier and the resource identifier in the service data protocol and the division rule of the service components, the multiplexing of the service data protocol can be realized, and the communication cost is reduced.
The service data protocol may include an outer layer protocol and a module protocol.
(1) The outer layer protocol includes, but is not limited to, two fields, regions (regions) which store page layout information and modules which store service module information. Illustratively, the regions field may be as follows:
regions:{
resource bit 1: [ 'Business Module 1' ]
Resource bit 2: [ 'service Module 2' ]
}
The resource bit 1 and the resource bit 2 are different resource bit identifiers for indicating different resource bits, and the service module 1 and the service module 2 are different resource identifiers for indicating different resource data.
Illustratively, the modules field may be as follows:
modules:{
the 'traffic module 1': {},
the 'traffic module 2': {},
}
the service module 1 and the service module 2 are different resource identifiers and are used for indicating different resource data.
(2) The resource data format is specified in the module protocol, which is referred to as data format indication information in the embodiments of the present disclosure, and the data format indication information is used to indicate that the resource data includes a component identifier and service data corresponding to the component indicated by the component identifier. In some embodiments, the data format indication information indicates that the resource data further includes buried point data corresponding to the component indicated by the component identification.
The following three fields may be included in the module protocol, but are not limited to: card _ id, data, and log _ data; the card _ id field represents a component identification, the data field represents service data corresponding to the component indicated by the component identification, and the log _ data represents buried point data corresponding to the component indicated by the component identification.
In the embodiment of the disclosure, on one hand, the service data protocol itself is progressive, and the old protocol can be converted into the service data protocol by extending the modules field and the regions field in the old service data protocol, so that the implementation can still be performed on the basis of the old page; on the other hand, the resource bit division can also be progressive, the position needing to be changed in the old page can be planned to be a new resource bit, the new resource bit can adopt a new rendering mode, the other parts are kept unchanged, and the progressive upgrade of the page can be realized by gradually planning the new resource bit; in yet another aspect, the generation of the service data protocol may also be progressive. The service data protocol can be established by the convention of research and development personnel, and can also be generated through other building platforms, the service data protocol can be built on a complete page by combining a rendering engine, and the problem 3 in the related technology is improved based on the advantages of the aspects.
In the embodiment of the disclosure, since the modules field is planned at the protocol layer for storing the service module data, the regions field is planned for configuring the resource bit identifier and the mapping of the resource identifier in the page, so as to describe the page layout information. When the position and the sequence of the service module (namely the service data) need to be adjusted, the adjustment can be realized only by adjusting the regions field.
For example, assuming that the layout position of the original resource bit 1 is used to display the service data corresponding to the service module 1' and the service module 2', and the layout position of the resource bit 2 is used to display the service data corresponding to the service module 3', the original regions field may be:
regions:{
resource bit 1: [ 'service module 1', 'service module 2' ]
Resource bit 2: [ 'Business Module 3' ]
}
Then, when the position and sequence of the service module (i.e. the service data) need to be adjusted, if the layout position of the resource bit 1 is adjusted to display the service data corresponding to the service module 2', and the layout position of the resource bit 2 is adjusted to display the service data corresponding to the service module 1' and the service module 3', the original regions field may be modified to:
regions:{
resource bit 1: [ 'service Module 2' ]
Resource bit 2: [ 'service module 1', 'service module 3' ]
}
As can be seen from the above examples, the page rendering method provided in the embodiment of the present disclosure may flexibly implement adjustment of the position and the order of the service module (i.e., the service data) by modifying some fields in the protocol. And aiming at the position needing to be changed in the page, the resource position corresponding to the position can be divided, so that the adjustment of the module in the page can be flexibly supported, and the problem 2 in the related technology is improved.
The embodiment of the present disclosure may implement consistency between a service data protocol, a DSL of a User Interface (UI) component, and a real view, and exemplarily takes resource bit 22 and resource bit 23 in fig. 2 as an example; the regions field in the service data protocol may be:
regions:{
resource bit 22: ['m1' ]
Resource bit 23: ['m2','m3' ]
}
Accordingly, the DSL of the UI may include fields:
< RenderRegion region = "resource bit 22" \8230; \8230 >
And a field:
< renderRegion region = "resource bit 23" \8230; >)
The RenderRegion represents a custom rendering region, a field in a DSL of the UI shows a partitioned resource bit identifier "resource bit 22", and "resource bit 23" combines with an association relationship between "resource bit 22" and resource identifier'm 1' in the service data protocol to obtain service data and service components corresponding to'm 1', and an association relationship between "resource bit 23" and resource identifiers'm 2' and'm 3', to obtain service data and service components corresponding to'm 2' and'm 3', and render them, so that the DSL based on the service data protocol and the UI can finally render the service data and service components corresponding to resource bit 22 and resource bit 23 in a page.
103. And acquiring target resource data indicated by the target resource identification.
Wherein the target resource data includes: target service data and a target component identifier corresponding to the target service data.
In some embodiments, the target resource data further includes data format indication information, where the data format indication information is used to indicate that the resource data includes a component identifier, and the service data corresponding to the component indicated by the component identifier.
In some embodiments, the data format indication information indicates that the resource data further includes buried data corresponding to the indicated component.
In some embodiments, obtaining target resource data indicated by the target resource identification may include, but is not limited to, the following processes: sending the target resource identifier to a server (hereinafter also referred to as a server), so that the server acquires initial resource data corresponding to the target resource identifier from a resource library; receiving initial resource data sent by a server; and under the condition that the format of the initial resource data is not matched with the data format indication information, modifying the initial resource data according to the data format indication information to obtain target resource data.
The PMT rendering engine (namely, the rendering engine capable of supporting dynamic rendering) is designed in the embodiment of the disclosure, the service data protocol is consumed by the PMT rendering engine, and when the data issued by the server does not meet the service data protocol of the client, the client can intercept the data issued by the server, convert the data into the service data protocol, and update the service data protocol into the PMT rendering engine. That is to say, under the condition that the initial resource data sent by the server to the client does not satisfy the data format indication information, the initial resource data is modified according to the data format indication information, so that the initial resource format is modified into target resource data comprising three parts, namely component identification, service data corresponding to the component indicated by the component identification, and buried point data corresponding to the component indicated by the component identification.
According to the method in the embodiment, the cooperation of the server is not needed when the service data protocol is executed, and when the data sent to the client by the server does not conform to the service data protocol, the client can modify the data format based on the service data protocol, so that the problem 1 in the related technology is solved.
104. And acquiring the target business component indicated by the target component identification.
In the embodiment of the present disclosure, before the target service component indicated by the target component identifier is obtained, at least one service function corresponding to the target page may also be determined; and aiming at each business function, creating at least one group of business components, wherein each group of business components comprises at least one business component.
In at least one service component corresponding to one service function, each service component can realize the corresponding service function, and the display modes and/or interaction modes corresponding to different service components in the at least one service component are different.
When the business components are divided, at least one business function corresponding to the target page is divided into at least one independent group of business components, and each group of business components comprises at least one business component corresponding to one business function, so that one function can be realized by the corresponding group of business components. Such a service component division improves the above problem 4 in the related art.
The obtaining of the target service component indicated by the target component identifier may refer to: and acquiring the target business component indicated by the target component identification from the component library.
The component library stores at least one business component corresponding to target business data, the target business component is one of the at least one business component, the display modes and/or interaction modes corresponding to different business components in the at least one business component are different, the display modes and/or interaction modes corresponding to different business components are set according to different service objects, and different business components correspond to different component identifications.
In the embodiment of the present disclosure, the different service objects may include service objects that are distinguished based on one or more factors of industry, scene, crowd, location, and time.
As shown in fig. 3, an architecture schematic diagram of a page rendering method application provided in the embodiment of the present disclosure may be implemented by the architecture, where the architecture includes a service rendering container 31, a service data protocol 32, a rendering engine 33, and a service component library 34, and the service component library 34 includes three service components set for the same service function, which are respectively represented as a service component a, a service component B, and a service component C. Generally, the service rendering container 31 may first obtain rendering process information for rendering a target page, where the rendering process information may include some resource bit identifiers to be rendered, and further, after receiving the resource bit identifiers, may query, through a service data protocol, some resource identifiers corresponding to the resource bit identifiers, obtain resource data corresponding to the resource identifiers, obtain service data and a service component identifier from the resource data, and then select, according to the service component identifier, a service component corresponding to the service component identifier from the service component library 34. And the display modes and/or interaction modes corresponding to different business components in the business component A, the business component B and the business component C are set according to different service objects.
In the above embodiment, the component identifier of the service component set for a certain service object can be carried in the resource data, so that when the component is matched from the service component library 34, the service component set for the service object can be directly matched, and thus, when a subsequent page is presented, differentiated information service and display can be realized for different service objects.
105. And mapping the target business data to the target business component for rendering so as to render the target page.
Under the condition that the target service component and the target service data corresponding to the target service component are obtained, the target service data can be mapped to the target service component, and a target page is rendered and displayed.
In the embodiment of the disclosure, a target page is divided into at least one resource bit, and an association relationship between a resource bit identifier and a resource identifier exists in a service data protocol, so that a target resource identifier set in association with the target resource bit identifier can be obtained, target resource data indicated by the target resource identifier, target service data in the target resource data and a target service component can be obtained, and finally, the target service data can be mapped to the target service component for rendering to render the target page.
In some embodiments, in a case that a page needs to be changed, a resource bit corresponding to a position that needs to be changed in the page may be divided, so that adjustment of a module in the page may be flexibly supported, and the above problem 2 in the related art is improved.
In the embodiment of the present disclosure, when the page rendering method is implemented, a target area in the target page is divided into at least one resource bit. The rendering the resource bit indicated by the target resource bit identifier based on the target resource data to render the target page may include, but is not limited to: firstly, rendering the resource bit indicated by the target resource bit identification based on the target resource data by adopting a target rendering mode to render the target area of the target page, and then rendering other areas of the target page by adopting other rendering modes, wherein the other areas are areas except the target area in the target page. The target area may be a position to be changed in the page.
The target rendering mode may be a mode of performing page rendering based on resource bit partitioning, and the other rendering modes may include any page rendering mode except the mode of performing page rendering based on resource bit partitioning provided in the embodiment of the present disclosure.
In the above embodiment, the target rendering mode based on resource bit division may be used for rendering a target region in the target page, and the page regions other than the target region are rendered based on other rendering modes, so that multiple rendering modes may be combined and used in combination, so that the rendering modes are more flexible.
Fig. 4 is a schematic structural diagram of a page rendering apparatus 400 provided in an embodiment of the present disclosure, which may be implemented by software and/or hardware and may be integrated on any electronic device with computing capability.
As shown in fig. 4, a page rendering apparatus 400 provided by an embodiment of the present disclosure may include:
an obtaining module 401, configured to obtain a target resource bit identifier corresponding to a target page, where the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used to indicate a layout position in the target page;
a determining module 402, configured to determine target resource data corresponding to the target resource bit identifier; (ii) a
A rendering module 403, configured to render the resource bits indicated by the target resource bit identifier based on the target resource data.
In some embodiments, the determining module 402 is specifically configured to:
determining a target resource identifier which is set in association with the target resource bit identifier from a service data protocol;
obtaining target resource data indicated by the target resource identifier, where the target resource data includes: target service data and a target component identifier corresponding to the target service data.
In some embodiments, the rendering module 403 is specifically configured to:
acquiring a target service component indicated by the target component identification;
mapping the target service data to the target service assembly for rendering so as to render the resource bit indicated by the target resource bit identifier
In some embodiments, the apparatus further includes a resource bit dividing module 404, configured to determine at least one service function corresponding to a target page before the obtaining module 401 obtains a target resource bit identifier corresponding to the target page;
and determining at least one resource bit corresponding to the target page and resource data corresponding to each resource bit based on at least one service function corresponding to the target page, wherein each resource bit corresponds to one service function.
The apparatus further includes a protocol configuration module 405, configured to set the target resource bit identifier and the target resource identifier in association in a service data protocol.
In some embodiments, the target resource data further includes data format indication information, where the data format indication information is used to indicate that the resource data includes a component identifier, and service data corresponding to the component indicated by the component identifier.
In some embodiments, the data format indication information is used to indicate that the resource data further includes buried point data corresponding to the component indicated by the component identifier.
In some embodiments, the obtaining module 401 is specifically configured to:
sending the target resource identifier to a server so that the server acquires initial resource data corresponding to the target resource identifier from a resource library;
receiving initial resource data sent by the server;
and under the condition that the format of the initial resource data is not matched with the data format indication information, modifying the initial resource data according to the data format indication information to obtain the target resource data.
In some embodiments, the determining module 402 is specifically configured to obtain the target service component indicated by the target component identifier from a component library;
the component library stores at least one business component corresponding to the target business data, the target business component is one of the at least one business component, the display modes and/or the interaction modes corresponding to different business components in the at least one business component are different, the display modes and/or the interaction modes corresponding to different business components are set according to different service objects, and the different business components correspond to different component identifiers.
In some embodiments, the apparatus further includes a service component division module 406, configured to determine at least one service function corresponding to the target page before obtaining the target service component indicated by the target component identifier; aiming at each business function, creating at least one group of business components, wherein each group of business components comprises at least one business component;
the apparatus further includes a component library configuring module 407, configured to store the at least one group of service components corresponding to the target page in a component library.
In some embodiments, a target region in the target page is divided into the at least one resource bit;
the rendering the resource bit indicated by the target resource bit identification based on the target resource data to render the target page includes:
based on the target resource data, rendering a resource bit indicated by the target resource bit identification in a target rendering mode to render a target area of the target page;
and rendering other areas of the target page by adopting other rendering modes, wherein the other areas are areas except the target area in the target page.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, which is used for exemplarily describing an electronic device implementing any page rendering method in the embodiment of the present disclosure, and should not be construed as a specific limitation to the embodiment of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processor (e.g., central processing unit, graphics processor, etc.) 501 that may perform various suitable actions and processes in accordance with programs stored in a Read Only Memory (ROM) 502 or loaded from a storage device 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processor 501, the ROM502, and the RAM503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While the electronic device 500 is illustrated with various means, it is not required that all illustrated means be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. When executed by the processor 501, the computer program may perform the functions defined in any of the page rendering methods provided by the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure 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 disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the page rendering method.
In embodiments of the present disclosure, computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 disclosure. 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a computer-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a computer-readable storage medium would include an electrical connection based on 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other combinations of features described above or equivalents thereof without departing from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (13)

1. A page rendering method, comprising:
acquiring a target resource bit identifier corresponding to a target page, wherein the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating a layout position in the target page;
determining target resource data corresponding to the target resource bit identifier;
rendering the resource bit indicated by the target resource bit identification based on the target resource data.
2. The method of claim 1, wherein the determining target resource data corresponding to the target resource bit identification comprises:
determining a target resource identifier set in association with the target resource bit identifier from a service data protocol;
acquiring target resource data indicated by the target resource identifier, wherein the target resource data comprises: target service data and a target component identifier corresponding to the target service data.
3. The method of claim 2, wherein rendering the resource bits indicated by the target resource bit identification based on the target resource data comprises:
acquiring a target service component indicated by the target component identification;
and mapping the target service data to the target service component for rendering so as to render the resource bit indicated by the target resource bit identifier.
4. The method of claim 2, wherein before the obtaining the target resource bit identifier corresponding to the target page, the method further comprises:
determining at least one service function corresponding to the target page;
determining at least one resource bit corresponding to the target page and resource data corresponding to each resource bit based on at least one service function corresponding to the target page, wherein each resource bit corresponds to one service function;
and in a service data protocol, the target resource bit identifier and the target resource identifier are set in an associated manner.
5. The method according to claim 1, wherein the target resource data further includes data format indication information, and the data format indication information is used to indicate that the resource data includes a component identifier, and service data corresponding to the component indicated by the component identifier.
6. The method of claim 5, wherein the data format indication information is used for indicating that the resource data further comprises buried point data corresponding to the component indicated by the component identification.
7. The method of claim 5 or 6, wherein the obtaining target resource data indicated by the target resource identification comprises:
sending the target resource identifier to a server so that the server acquires initial resource data corresponding to the target resource identifier from a resource library;
receiving initial resource data sent by the server;
and under the condition that the format of the initial resource data is not matched with the data format indication information, modifying the initial resource data according to the data format indication information to obtain the target resource data.
8. The method of claim 3, wherein the obtaining the target business component indicated by the target component identification comprises:
acquiring the target business component indicated by the target component identification from a component library;
the component library stores at least one business component corresponding to the target business data, the target business component is one of the at least one business component, the display modes and/or the interaction modes corresponding to different business components in the at least one business component are different, the display modes and/or the interaction modes corresponding to different business components are set according to different service objects, and the different business components correspond to different component identifiers.
9. The method of claim 3, wherein prior to obtaining the target business component indicated by the target component identification, the method further comprises:
determining at least one service function corresponding to the target page;
aiming at each business function, creating at least one group of business components, wherein each group of business components comprises at least one business component;
and storing the at least one group of business components corresponding to the target page in a component library.
10. The method of claim 1, wherein a target region in the target page is divided into the at least one resource bit;
the rendering the resource bit indicated by the target resource bit identification based on the target resource data comprises:
based on the target resource data, rendering a resource bit indicated by the target resource bit identification in a target rendering mode to render a target area of the target page;
and rendering other areas of the target page by adopting other rendering modes, wherein the other areas are areas except the target area in the target page.
11. A page rendering apparatus, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a target resource bit identifier corresponding to a target page, the target page is divided into at least one resource bit, the target resource bit identifier is an identifier of any resource bit in the at least one resource bit, and each resource bit is used for indicating a layout position in the target page;
the determining module is used for determining target resource data corresponding to the target resource bit identifier;
and the rendering module is used for rendering the resource bit indicated by the target resource bit identification based on the target resource data.
12. An electronic device, comprising: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the page rendering method according to any one of claims 1 to 10.
13. A computer storage medium storing a computer program for a page rendering method according to any one of claims 1 to 10.
CN202210927242.XA 2022-08-03 2022-08-03 Page rendering method and device, electronic equipment and storage medium Pending CN115421828A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210927242.XA CN115421828A (en) 2022-08-03 2022-08-03 Page rendering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210927242.XA CN115421828A (en) 2022-08-03 2022-08-03 Page rendering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115421828A true CN115421828A (en) 2022-12-02

Family

ID=84196974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210927242.XA Pending CN115421828A (en) 2022-08-03 2022-08-03 Page rendering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115421828A (en)

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN110909521B (en) Online document information synchronous processing method and device and electronic equipment
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN109769141A (en) A kind of video generation method, device, electronic equipment and storage medium
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111240786A (en) Walkthrough method and device, electronic equipment and storage medium
CN114035879A (en) Page theme color changing method and device, electronic equipment and computer readable medium
CN111694629A (en) Information display method and device and electronic equipment
CN113126985B (en) Method, apparatus, electronic device and computer readable medium for page rendering
CN114428925A (en) Page rendering method and device, electronic equipment and computer readable medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN111596992A (en) Navigation bar display method and device and electronic equipment
CN115421828A (en) Page rendering method and device, electronic equipment and storage medium
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN114860213A (en) Application package generation method, device, equipment and medium
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN112422648A (en) Data synchronization method and system
CN115309410B (en) Edge cluster application publishing method and device of edge computing scene and electronic equipment
CN111008178A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111581305B (en) Feature processing method, device, electronic equipment and medium
CN115221178B (en) Data table binding method, device, electronic equipment and computer readable medium
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN112948108B (en) Request processing method and device and electronic equipment
CN113347278B (en) Data processing method and device and electronic equipment

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