Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is implemented
The component of example can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed
The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiments of the present invention, this field is common
Technical staff's every other embodiment obtained without making creative work belongs to the model that the present invention protects
It encloses.
Referring to Fig. 1, being a kind of client 100 provided in an embodiment of the present invention and the progress communication interaction of server 200
Schematic diagram.The server 200 can be communicated by network with the client 100, to realize data transmission or interaction.Institute
At least one peace suitable for the application program (Application, APP) of various operating systems can be provided by stating server 200
Dress packet is downloaded for the client 100.The application program may be, but not limited to, all kinds of novel readers, browser or purchase
Object APP etc..It, can be by the network from server after the client 100 accesses the server 200 by the network
After the installation kit for the application program that 200 downloadings are suitable for itself operating system, the application program is installed to the client
In end 100.
In the present embodiment, the client 100 can be smart phone, PC, tablet computer, individual digital and help
Reason, mobile internet surfing equipment etc., but not limited to this.The server 200 can be network server, ftp server
(ftp server) etc., but not limited to this.The network can be cable network or wireless network.The operation of the client 100
System can be, Android (Android) system, IOS (iPhone operating system) system, Windows phone system
System, Windows system etc., but not limited to this.
Referring to Fig. 2, being the block diagram of the client 100 provided in an embodiment of the present invention.The client 100
Including first page element linkage 110, first memory 120, first processor 130, the first communication unit 140, display
Unit 150.
The first memory 120, first processor 130, the first communication unit 140 and each element of display unit 150
It is directly or indirectly electrically connected between each other, to realize the transmission or interaction of data.The first page element linkage
110 include that at least one can be stored in the first memory 120 in the form of software or firmware or be solidificated in the client
Software function module in the operating system at end 100.The first processor 130 is for executing in the first memory 120
The executable module of storage, such as software function module and computer program included by first page element linkage 110
Deng.
The first memory 120 for storing program, hold after receiving and executing instruction by the first processor 130
Row described program.First communication unit 140 is used to establish the server 200 and the client 100 by the network
Between communication connection, and for passing through the network sending and receiving data.
The display unit 150 provides an interactive interface (such as user's operation between the client 100 and user
Interface) or for showing that image, text and data is referred to user.In the present embodiment, the display unit can be liquid crystal display or
Touch control display.It can be the capacitance type touch control screen or resistance-type of support single-point and multi-point touch operation if touch control display
Touch screen etc..
Referring to Fig. 3, being a kind of block diagram of server 200 provided in an embodiment of the present invention.The server 200
Including second page element linkage 210, second memory 220, second processor 230 and the second communication unit 240.
The second memory 220, second processor 230 and each element of the second communication unit 240 are direct between each other
Or be electrically connected indirectly, to realize the transmission or interaction of data.The second page element linkage 210 includes at least one
A operation system that the server 200 can be stored in the second memory 220 or be solidificated in the form of software or firmware
Software function module in system.The second processor 230 is for executing the executable mould stored in the second memory 220
Block, such as software function module and computer program etc. included by second page element linkage 210.
The second memory 220 for storing program, hold after receiving and executing instruction by the second processor 230
Row described program.Second communication unit 240 is used to establish the client 100 and the server 200 by the network
Between communication connection, and for passing through the network sending and receiving data.
Referring to Fig. 4, being a kind of flow chart of page elements interlock method provided in an embodiment of the present invention.In the present embodiment
Method be suitable for the client 100.It should be noted that this method is not limitation with Fig. 4 and following specific orders.Under
Each step shown in Fig. 4 will be described in detail in face.
Multiple page elements are stored in a data capsule by step S101.
In the present embodiment, the data capsule can with the container or unit for storing data that is interpreted as of broad sense,
Such as List container, Vector container, database etc..
As an implementation, it is stored in multiple page elements of same data capsule, at least partly page elements
Between there are direct or indirect interaction relations.For example, page elements A, B, C, E and F are stored in same data capsule, wherein page
Surface element A and B links, and page elements B links with C again, page elements E and F linkage.In this example, for above-mentioned A and B, B with
C, the linkage between E and F is properly termed as directly linking, and the linkage between A and C is then properly termed as linking indirectly.
It is appreciated that step S101 is dispensed in other embodiments, i.e., multiple page elements are stored in
One data capsule can be the operation being previously-completed.
Whether step S103, detecting in the data capsule has the element data of arbitrary target page elements to change.
If so, then executing following step S105, otherwise terminate this process.
In the present embodiment, as an example, above-mentioned page elements A, B, C, E and F are stored in the data capsule.Its
In, page elements A indicates " novel types ", and page elements B indicates " author ", and page elements C indicates " novel name ", page elements
E indicates " price ", and page elements F indicates " publishing house ".
Whether the corresponding element data of page elements in 100 detecting real-time of the client data capsule is become
Change.For example, the element data of the page elements A previous moment is " magical ", and the element data at current time is " swordsman ",
It then can determine that page elements A is changed.
Step S105 sends linkage to server 200 and updates request, and it includes the page object face element in request which, which updates,
Element data after element and its variation.
In the present embodiment, when the element data for detecting target pages element changes, the client 100
Corresponding linkage is generated according to the page elements and its element data of variation and updates request, and sends this request to server 200.
For example, the client 100 will after it is " swordsman " that the element data of above-mentioned page elements A is by " magical " variation
It is sent according to the corresponding linkage update request Concurrency that generates of the element data " swordsman " after page elements A and its variation to server 200,
So that server 200 is according to the request returning response data.
Step S107 receives the server 200 according to the linkage and updates the response data that request returns.
As an implementation, exist including at least one with the target pages element in the response data and link
Other page elements and its corresponding element data of relationship.Wherein, the interaction relation include above-mentioned direct linkage and
Connect linkage.For example, the page directly to link therewith can be included at least in the response data when page elements A changes
Element data after element B and its corresponding variation.Further, as an example, it is assumed that the element data of page elements A
It is " swordsman " by " magical " variation, then the element data of page elements B can be changed by " Chen Dong, misty rain Jiangnan ... " as " gold
Mediocre, Cologne ... ".
It as another embodiment, include that all and target pages element has linkage pass in the response data
Other page elements and its corresponding element data of system.For example, when page elements A changes, it can in the response data
To include at least the element data after the page elements B directly to link therewith and its corresponding variation, and link indirectly therewith
Element data after page elements C and its corresponding variation.Further, as an example, it is assumed that the element of page elements A
Data are " swordsman " by " magical " variation, then the element data of page elements B can be changed by " Chen Dong, misty rain Jiangnan ... "
For " Jin Yong, Cologne ... ", the element data of page elements C can by "《The perfect world》,《Long night king》... ", which changes, is
"《Hero Shooting Vulture》,《Xiao Li's fly cutter》……".
It is re-used as another embodiment, includes removing the target pages in the data capsule in the response data
Every other page elements and the corresponding element data of every other page elements outside element.Such as the example above
Data capsule in include page elements A, B, C, E and F, it is assumed that the element data of page elements A is changed, then the clothes
It is engaged in including page elements B, C, E and F and corresponding element data in the response data that device 200 returns.It is appreciated that
Interaction relation is not present between page elements E and F and page elements A, so the element data of E and F are logical when A generates variation
Chang Buhui links variation therewith, thus the element data for the two page elements for including in the response data may to be empty or
Person is identical as the element data of E and F on current page.
Certainly, all page elements and its corresponding member in the data capsule also be may include in the response data
Prime number evidence.Still taking the above example as an example, that is to say, that when the element data of page elements A changes, the server
It include page elements A, B, C, E and F and corresponding element data in 200 response datas returned.It is appreciated that institute
The element data for stating page elements A in response data should be " swordsman ".
Optionally, each page elements and its element data for including in the response data that the server 200 returns are with key
Value pair form sequential storage in an array, such as:
Wherein, A=>The element data of data_a representation page elements A is a, remaining is similarly repeated no more.
Assuming that the response data that server 200 returns is as above after the element data of page elements A is above-mentioned a by a' variation
It is shown, it can be seen that page elements B linkage is updated to b, and page elements C, which links, is updated to c, and what page elements E and F were returned
Data are empty (showing that element data does not change).
Step S109 holds the data that correspond on the page shown by client 100 according to the response data
The element data of other page elements of at least one of device is updated.
In this present embodiment, the mode being updated to the element data on the page can be, for the response data
In include each page elements, detect respectively the page elements element data whether be it is empty, if non-empty, according to the non-empty
Element data the element data of the page elements on the page is updated, if it is empty, then do not change the page
On the page elements element data.
Page elements interlock method provided in this embodiment, client 100 do not need to be concerned about that the linkage of each page elements is patrolled
Volume, as long as whether thering is the element data of target pages element to change in detecting data container.If so, then transmission includes
The linkage of element data after the target pages element and its variation updates request to server 200, to obtain from server 200
The corresponding response data.Compared with prior art, the update that this linkage updates processing mode is more efficient, can be primary
Property obtain it is all there are the more new datas of other page elements in the data capsule of interaction relation with target pages element, or
Person directly acquires the element data of the every other page elements in the data capsule, regardless of whether with the target pages element
There are interaction relations.That is, even if linkage logic is complicated again, client 100 is without repeated multiple times to server 200
Request data.Moreover, the front-end configuration of the page can realize universality, when increasing or deleting interaction relation without to front end page
Code and logic are modified, it is only necessary to carry out the logic Modification of adaptability in server 200.
Referring to Fig. 5, being that the functional module of the first page element linkage 110 provided in an embodiment of the present invention is shown
It is intended to.The first page element linkage 110 include page elements memory module 1102, update request sending module 1104,
Response data receiving module 1106, element data update module 1108.
The page elements memory module 1102, for multiple page elements to be stored in a data capsule.About
The concrete operation method of page elements memory module 1102 is referred to the detailed description of above-mentioned step S101 shown in Fig. 4,
This is repeated no more.
The update request sending module 1104 has arbitrary target page elements for working as to detect in the data capsule
Element data when changing, send linkage to server 200 and update request, it includes the page object in request which, which updates,
Element data after surface element and its variation.It is referred to about the concrete operation method for updating request sending module 1104 above-mentioned
The detailed description of step S103 and S105 shown in Fig. 4, details are not described herein.
The response data receiving module 1106 is returned for receiving the server 200 according to linkage update request
The response data returned.Concrete operation method about response data receiving module 1106 is referred to above-mentioned step shown in Fig. 4
The detailed description of S107, details are not described herein.
The element data update module 1108, for according to the response data to user terminal shown by the page
The element data for corresponding at least one of the data capsule other page elements be updated.More about element data
The concrete operation method of new module 1108 is referred to the detailed description of above-mentioned step S109 shown in Fig. 4, and details are not described herein.
Referring to Fig. 6, being the flow chart of another page elements interlock method provided in an embodiment of the present invention.This method is answered
For the server 200.Step shown in Fig. 6 is described in detail below.
Step S201 receives the linkage that client 100 is sent and updates request.
In the present embodiment, as an implementation, multiple page elements are stored in a data by the client 100
In container.Then, the element data of arbitrary target page elements whether changes in data capsule described in detecting real-time.When
When detecting the element data of target pages element and changing, then generates the linkage and update request, linkage update is asked
It asks including the element data after the target pages element and its variation.
Step S203 updates request returning response data to the client 100, so that the client according to the linkage
End 100 is updated the element data on the page shown by client 100 according to the response data, the element being updated
Data correspond to other page elements of at least one of described data capsule in addition to the target pages element.
It as an implementation, include removing the target pages element in the data capsule in the response data
Outer every other page elements and the corresponding element data of every other page elements.
Further, after can also including the changed target pages element in the response data and its changing
Element data.
As another embodiment, exist including at least one with the target pages element in the response data and join
Other page elements and its corresponding element data of dynamic relationship.Wherein, the interaction relation includes directly linkage and joins indirectly
It is dynamic.
Further, may include in the response data it is all with the target pages element there are interaction relation its
His page elements and its corresponding element data.
As an implementation, each page elements and its element data for including in the response data are with key-value pair
Form sequential storage is in an array.
In addition, in this present embodiment, the client 100 carries out the element data on the page according to the response data
The mode of update can be, and for each page elements for including in the response data, detect the member of the page elements respectively
Whether prime number is according to being sky, if non-empty, according to the element data of the non-empty to first prime number of the page elements on the page
According to being updated, if it is empty, then the element data of the page elements on the page is not changed.
In the present embodiment, the further details of operating method of each step is referred in embodiment of the method shown in Fig. 4
Corresponding content.
In the present embodiment, when interaction relation changes, such as increase or delete some page in the data capsule
Surface element, or new linkage logic etc. is added between two page elements that interaction relation is not present before, it is only necessary to it is right
Linkage logic in server 200 is modified, and without changing the front-end code and logic of client 100, can so be made
The configuration of front end page has more universality.
In addition, the server 200 can update request for page every other in the data capsule according to the linkage
Surface element and its corresponding element data return to client 100 together, or by the data capsule it is all with become
There are the page elements of interaction relation and its element data to return to client 100 together for the target pages element of change, in this way may be used
Efficiency is updated to promote the linkage of client 100, user experience is promoted, also avoids server 200 and be accessed frequently occupancy
Drawback.
Referring to Fig. 7, being the functional module frame of the second page element linkage 210 provided in an embodiment of the present invention
Figure.The second page element linkage 210 includes updating request receiving module 2102, updating ask respond module 2104.
The update request receiving module 2102, the linkage for receiving the transmission of client 100 update request, wherein institute
It states client 100 multiple page elements are stored in a data capsule, has any mesh in the data capsule when detecting
When the element data of mark page elements changes, generates the linkage and update request, it includes the mesh in request which, which updates,
Element data after marking page elements and its variation.Concrete operation method about the update request receiving module 2102 can refer to
The above-mentioned detailed description to step S201 shown in Fig. 6.
The update ask respond module 2104, for updating request returning response data to the visitor according to the linkage
Family end 100 so that the client 100 according to the response data to user terminal shown by element data on the page into
Row updates, and the element data being updated corresponds to its in addition to the target pages element of at least one of described data capsule
His page elements.Concrete operation method about the update request receiving module 2102 can refer to above-mentioned to step shown in Fig. 6
The detailed description of S203.
Above each module can be by software code realization, at this point, above-mentioned each module can be stored in the storage of server
In device.Above each module can equally be realized by hardware such as IC chip.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight
Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code
Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held
Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement
The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes
It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart
The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement
It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.
It should be noted that:Similar label and letter indicate similar terms in drawings above, therefore, once in a certain Xiang Yi attached drawing
It is defined, does not then need that it is further defined and explained in subsequent attached drawing.