CN107315646A - Data flow control method and device between page assembly - Google Patents
Data flow control method and device between page assembly Download PDFInfo
- Publication number
- CN107315646A CN107315646A CN201610270495.9A CN201610270495A CN107315646A CN 107315646 A CN107315646 A CN 107315646A CN 201610270495 A CN201610270495 A CN 201610270495A CN 107315646 A CN107315646 A CN 107315646A
- Authority
- CN
- China
- Prior art keywords
- assembly
- page
- sub
- page assembly
- call back
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/543—User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Abstract
This application discloses the data flow control method between a kind of page assembly and device.One embodiment of methods described includes:Structure to page documents is parsed, and obtains the level of nesting relation between page assembly, wherein, the page assembly is included in data element and call back function, the level of nesting relation, and sub-ordinate components are nested in level assembly;According to the level of nesting relation, each page assembly is rendered according to the order from upper level assembly to sub-ordinate components, wherein, transmit data element and call back function to sub-ordinate components when being rendered to upper level assembly.The embodiment can improve the validity of the data flow control between page assembly.
Description
Technical field
The application is related to field of computer technology, and in particular to page display technology field, especially
It is related to data flow control method and device between page assembly.
Background technology
In computer realm, the modularization of the page that is, the modularization of the page, in the front end of the page
In showing, often by data element (the data element, the base unit of data, one of the page
Data element can be made up of some indivisible data item), function, the data such as communications protocol enter
Row encapsulation forms multiple page assemblies, so as to realize the modularization of the page.In above-mentioned encapsulation process,
Between page assembly data flow (such as configuration including data, render, the communication between event
Deng) control directly affects the complexity of page front end exploitation, efficiency, or even engineering is tieed up
Shield property.
Data flow control method between existing page assembly, frequently includes event communication and generation
Reason service two ways.Wherein, in event communication mode, data only can from event triggering person to
Event registration person, for the baroque page, easily causes data flow disorderly and unsystematic;Generation
Manage in method of service, data are managed by same agency service, because multiple components are relied on simultaneously
Agency service, it is impossible to realize the lower coupling requirement of inter-module.Therefore, between existing page assembly
Data flow control method there is the problem of validity is not high.
The content of the invention
The purpose of the application is to propose the data flow controlling party between a kind of improved page assembly
Method and device, to solve the technical problem that background section above is mentioned.
On the one hand, this application provides the data flow control method between a kind of page assembly, institute
The method of stating includes:Structure to page documents is parsed, and obtains the nesting level between page assembly
Secondary relation, wherein, the page assembly includes data element and call back function, the nesting level
In secondary relation, sub-ordinate components are nested in level assembly;According to the level of nesting relation, according to
Order from upper level assembly to sub-ordinate components is rendered to each page assembly, wherein, to higher level
When component is rendered data element and call back function are transmitted to sub-ordinate components.
In certain embodiments, it is described according to the level of nesting relation, according to from upper level assembly
To sub-ordinate components order each page assembly is rendered including:Upper level assembly is rendered
When, the data type of data element in sub-ordinate components is cached;Wash with watercolours is carried out to sub-ordinate components
During dye, data type needed for being taken out from caching is verified, and verification is by then being rendered.
In certain embodiments, the verification includes the verification to data communication protocol, data class
At least one of verification of type-word section.
In certain embodiments, data element is transmitted when described pair of upper level assembly is rendered to sub-ordinate components
Element and call back function include:Data element and call back function in sub-ordinate components is passed by quoting
The mode passed is cached.
In certain embodiments, methods described also includes:Detect the document properties of each page assembly
Whether value changes, wherein, the document properties value includes the data element in page assembly
Or the index or the value of pointer of call back function;If the document properties value of any page assembly occurs
Change, the change is sent by call back function to the upper level assembly of the page assembly changed
Change information;According to the change information, by the upper level assembly of the page assembly changed
Rendered again with the page assembly changed.
Second aspect, this application provides the data flow control device between a kind of page assembly,
Described device includes:Parsing module, is configured to parse the structure of page documents, obtains
Take the level of nesting relation between page assembly, wherein, the page assembly include data element and
In call back function, the level of nesting relation, sub-ordinate components are nested in level assembly;Render mould
Block, is configured to according to the level of nesting relation, according to from upper level assembly to sub-ordinate components
Order is rendered to each page assembly, wherein, passed when being rendered to upper level assembly to sub-ordinate components
Delivery data element and call back function.
In certain embodiments, the rendering module includes:Buffer unit, is configured to upper
When level assembly is rendered, the data type of data element in sub-ordinate components is cached;School
Verification certificate member, when being configured to render sub-ordinate components, data class needed for being taken out from caching
Type is verified, and verification is by then being rendered.
In certain embodiments, the verification includes the verification to data communication protocol, data class
At least one of verification of type-word section.
In certain embodiments, the rendering module is also configured to:By the number in sub-ordinate components
Cached according to element and call back function by way of quoting transmission.
In certain embodiments, described device also includes:Detection module, is configured to detection each
Whether the document properties value of page assembly changes, wherein, the document properties value includes page
The index or the value of pointer of data element or call back function in the component of face;Sending module, configuration
If the document properties value for any page assembly changes, by call back function to generation
The upper level assembly of the page assembly of change sends the change information of the change;The rendering module,
Be also configured to according to the change information, by the upper level assembly of the page assembly changed and
The page assembly changed is rendered again.
Data flow control method and device between the page assembly that the application is provided, by page
The structure of face document is parsed, and obtains the level of nesting relation between page assembly, wherein, on
State in level of nesting relation, sub-ordinate components are nested in level assembly, page assembly includes data element
Element and call back function, then according to above-mentioned level of nesting relation, according to from upper level assembly to subordinate
The order of component is rendered to each page assembly, wherein, when being rendered to upper level assembly, to
Sub-ordinate components transmit data element and call back function.Due to according to from upper level assembly to sub-ordinate components
Order each page assembly is rendered, and by the downward level assembly of upper level assembly in render process
Data element and call back function are transmitted, makes data flow single, and avoids using agency service,
The degree of coupling of inter-module is low, so as to improve the effective of the control of the data flow between page assembly
Property.
Brief description of the drawings
By reading the detailed description to non-limiting example made with reference to the following drawings, this
The other features, objects and advantages of application will become more apparent upon:
Fig. 1 is an implementation of the data flow control method between the page assembly according to the application
The flow chart of example;
Fig. 2 is the nesting level being packaged the data element in the page between the page assembly to be formed
Secondary relation schematic diagram;
Fig. 3 is an implementation of the data flow control method between the page assembly according to the application
Example carries out the schematic diagram of data flow control to the page assembly shown in Fig. 2;
Fig. 4 is another reality of the data flow control method between the page assembly according to the application
Apply the flow chart of example;
Fig. 5, which is shown, can apply the exemplary system architecture of the embodiment of the present application;
Fig. 6 is an implementation of the data flow control device between the page assembly according to the application
The structural representation of example;
Fig. 7 is adapted for the knot of the computer system of the electronic equipment for realizing the embodiment of the present application
Structure schematic diagram.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is appreciated that
, specific embodiment described herein is used only for explaining related invention, rather than to the hair
Bright restriction.It also should be noted that, illustrate only for the ease of description, in accompanying drawing with
About the related part of invention.
It should be noted that in the case where not conflicting, embodiment and embodiment in the application
In feature can be mutually combined.Describe this in detail below with reference to the accompanying drawings and in conjunction with the embodiments
Application.
Fig. 1 is refer to, it illustrates a reality of the data flow control method between page assembly
Apply the flow 100 of example.The present embodiment mainly in this way be applied to have certain operational capability and
Illustrated in the electronic equipment of display capabilities.Data flow controlling party between the page assembly
Method, comprises the following steps:
Step 101, the structure to page documents is parsed, and obtains the nesting between page assembly
Hierarchical relationship.
In the present embodiment, the structure that electronic equipment can be first to page documents is parsed,
So as to obtain the level of nesting relation between page assembly, wherein, page assembly can include data
Element and call back function.In level of nesting relation, sub-ordinate components are nested in level assembly.
Here, page documents can include but is not limited to one kind in Documents:HTML
(HyperText Markup Language, HTML) document, ASP (Active
Server Pages, Active Server Pages) document, JSP (Java Server Pages, java
The server page) document etc..The structure of document can close for the level of expression document content
System.The structure of document can be recorded by various forms, for example, the structure of document can be with
Set and recorded by DOM (Document Object Model, DOM Document Object Model).Pass through
The file structure of dom tree description, can be packaged into a page assembly by each tree, for example,
Whole dom tree is packaged into the page assembly of maximum, and each subtree of dom tree is packaged into
The molecule tree being nested under the sub-ordinate components of the maximum page assembly, each subtree can be sealed
The sub-ordinate components for being nested in the page assembly that the subtree is packaged into are dressed up, by that analogy.
As an example, Fig. 2 is shown to be packaged to form page by the data element in the page
The level of nesting relation schematic diagram of face inter-module.As shown in Fig. 2 the page 201 include two compared with
Big column 2011,2012, column 2011 includes data element 20111,20112 and 20113,
Column 2012 includes data element 20121 and 20122, and they are respectively encapsulated into corresponding page
201 page assembly 202, the sub-ordinate components page assembly 2021 and 2022 of page assembly 202,
The sub-ordinate components page assembly 20211,20212 and 20213 of page assembly 2021, page group
The sub-ordinate components page assembly 20221 and 20222 of part 2022.Wherein, electronic equipment is to the page
201 structure carries out parsing obtained level of nesting relation:Page assembly 2021 and 2022
Page assembly 202 is nested in, page assembly 20211,20212 and 20213 is nested in page group
Part 2021, page assembly 20221 and 20222 is nested in page assembly 2022.
Wherein, the minimum unit of each page assembly can include data element and call back function.
Here, call back function is a function called by pointer, for example, function A pointer
Or address pass to another function B, function B as parameter can be by function A pointer
Or call function A is carried out in address, then function A is a call back function.Data element for example can be with
The Bibliographical Information of one book, and each single item (such as title, authors' name) of Bibliographical Information is respectively
For a data item.
Step 102, according to above-mentioned level of nesting relation, according to from upper level assembly to sub-ordinate components
Order each page assembly is rendered.
In the present embodiment, the level of nesting that electronic equipment can then be obtained according to step 101
Relation, is rendered according to the order from upper level assembly to sub-ordinate components to each page assembly.Its
In, in upper level assembly render process, the number that sub-ordinate components need can be transmitted to sub-ordinate components
According to element and call back function.So as to the data flow of data element and call back function in page assembly
To for upper level assembly to sub-ordinate components.
During the page rendering that front end is developed, render tree is often built according to data element,
Position calculating, pattern calculating etc. are carried out to each data element, then to each data element
Described.In the present embodiment, electronic equipment can be according to the level of nesting relation of page assembly
The rendering order of page assembly is determined, to each page assembly according to from upper level assembly to sub-ordinate components
Order rendered.
Fig. 3 is refer to, it illustrates page assembly when being rendered the page shown in Fig. 2
Data flow.As shown in figure 3, electronic equipment first by the data element of the page 201, return
Communication protocol between letter of transfer number and page assembly is parsed, and is sent to page assembly 202,
Then, when being rendered to page assembly 202, by page assembly 2021 and 2022
Data type, call back function are delivered separately to page assembly 2021 and 2022, such as at some
In realization, electronic equipment can respectively by page assembly 2021, page assembly 2022 the two
Data type of data element, call back function and data element in sub-ordinate components etc. is delayed
Deposit, when being rendered respectively to page assembly 2021, page assembly 2022, from caching
Data element, data type and call back function needed for taking out respective page component are rendered.
When being rendered to page assembly 2021, respectively to its sub-ordinate components page assembly 20211,
20212nd, data type of 20213 data element, call back function and data element etc. is carried out
Caching;When being rendered to page assembly 2022, respectively to its sub-ordinate components page assembly
20221st, data type of 20222 data element, call back function and data element etc. is carried out
Caching;Analogized with secondary.For each page assembly, its data element, call back function and number
It is may be stored according to the data type of element in data storage area 301, in data storage area
These data constitute the page 201.Data flow between the page assembly shown in Fig. 3 is from upper
Level assembly is flowed to single to sub-ordinate components.
In some optional implementations of the present embodiment, electronic equipment is according to level of nesting relation
When being rendered to each page assembly, upper level assembly is carried out its sub-ordinate components in render process
The data type of middle data element, call back function and data element is cached, to subordinate
When component is rendered, data type needed for first being taken out from caching is verified, and is verified
The sub-ordinate components are rendered again after.Alternatively, sub-ordinate components are to required data type
Verification can include but is not limited to verification to data communication protocol, the school of data type field
At least one of test.When electronic equipment determines the number of data element in caching in checking procedure
According to type field it is consistent with required data type field when, it may be determined that verification pass through, now,
The data element of data type is saved in respective page component needed for electronic equipment will can meet
In memory block (such as statement state of page assembly), and trigger default rendering intent (such as
Render method etc.) page assembly is rendered.When electronic equipment in checking procedure really
, can in fixed caching when the data type field and inconsistent required data type field of data element
To further determine that data exception, data exception notice can also be provided.
In some optional implementations of the present embodiment, to subordinate's group when being rendered to upper level assembly
Part, which transmits data element and call back function, to be included:By the data element in sub-ordinate components and readjustment letter
Number is cached by way of quoting transmission.Transmission is quoted, is generally referred in call function
Transmit the address of actual parameter.Here, electronic equipment can be by data element or call back function
Address (such as the value of index or pointer) passes to sub-ordinate components, and sub-ordinate components are reading data element
Element or when calling call back function, can pass through the change to data element or the address of call back function
Come the call back function for changing read data element or being called.
In the present embodiment, parsed by the structure to page documents, obtain each page group
Level of nesting relation between part, then according to level of nesting relation from upper level assembly to sub-ordinate components
Order each page assembly is rendered, and by the downward level assembly of upper level assembly in render process
Data element and call back function are transmitted, makes data flow single, and without the use of agency service,
The degree of coupling of inter-module is low, so as to improve the effective of the control of the data flow between page assembly
Property.
Fig. 4 is refer to, Fig. 4 shows the data flow control between the page assembly according to the application
The flow 400 of another embodiment of method processed.As shown in figure 4, flow 400 includes:
Step 401, the structure to page documents is parsed, and obtains the nesting between page assembly
Hierarchical relationship.
In the present embodiment, the structure that electronic equipment can be first to page documents is parsed,
So as to obtain the level of nesting relation between page assembly, wherein, page assembly can include data
Element and call back function.For example, electronic equipment can be by the structures of page documents, by the page
The page assembly of multiple different levels is packaged into, the minimum unit of each page assembly can include
Data element and call back function.Can have nest relation, structure between the page assembly of different levels
Into the level of nesting relation between page assembly.In the level of nesting relation, sub-ordinate components are nested
In upper level assembly.
Step 402, according to above-mentioned level of nesting relation, according to from upper level assembly to sub-ordinate components
Order each page assembly is rendered.
In the present embodiment, the level of nesting that electronic equipment can then be obtained according to step 401
Relation, is rendered according to the order from upper level assembly to sub-ordinate components to each page assembly.Its
In, in upper level assembly render process, the number that sub-ordinate components need can be transmitted to sub-ordinate components
According to element and call back function.So as to the data flow of data element and call back function in page assembly
To for upper level assembly to sub-ordinate components.
Step 403, detect whether the document properties value of each page assembly changes.
In the present embodiment, electronic equipment in the render process of page assembly or can be rendered
After the completion of, whether the document properties value of detection page assembly changes.Here, page assembly
Document properties can be for each document object (such as html document pair in representation page component
As) attribute, the reference type-index or pointer of such as data element or call back function, page
The document properties value of face component can be the value of above-mentioned index or pointer.
It is appreciated that when the document properties value of page assembly changes, representing the page group
Part has new data element to add, or the index or pointer of data element or call back function value
Change, i.e. data element or call back function changes.
Step 404, if the document properties value of any page assembly changes, readjustment is passed through
Function sends the change information of above-mentioned change to the upper level assembly of the page assembly changed.
In the present embodiment, if the document properties value of any page assembly changes, electronics
The change information of above-mentioned change by call back function can be sent to level assembly thereon by equipment.This
In, change information can include the data element or call back function changed, and its change
Attribute, property value etc. before and after change.
As an example, Fig. 3 is refer to, if electronic equipment detects page assembly 20211
The document properties value of some data element (such as one combobox) changes, then can lead to
Cross and call the call back function in page assembly 2021 that change information is sent into page assembly 2021,
Now, electronic equipment can continue to detect whether the document properties value of page assembly 2021 becomes
Change, in the event of changing, then the change information of page assembly 2021 is sent to page assembly
202, if not changing (state for such as only changing respective page component), the page
Component 2021 receives the change information of the transmission of page assembly 20211 and according to change information to itself
Data or data element or the transmission logic of call back function to sub-ordinate components are adjusted.
Step 405, according to above-mentioned change information, by higher level's group of the page assembly changed
Part and the page assembly changed are rendered again.
In the present embodiment, electronic equipment can be according to above-mentioned change information, by what is changed
The upper level assembly of page assembly and the page assembly changed are still according to from upper level assembly to subordinate
The order of component is rendered again.
It refer to the example provided in step 404 by taking Fig. 3 as an example, the text of page assembly 20211
Shelves property value changes, further, the document properties value hair of page assembly 2021 and 202
Changing, then electronic equipment can render page assembly 202,2021,20211 again successively.
Alternatively, if the document properties value for detecting page assembly 2021 changes, electronic equipment
Page assembly 202 and page assembly 20211 on the basis of the change can further be detected
Whether document properties value changes, it is assumed that the document properties value of page assembly 202 does not occur
Change, and the document properties value of page assembly 20211 changes, then electronic equipment can be according to
It is secondary to render page assembly 2021 and page assembly 20211 again.In render process and step 402
Unanimously, data element and call back function are transmitted to sub-ordinate components when being rendered to upper level assembly,
It will not be repeated here.
In the present embodiment, in above-mentioned implementation process step 401, step 402 respectively with it is preceding
Step 201, the step 202 stated in embodiment are essentially identical, will not be repeated here.
Figure 4, it is seen that unlike embodiment corresponding from Fig. 2, in the present embodiment
Page assembly between data flow control method flow 400 add step 403,404,
405.By the step 403 of increase, 404,405, the present embodiment is highlighted in page assembly
To the control of data flow when document properties value changes, data flow is remained as from higher level's group
Part is to sub-ordinate components, it is ensured that data flow it is single, further improve the number between page assembly
According to the validity of traffic organising.
Fig. 5 is refer to, Fig. 5, which is shown, can apply the example system frame of the embodiment of the present application
Structure 500.
As shown in figure 5, system architecture 500 can include terminal device 501,502, network 503
With server 504.Network 503 is used between terminal device 501,502 and server 504
The medium of communication link is provided.Network 503 can include various connection types, such as it is wired,
Wireless communication link or fiber optic cables etc..
Terminal device 501,502 can be interacted by network 503 with server 504, to receive
Or send message etc..Various telecommunication customer end applications can be installed on terminal device 501,502,
Such as browser application, searching class are applied, shopping class is applied, financing class is applied, map class is answered
With, social platform application, mailbox client, JICQ etc..
Terminal device 501,502 can be the various electricity for supporting browser application etc. to be mounted thereon
Sub- equipment, including but not limited to smart mobile phone, intelligent watch, tablet personal computer, individual digital are helped
Reason, E-book reader, MP3 player (Moving Picture Experts Group Audio
Layer III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture
Experts Group Audio Layer IV, dynamic image expert's compression standard audio aspect 4) broadcast
Put device, pocket computer on knee and desktop computer etc..
Server 504 can be to provide the server of various services.Such as server 504 can be with
It is to provide background server supported etc. to browser application of terminal device 501,502 etc..Clothes
Business device, which can be stored to the data received, generated etc., to be handled, and result is fed back
To terminal device.
It should be noted that the data flow control between the page assembly that the embodiment of the present application is provided
Method processed is general to be performed by terminal device 501,502, but can also be passed through in some cases
Server 504 is performed, and the application is not limited this.Correspondingly, the embodiment of the present application is carried
Data flow control device between the page assembly of confession is generally located in end equipment 501,502,
It can also be arranged in server 504.
It should be understood that the number of the terminal device, network and server in Fig. 5 is only signal
Property.According to needs are realized, can have any number of terminal device, network and server.
With further reference to Fig. 6, as the realization to method shown in above-mentioned each figure, the application is provided
A kind of one embodiment of data flow control device between page assembly, the device embodiment
Corresponding with the embodiment of the method shown in Fig. 2, the device specifically can apply to electronic equipment (example
Terminal device 501,502 as shown in Figure 5 etc.) in.
As shown in fig. 6, the data flow control device 600 between page assembly described in the present embodiment
Including:Parsing module 601 and rendering module 602.Wherein, parsing module 601 can be configured
Parsed for the structure to page documents, obtain the level of nesting relation between page assembly,
Wherein, page assembly is included in data element and call back function, the level of nesting relation, subordinate
Component is nested in level assembly;Rendering module 602 may be configured to according to the above-mentioned level of nesting
Relation, is rendered according to the order from upper level assembly to sub-ordinate components to each page assembly, its
In, transmit data element and call back function to sub-ordinate components when being rendered to upper level assembly.
In the present embodiment, parsing module 601 can be solved to the structure of page documents first
Analysis, so that the level of nesting relation between obtaining page assembly, wherein, page assembly can include
Data element and call back function.In level of nesting relation, sub-ordinate components are nested in level assembly.
Here, page documents can include but is not limited to one kind in Documents:Html document,
ASP documents, JSP document etc..
In the present embodiment, rendering module 602 can then be obtained according to parsing module 601
Level of nesting relation, is carried out according to the order from upper level assembly to sub-ordinate components to each page assembly
Render.Wherein, in upper level assembly render process, sub-ordinate components can be transmitted to sub-ordinate components
The data element and call back function needed.So as to data element and call back function in page assembly
Data flow be upper level assembly to sub-ordinate components.
In some optional implementations of the present embodiment, rendering module 602 can include caching
Unit (not shown) and verification unit (not shown).Wherein:Buffer unit may be configured to
When being rendered to upper level assembly, the data type of data element in sub-ordinate components is cached;
When verification unit may be configured to render sub-ordinate components, number needed for being taken out from caching
Verified according to type, verification is by then being rendered.Alternatively, the verification bag of verification unit
Include at least one of verification to data communication protocol, the verification of data type field.
In some optional implementations of the present embodiment, rendering module 602 can also configure use
In:Data element and call back function in sub-ordinate components is delayed by way of quoting transmission
Deposit.Here, rendering module 602, can be by sub-ordinate components when being rendered to upper level assembly
Data element or call back function address (as index or pointer value) pass to sub-ordinate components,
Sub-ordinate components in read data elements or when calling call back function, can by data element or
The readjustment letter for changing to change read data element or called of the address of call back function
Number.
In some optional implementations of the present embodiment, device 600 can also include detection mould
Block (not shown) and sending module (not shown).Wherein:Detection module may be configured to inspection
Whether the document properties value for surveying each page assembly changes, wherein, document properties value includes page
The index or the value of pointer of data element or call back function in the component of face;Sending module can match somebody with somebody
Changed if put for the document properties value of any page assembly, by call back function to hair
The upper level assembly of the page assembly for changing sends the change information of the change.Now, render
Module 602 can also be configured to according to above-mentioned change information, by the page assembly changed
Upper level assembly and the page assembly that changes render again.
What deserves to be explained is, it is all described in the data flow control device 600 between page assembly
Module or unit are corresponding with each step in the method described with reference to Fig. 2.Thus, above
The data flow that the operation and feature described for method is equally applicable between page assembly controls dress
The module or unit put 600 and wherein included, will not be repeated here.
It will be understood by those skilled in the art that the data flow control device between above-mentioned page assembly
600 also include some other known features, such as processor, memory, in order to unnecessary
Ground obscures embodiment of the disclosure, and these known structures are not shown in figure 6.
Below with reference to Fig. 7, it illustrates suitable for for realize the embodiment of the present application server or
The structural representation of the computer system 700 of terminal.
As shown in fig. 7, computer system 700 includes CPU (CPU) 701, its
Can according to the program being stored in read-only storage (ROM) 702 or from storage part 708
The program that is loaded into random access storage device (RAM) 703 and perform various appropriate actions
And processing.In RAM 703, the system that is also stored with 700 operates required various program sums
According to.CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input
/ output (I/O) interface 705 is also connected to bus 704.
I/O interfaces 705 are connected to lower component:Importation 706 including keyboard, mouse etc.;
Including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.
Output par, c 707;Storage part 708 including hard disk etc.;And including such as LAN card,
The communications portion 709 of the NIC of modem etc..Communications portion 709 is via such as
The network of internet performs communication process.Driver 710 is also according to needing to be connected to I/O interfaces
705.Detachable media 711, such as disk, CD, magneto-optic disk, semiconductor memory etc.,
Be arranged on as needed on driver 710, in order to the computer program that reads from it according to
Need to be mounted into storage part 708.
Especially, according to embodiments herein, the process described above with reference to flow chart can be with
It is implemented as computer software programs.For example, embodiments herein includes a kind of computer journey
Sequence product, it includes being tangibly embodied in the computer program on machine readable media, the meter
Calculation machine program bag, which contains, is used for the program code of the method shown in execution flow chart.Implement such
In example, the computer program can be downloaded and installed by communications portion 709 from network,
And/or be mounted from detachable media 711.
Involved unit can be realized by way of software in the embodiment of the present application, also may be used
To be realized by way of hardware.Described module can also be set within a processor, example
Such as, it can be described as:A kind of processor includes parsing module and rendering module.Wherein these moulds
The title of block does not constitute the restriction to the module in itself under certain conditions, for example, packet mould
Block is also described as " being configured to parse the structure of page documents, obtaining page group
The module of level of nesting relation between part ".
As on the other hand, present invention also provides a kind of computer-readable recording medium, the meter
Calculation machine readable storage medium storing program for executing can be that the computer described in above-described embodiment included in device can
Read storage medium;Can also be individualism, without the computer-readable storage in supplying terminal
Medium.The computer-readable recording medium storage has one or more than one program, works as institute
When stating program by one or more than one computing device so that the equipment:To the page
The structure of document is parsed, and obtains the level of nesting relation between page assembly, wherein, it is described
Page assembly is included in data element and call back function, the level of nesting relation, sub-ordinate components
It is nested in level assembly;According to the level of nesting relation, according to from upper level assembly to subordinate's group
The order of part is rendered to each page assembly, wherein, to subordinate's group when being rendered to upper level assembly
Part transmits data element and call back function.
Above description is only the preferred embodiment of the application and saying to institute's application technology principle
It is bright.It will be appreciated by those skilled in the art that invention scope involved in the application, is not limited
In the technical scheme of the particular combination of above-mentioned technical characteristic, do not departed from while should cover yet
In the case of the inventive concept, it is combined by above-mentioned technical characteristic or its equivalent feature
Formed by other technical schemes.Such as features described above and (but not limited to) disclosed herein
Technical characteristic with similar functions carries out technical scheme formed by replacement mutually.
Claims (10)
1. a kind of data flow control method between page assembly, it is characterised in that methods described
Including:
Structure to page documents is parsed, and obtains the level of nesting relation between page assembly,
Wherein, the page assembly is included in data element and call back function, the level of nesting relation,
Sub-ordinate components are nested in level assembly;
According to the level of nesting relation, according to the order from upper level assembly to sub-ordinate components to each
Page assembly is rendered, wherein, transmit data element to sub-ordinate components when being rendered to upper level assembly
Element and call back function.
2. according to the method described in claim 1, it is characterised in that described according to the nesting
Hierarchical relationship, is rendered according to the order from upper level assembly to sub-ordinate components to each page assembly
Including:
When being rendered to upper level assembly, the data type of data element in sub-ordinate components is carried out
Caching;
When being rendered to sub-ordinate components, data type needed for being taken out from caching is verified,
Verification is by then being rendered.
3. method according to claim 2, it is characterised in that the verification includes logarithm
According at least one of the verification of communications protocol, the verification of data type field.
4. according to the method described in claim 1, it is characterised in that described pair of upper level assembly wash with watercolours
Transmitting data element and call back function to sub-ordinate components during dye includes:
Data element and call back function in sub-ordinate components is delayed by way of quoting transmission
Deposit.
5. according to any described method in claim 1-4, it is characterised in that methods described
Also include:
Detect whether the document properties value of each page assembly changes, wherein, the document category
Property value include page assembly in data element or call back function index or the value of pointer;
If the document properties value of any page assembly changes, by call back function to generation
The upper level assembly of the page assembly of change sends the change information of the change;
According to the change information, by the upper level assembly of the page assembly changed and become
The page assembly of change is rendered again.
6. a kind of data flow control device between page assembly, it is characterised in that described device
Including:
Parsing module, is configured to parse the structure of page documents, obtains page assembly
Between level of nesting relation, wherein, the page assembly include data element and call back function,
In the level of nesting relation, sub-ordinate components are nested in level assembly;
Rendering module, is configured to according to the level of nesting relation, according to from upper level assembly to
The order of sub-ordinate components is rendered to each page assembly, wherein, when being rendered to upper level assembly to
Sub-ordinate components transmit data element and call back function.
7. device according to claim 6, it is characterised in that the rendering module includes:
Buffer unit, when being configured to render upper level assembly, by data in sub-ordinate components
The data type of element is cached;
Verification unit, when being configured to render sub-ordinate components, needed for being taken out from caching
Data type is verified, and verification is by then being rendered.
8. device according to claim 7, it is characterised in that the verification includes logarithm
According at least one of the verification of communications protocol, the verification of data type field.
9. device according to claim 6, it is characterised in that the rendering module is also matched somebody with somebody
Putting is used for:Data element and call back function in sub-ordinate components is entered by way of quoting transmission
Row caching.
10. according to any described device in claim 6-9, it is characterised in that the dress
Putting also includes:
Detection module, is configured to detect whether the document properties value of each page assembly changes,
Wherein, the document properties value includes the index of the data element or call back function in page assembly
Or the value of pointer;
Sending module, if the document properties value for being configured to any page assembly changes,
The change of the change is sent to the upper level assembly of the page assembly changed by call back function
Information;
The rendering module, is also configured to according to the change information, by the page changed
The upper level assembly of face component and the page assembly changed are rendered again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610270495.9A CN107315646B (en) | 2016-04-27 | 2016-04-27 | Method and device for controlling data flow between page components |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610270495.9A CN107315646B (en) | 2016-04-27 | 2016-04-27 | Method and device for controlling data flow between page components |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107315646A true CN107315646A (en) | 2017-11-03 |
CN107315646B CN107315646B (en) | 2021-01-26 |
Family
ID=60185713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610270495.9A Active CN107315646B (en) | 2016-04-27 | 2016-04-27 | Method and device for controlling data flow between page components |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107315646B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108427568A (en) * | 2018-04-28 | 2018-08-21 | 北京小米移动软件有限公司 | The update method and device of user interface |
CN108495192A (en) * | 2018-03-13 | 2018-09-04 | 武汉斗鱼网络科技有限公司 | Page editing processing method and processing device |
CN109284470A (en) * | 2018-10-25 | 2019-01-29 | 天津字节跳动科技有限公司 | Page window communication means and device |
CN110471656A (en) * | 2018-05-10 | 2019-11-19 | 北京京东尚科信息技术有限公司 | The method of adjustment and device of component level |
CN110968310A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Webpage component rendering method and system |
CN111782311A (en) * | 2020-05-11 | 2020-10-16 | 完美世界(北京)软件科技发展有限公司 | Rendering method, device, equipment and readable medium |
CN112068835A (en) * | 2020-09-04 | 2020-12-11 | 中国平安财产保险股份有限公司 | Method and device for generating page on line |
CN113721908A (en) * | 2021-08-30 | 2021-11-30 | 湖南快乐阳光互动娱乐传媒有限公司 | Infinite cascade assembly rendering method and device |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7681112B1 (en) * | 2003-05-30 | 2010-03-16 | Adobe Systems Incorporated | Embedded reuse meta information |
CN101996073A (en) * | 2009-08-31 | 2011-03-30 | 阿里巴巴集团控股有限公司 | Component rendering method and device |
CN102331985A (en) * | 2010-07-12 | 2012-01-25 | 阿里巴巴集团控股有限公司 | Method and device for fragment nested caching of webpage |
CN102779164A (en) * | 2012-06-20 | 2012-11-14 | 深圳市远行科技有限公司 | Business system and rendering method of dynamic pages of same |
US8407576B1 (en) * | 2008-09-02 | 2013-03-26 | Sitscape, Inc. | Situational web-based dashboard |
CN103136201A (en) * | 2011-11-22 | 2013-06-05 | 阿里巴巴集团控股有限公司 | Page information display method and page information display device |
CN103546476A (en) * | 2013-10-30 | 2014-01-29 | 北京华胜天成科技股份有限公司 | Transmission method and system for information between page assemblies |
CN103955364A (en) * | 2014-04-15 | 2014-07-30 | 南威软件股份有限公司 | Front end assembly method suitable for mobile phone |
US8893014B1 (en) * | 2012-06-28 | 2014-11-18 | Google Inc. | Deferred loading of a web page |
CN104573066A (en) * | 2015-01-26 | 2015-04-29 | 中国工商银行股份有限公司 | Page reusing method and page reusing device |
CN104714980A (en) * | 2013-12-17 | 2015-06-17 | 阿里巴巴集团控股有限公司 | Page nesting path determination method and device |
US20150199080A1 (en) * | 2010-05-20 | 2015-07-16 | Salesforce.Com, Inc. | Methods and systems for providing a user interface |
CN104866534A (en) * | 2015-04-28 | 2015-08-26 | 北京奇虎科技有限公司 | Page demonstration method and device |
CN105095445A (en) * | 2015-07-24 | 2015-11-25 | 北京奇虎科技有限公司 | Page generation method and system |
CN105183760A (en) * | 2015-07-24 | 2015-12-23 | 北京奇虎科技有限公司 | Webpage component loading method and apparatus |
CN105354013A (en) * | 2014-08-18 | 2016-02-24 | 阿里巴巴集团控股有限公司 | Application interface rendering method and apparatus |
-
2016
- 2016-04-27 CN CN201610270495.9A patent/CN107315646B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7681112B1 (en) * | 2003-05-30 | 2010-03-16 | Adobe Systems Incorporated | Embedded reuse meta information |
US8407576B1 (en) * | 2008-09-02 | 2013-03-26 | Sitscape, Inc. | Situational web-based dashboard |
CN101996073A (en) * | 2009-08-31 | 2011-03-30 | 阿里巴巴集团控股有限公司 | Component rendering method and device |
US20150199080A1 (en) * | 2010-05-20 | 2015-07-16 | Salesforce.Com, Inc. | Methods and systems for providing a user interface |
CN102331985A (en) * | 2010-07-12 | 2012-01-25 | 阿里巴巴集团控股有限公司 | Method and device for fragment nested caching of webpage |
CN103136201A (en) * | 2011-11-22 | 2013-06-05 | 阿里巴巴集团控股有限公司 | Page information display method and page information display device |
CN102779164A (en) * | 2012-06-20 | 2012-11-14 | 深圳市远行科技有限公司 | Business system and rendering method of dynamic pages of same |
US8893014B1 (en) * | 2012-06-28 | 2014-11-18 | Google Inc. | Deferred loading of a web page |
CN103546476A (en) * | 2013-10-30 | 2014-01-29 | 北京华胜天成科技股份有限公司 | Transmission method and system for information between page assemblies |
CN104714980A (en) * | 2013-12-17 | 2015-06-17 | 阿里巴巴集团控股有限公司 | Page nesting path determination method and device |
CN103955364A (en) * | 2014-04-15 | 2014-07-30 | 南威软件股份有限公司 | Front end assembly method suitable for mobile phone |
CN105354013A (en) * | 2014-08-18 | 2016-02-24 | 阿里巴巴集团控股有限公司 | Application interface rendering method and apparatus |
CN104573066A (en) * | 2015-01-26 | 2015-04-29 | 中国工商银行股份有限公司 | Page reusing method and page reusing device |
CN104866534A (en) * | 2015-04-28 | 2015-08-26 | 北京奇虎科技有限公司 | Page demonstration method and device |
CN105095445A (en) * | 2015-07-24 | 2015-11-25 | 北京奇虎科技有限公司 | Page generation method and system |
CN105183760A (en) * | 2015-07-24 | 2015-12-23 | 北京奇虎科技有限公司 | Webpage component loading method and apparatus |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108495192A (en) * | 2018-03-13 | 2018-09-04 | 武汉斗鱼网络科技有限公司 | Page editing processing method and processing device |
CN108495192B (en) * | 2018-03-13 | 2021-04-23 | 武汉斗鱼网络科技有限公司 | Page editing processing method and device |
CN108427568A (en) * | 2018-04-28 | 2018-08-21 | 北京小米移动软件有限公司 | The update method and device of user interface |
CN108427568B (en) * | 2018-04-28 | 2021-04-27 | 北京小米移动软件有限公司 | User interface updating method and device |
CN110471656A (en) * | 2018-05-10 | 2019-11-19 | 北京京东尚科信息技术有限公司 | The method of adjustment and device of component level |
CN110968310A (en) * | 2018-09-30 | 2020-04-07 | 北京国双科技有限公司 | Webpage component rendering method and system |
CN109284470A (en) * | 2018-10-25 | 2019-01-29 | 天津字节跳动科技有限公司 | Page window communication means and device |
CN109284470B (en) * | 2018-10-25 | 2020-12-04 | 天津字节跳动科技有限公司 | Page window communication method and device |
CN111782311A (en) * | 2020-05-11 | 2020-10-16 | 完美世界(北京)软件科技发展有限公司 | Rendering method, device, equipment and readable medium |
CN112068835A (en) * | 2020-09-04 | 2020-12-11 | 中国平安财产保险股份有限公司 | Method and device for generating page on line |
CN113721908A (en) * | 2021-08-30 | 2021-11-30 | 湖南快乐阳光互动娱乐传媒有限公司 | Infinite cascade assembly rendering method and device |
CN113721908B (en) * | 2021-08-30 | 2024-03-22 | 湖南快乐阳光互动娱乐传媒有限公司 | Unlimited cascade component rendering method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107315646B (en) | 2021-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107315646A (en) | Data flow control method and device between page assembly | |
CN104461491B (en) | The operation method and system of a kind of Hybrid components | |
US20170154013A9 (en) | Ad blocking page display method and device | |
CN103365907B (en) | Display pays method, system and the server of the page | |
CN109683998A (en) | Internationalize implementation method, device and system | |
CN107066609A (en) | Image display method and device | |
CN105718559B (en) | Search forms pages and the method and apparatus of target pages transforming relationship | |
CN103605502B (en) | Form page display method and server | |
CN107295095A (en) | The method and apparatus for pushing and showing advertisement | |
CN103336794B (en) | For providing the corresponding method and apparatus that information is presented in target pages | |
CN107908695A (en) | Operation system operation method, device, system and readable storage medium storing program for executing | |
KR20130126610A (en) | Identifiers for style sheets | |
CN106503111B (en) | Webpage code-transferring method, device and client terminal | |
CN111782216A (en) | Page generation method, server and storage medium | |
CN108366058A (en) | Method, apparatus, equipment and the storage medium for preventing advertisement operators flow from kidnapping | |
CN107506501A (en) | The methods of exhibiting and device of search result | |
CN110022354A (en) | Mobile application integrated approach, device, computer equipment and storage medium based on http protocol | |
CN109635223A (en) | Page display method and device | |
CN107958009A (en) | Company information acquisition methods, device and equipment | |
CN110221871A (en) | Webpage acquisition methods, device, computer equipment and storage medium | |
CN113467775A (en) | Method and device for generating page | |
CN106649299A (en) | Method and device for lazy loading of webpage block | |
US20240061565A1 (en) | Method and apparatus for generating image processing interface, device, and storage medium | |
CN107818171A (en) | A kind of page loading method and system based on iframe | |
Rukzio et al. | Automatic form filling on mobile devices |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |