CN109408191A - Method for updating pages, device, equipment and storage medium - Google Patents

Method for updating pages, device, equipment and storage medium Download PDF

Info

Publication number
CN109408191A
CN109408191A CN201811311475.7A CN201811311475A CN109408191A CN 109408191 A CN109408191 A CN 109408191A CN 201811311475 A CN201811311475 A CN 201811311475A CN 109408191 A CN109408191 A CN 109408191A
Authority
CN
China
Prior art keywords
new data
target layout
target
module
page
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
CN201811311475.7A
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.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software Technology 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 Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN201811311475.7A priority Critical patent/CN109408191A/en
Publication of CN109408191A publication Critical patent/CN109408191A/en
Pending legal-status Critical Current

Links

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
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

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

Abstract

The invention discloses a kind of method for updating pages, device, equipment and storage mediums, if including: to detect that the static loading page is loaded with new data, new data is then passed to the target layout container of corresponding binding on the page, determine the target layout module in target layout container, new data is passed into target layout module, and update new data onto target layout module, renewal of the page is carried out by target layout module.The renewal of the page scheme provided in the embodiment of the present invention is solved when the static loading page loads new data, it needs all to remove all views in the static loading page and add again, caused performance loss, and caused by memory and cpu resource excess waste the problem of.

Description

Method for updating pages, device, equipment and storage medium
Technical field
The present embodiments relate to technical field of internet application more particularly to a kind of method for updating pages, device, equipment And storage medium.
Background technique
Module loading mode in APP (Application, application program) on the page may include static loading and dynamic Load.Under normal circumstances, for the not recoverable module on the page in APP, for example, GridLayout and LinearLayout, The mode for generalling use static loading carries out the page and draws displaying.Wherein, static loading refers to from the creation page to the destruction page During, the view View of module has and only draws primary, so that it may complete the displaying of the page.
In the implementation of the present invention, at least there are the following problems in the prior art for inventor's discovery:
For GridLayout and LinearLayout etc. not recoverable module, it is often necessary to according to different situations The different data of Dynamic Display, so that there are the same not recoverable modules to be repeated several times all views under not recoverable module Scheme View all to remove, and repaint out new view View according to new data, and then repeats to draw the multiple page Situation.And repeated all view View under not recoverable module all remove and add again, will cause Performance loss, and cause the excess waste of memory and cpu resource.
Summary of the invention
In view of the above problems, one kind is provided in embodiments of the present invention to overcome the above problem or at least be partially solved A kind of method for updating pages, device, equipment and the storage medium of the above problem reduce local page in renewal of the page to realize Redraw number.
In a first aspect, providing a kind of method for updating pages in the embodiment of the present invention, comprising:
If detecting, the static loading page is loaded with new data, and the new data is passed on the page corresponding binding Target layout container;
It determines the target layout module in the target layout container, the new data is passed into the target layout mould Block, and the new data is updated onto the target layout module, renewal of the page is carried out by the target layout module.
Second aspect additionally provides a kind of renewal of the page device in the embodiment of the present invention, comprising:
Data afferent module, if being passed to the new data for detecting that the static loading page is loaded with new data The target layout container of corresponding binding on the page;
Renewal of the page module passes the new data for determining the target layout module in the target layout container The target layout module is passed, and the new data is updated onto the target layout module, by the target layout mould Block carries out renewal of the page.
The third aspect additionally provides a kind of equipment in the embodiment of the present invention, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes method for updating pages as described in the above embodiment the present invention.
Fourth aspect additionally provides a kind of computer readable storage medium in the embodiment of the present invention, is stored thereon with calculating Machine program, the program realize method for updating pages as described in the above embodiment the present invention when being executed by processor.
The renewal of the page scheme provided in the embodiment of the present invention, comprising: the static loading page is loaded with new number if detecting According to new data to be then passed on the page to the target layout container of corresponding binding, determines the target layout mould in target layout container New data is passed to target layout module, and new data is updated onto target layout module by block, by target layout module into Row renewal of the page.The renewal of the page scheme provided in the embodiment of the present invention is solved when the static loading page loads new data, It needs all to remove all views in the static loading page and add again, caused performance loss, and caused by The problem of excess waste of memory and cpu resource.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the method for updating pages provided in the embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of the renewal of the page device provided in the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of the equipment provided in the embodiment of the present invention.
Specific embodiment
The exemplary embodiment that the present invention will be described in more detail below with reference to accompanying drawings, although showing the present invention in attached drawing Exemplary embodiment, however it will be appreciated that be, exemplary embodiment described herein is used only for explaining the present invention, rather than Limitation of the invention.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention by the present invention, and can The scope of the present invention is fully disclosed to those skilled in the art.In addition, it should also be noted that, for ease of description, Only the parts related to the present invention are shown in attached drawing rather than entire infrastructure.
Fig. 1 is a kind of flow diagram of the method for updating pages provided in the embodiment of the present invention, and the present embodiment is applicable In be updated to page data the case where, for example, being needed for carrying out the page of data load using static loading mode Will to the page data of the static loading page carry out dynamic update scene, be suitable for all LinerLayout and The layout of GridLayout creation.This method can be executed by renewal of the page device, which can be using software and/or hard The mode of part realizes, and integrates in what equipment with network communicating function in office, such as is integrated with the electronics of Android system and sets It is standby.
As shown in Figure 1, the method for updating pages of the embodiment of the present invention may include:
If S101, detecting that the static loading page is loaded with new data, new data is passed to corresponding binding on the page Target layout container.
In embodiments of the present invention, the method for updating pages of the present embodiment can be realized by the personal device of user, example Such as, personal device also can include but is not limited to tablet computer and smart phone etc.;It can also be realized by the network equipment, example Such as, the network equipment can include but is not limited to one or more servers.It is understood that the personal device in the present embodiment It is only a kind of optional example with the network equipment, the method for updating pages of the present embodiment can also be any with network by other The equipment of communication function is realized.
In embodiments of the present invention, the static loading page can refer to the page drawn by using the mode of static loading Face.Wherein, static loading can be understood as having from the creation page to the view View destroyed during the page on the page and only It draws once, just completes page presentation function.It is can wrap on the static loading page containing one or more layout containers, for example, Layout container can be the cloth such as layout container, such as GridLayout and LinearLayout in APP on the static loading page Office's container.Wherein, the number amount and type of layout container can be according to each section that will be shown on the page on the static loading page Content and the quantity of each section be determined.Optionally, for each layout container on the static loading page, for example, GridLayout and LinearLayout, can be according to the size for the dimensional parameters setting layout container that user inputs.
In embodiments of the present invention, if the static loading page is wanted to show different data according to different situations, just The data for destroying, and update displaying as needed original static loading page are needed to re-create new static loading The page, whole process are necessarily required to carry out multiplicating drafting to the static loading page according to different situations.Even if only updating quiet Data in state loading page in some layout container, such as the data in GridLayout, it is also desirable to by static loading page Face is all destroyed, and the static loading page that the data creation updated as needed is new.It is repeated several times and draws to a certain extent The page will cause the loss of cpu performance, and waste memory and waste cpu resource.In addition, when repeating to draw the page, it can be bright It is aobvious to see the static loading page all removal and the newly added process of weight, cause the page to flash, influences user experience.
In view of defect caused by above-mentioned conventional method, in the scheme of the present embodiment, detecting that the static loading page need to When loading new data, whole destructions no longer are carried out to the static loading page and are re-created, but new data is incoming static In loading page in the target layout container of corresponding binding.That is, being related to when static loading page load new data quiet Which of state loading page layout container, the layout container being just involved in is as target layout container, and by new data Incoming target layout container.In this case the new data for needing dynamic to update in the static loading page can be directly passed to Target layout container on the static loading page, and there is no need to again for other layout containers on the static loading page It destroys.
In embodiments of the present invention, it can be set between each layout container on the static loading page self-existent Structural region.When the static loading page loads multiple new datas, multiple new datas can be related on the static loading page Multiple layout containers, at this point it is possible to multiple layout containers that multiple new datas are related to are as target layout container, and Multiple new datas are respectively transmitted to corresponding by the identification information for the layout container bound when inputting multiple new datas according to user Target layout container, to realize the operation that new data is passed to the target layout container of corresponding binding on the page.Also, it will be each A layout container, which is independently arranged, to be advantageous in that: once need the creation on the static loading page to add new layout container, then Existing qualified layout container on the static loading page can be directly multiplexed.
S102, it determines target layout module in target layout container, new data is passed into target layout module, and will New data is updated onto target layout module, carries out renewal of the page by target layout module.
In embodiments of the present invention, it can wrap in target layout container containing a multiple layout modules, each layout Module can be used for carrying the data of Corresponding matching.New data is being corresponded to each layout mould being added in target layout container It, can be according to the corresponding view View of data displaying target layout container of each layout modules carrying after block.But, it is contemplated that After new data is passed to target layout container, the layout modules for including in target layout container may be unable to satisfy of new data With requirement, for example, the quantity of layout modules is possibly more than the quantity of new data or less than new data in target layout container Quantity, to will appear display mistake in the corresponding view View of displaying target layout container.For this purpose, being passed to by new data When target layout container on the page, renewal of the page device can determine the target layout module in target layout container, so as to Target layout module can correspond to the incoming new data of carrying.Then, new data is passed to by target by target layout container In target layout module in layout container, new data dynamic is updated and arrives target layout module, is realized by target layout mould Block carries out renewal of the page.
In a kind of optional embodiment of the embodiment of the present invention, the target layout module in target layout container is determined, May include:
S1021, the quantity for having legacy data in target layout container is determined;
S1022, the foundation quantity of new data and the quantity of legacy data, determine in target layout container for carrying new data Target layout module number;
S1023, according to target layout module number, determine target layout module.
In the present embodiment, it has had been friends in the past in already present layout modules and target layout container in target layout container number It is that one-to-one correspondence is matched between, after determining the quantity of existing layout modules in target layout container, so that it may really It sets the goal and has the quantity of legacy data in layout container.In the target layout container that new data is passed to corresponding binding on the page Afterwards, the target layout module in target layout container can be used for carrying the new data of incoming target layout container.Wherein, target For carrying the new data Corresponding matching of the layout modules needs and incoming target layout container of new data, ability in layout container All new datas can be carried in layout modules by guarantee.It optionally, can be according to the new number of incoming target layout container According to quantity and target layout container in existing legacy data quantity, to determine in target layout container for carrying new data Layout modules quantity, that is, determine target layout module quantity.In turn, according to target layout module number, mesh can be determined For carrying the target layout module of new data in mark layout container.
In a kind of optional embodiment of the embodiment of the present invention, according to the quantity of new data and the quantity of legacy data, really It sets the goal in layout container for carrying the target layout module number of new data, may include:
If the quantity of new data is greater than the quantity of legacy data, target is held according to the difference between new data and legacy data The quantity for the layout modules for including in device is increased, so that the quantity of the layout modules in target layout container and new data Quantity is consistent;
If the quantity of new data is less than the quantity of legacy data, target is held according to the difference between new data and legacy data The quantity for the layout modules for including in device is deleted, so that the quantity of the layout modules in target layout container and new data Quantity is consistent.
In the present embodiment, if the quantity of new data is equal to the quantity of legacy data, show the cloth in target layout container The quantity of office's module is equal to the quantity of new data, and the quantity of layout modules just meets new data biography in target layout container at this time Required quantitative requirement is passed, it, can be direct without carrying out any processing to the layout modules in target layout container Using the quantity of layout modules in target container as the quantity of the target layout module of subsequent carrying new data.If the number of new data Amount is greater than the quantity of legacy data, shows that the quantity of the layout modules in target layout container is less than the quantity of new data, thus nothing Whole new datas is passed to target layout module by method, needs to increase new layout modules in target layout container thus, And the quantity of layout modules in the target layout container after new layout modules will be added as the target of subsequent carrying new data The quantity of layout modules.The difference between legacy data can be specifically subtracted according to new data, newly increased in target layout container The layout modules of difference quantities, so that the quantity of the layout modules in target layout container is identical as the quantity of new data, so as to It is subsequent that whole new data correspondences is passed into each target layout module.If the quantity of new data is less than the quantity of legacy data, Show the quantity of the extra new data of the quantity of the layout modules in target layout container, to can exist in target layout container A plurality of layout modules, need to delete thus layout modules in target layout container, and will delete the mesh after layout modules Mark quantity of the quantity of layout modules in layout container as the subsequent target layout module for carrying new data.It specifically can foundation Legacy data subtracts the difference between new data, the layout modules of difference quantities is deleted in target layout container, so that target cloth The quantity of layout modules in office's container is identical as the quantity of new data, passes to whole new data tool correspondences so as to subsequent Each target layout module.This have the advantage that can be according to the quantity variance of new legacy data, in target layout container Dynamic adds and reduces layout modules, both not no all deleting the page simply, and all re-create, also not simply Layout container on the static loading page is deleted and re-created, only in each layout modules in target layout container Data updated, and then complete the static loading page data dynamic updating process, to reduce local page Redraw number.
Optionally, it according to the quantity of new data and the quantity of legacy data, determines in target layout container for carrying new number According to target layout module number, may include:
The quantity for calculating new data subtracts the difference between the quantity of legacy data;If the quantity of new data and the number of legacy data Difference between amount is greater than or equal to zero, then the layout modules of difference quantities are added in target layout container, and will add cloth All layout modules are as target layout module in target layout container after office's module;If the quantity and legacy data of new data Quantity between difference less than zero, then in target layout container delete difference quantities layout modules, and by delete be laid out All layout modules are as target layout module in target layout container after module.
It is understood that when increasing new layout modules in target layout container, it can be according to target layout container In already present each layout modules position Rankine-Hugoniot relations, new layout modules are successively added behind each layout modules, Corresponding position is still maintained to guarantee to add each layout modules in the target layout container after new layout modules Rankine-Hugoniot relations.It, can be according to each cloth already present in target layout container when deleting layout modules in target layout container The position Rankine-Hugoniot relations of office's module, is successively deleted since the last one layout modules of each layout modules according to inverted order direction Layout modules, to guarantee that each layout modules in the target layout container after deletion layout modules still maintain corresponding Position Rankine-Hugoniot relations.
In a kind of optional embodiment of the embodiment of the present invention, new data is updated in target layout module, it can be with Include:
It, will according to the position Rankine-Hugoniot relations of target layout module in the position Rankine-Hugoniot relations and target layout container of new data New data is updated onto target layout module.
In the present embodiment, can be passed to target layout container new data may include: " main title title ", It is illustrated for " subtitle title " and " detailed content ", if it is desired to new data be passed into target layout and held Target layout module in device, it is necessary to setting and " main title title ", " subtitle name in new data in target layout container Each target layout module of title " and " detailed content " Corresponding matching, so just can be by " main title title ", " subtitle Title " and " detailed content " pass to each target layout module, so as to update each subdata in new data Onto each target layout module, the corresponding view View of the target layout container is formed.In addition, in order to which guarantee will be in new data Each subdata matching be transmitted in each target layout module, can be according to the position Rankine-Hugoniot relations and target cloth of new data The position Rankine-Hugoniot relations of target layout module, new data is updated onto target layout module in office's container.
It optionally, specifically can be with for a kind of optional program code is additionally provided in method for updating pages the present embodiment Are as follows:
/**
* base class Layout is laid out Adapter
* GridLayout, LinearLayout are used in
*/
public abstract class BaseLayoutAdapter<T>{
private BaseActivity context;
private ViewGroup mVpRoot;
private List<T>mItems;
public BaseLayoutAdapter(BaseActivity context,ViewGroup mVpRoot){
This.context=context;
This.mVpRoot=mVpRoot;
}
public void setItems(List<T>items){
If (items==null)
return;
}
If (mVpRoot==null)
return;
}
If (context==null)
return;
}
This.mItems=items;
Int newCnt=items.size ();
Int oldCnt=mVpRoot.getChildCount ();
Int delta=newCnt-oldCnt;
if(delta>0){
For (int i=0;i<delta;i++){
mVpRoot.addView(getItemView(context,mVpRoot));}
}else if(delta<0){
For (int i=oldCnt-1;I >=newCnt;i--){
mVpRoot.removeViewAt(i);
}
}
For (int i=0;i<items.size();i++){
convert(i,mVpRoot,mItems);
}
}
/**
* single view is obtained
*@param context environmental variance
* the root@param mVpRoot office
*@return returns to the view generated
*/
public abstract View getItemView(Context context,ViewGroup mVpRoot);
/**
* data are parsed and are rendered
*@param position current position
* the root@param viewGroup office
* the data of@param mItems rendering
*/
Public abstract void convert (int position, ViewGroup viewGroup, List<T> mItems);
}
The renewal of the page scheme of the embodiment of the present invention can be by the number of each target layout module in target layout container According to being updated, the data dynamic of the static loading page is updated to realize, rather than simply to the static loading page into Row is all deleted and destroys and all re-create, and solves when the static loading page loads new data, needs static loading All views in the page are all removed and are added again, and caused performance is lost, and caused by memory and cpu resource The problem of excess waste, realizes the effect that data on the static loading page are carried out with dynamic update, and can keep away as far as possible Exempt from when repeating to draw the page, the page flashing for all being removed due to the static loading page and being occurred during adding again, Influence the defect of user experience.
Fig. 2 is a kind of flow diagram of the renewal of the page device provided in the embodiment of the present invention, and the present embodiment is applicable In be updated to page data the case where, for example, for loading the page of data using static loading mode, need pair The page data of the static loading page carries out the scene of dynamic update.The device can be real by the way of software and/or hardware It is existing, and integrate in what equipment with network communicating function in office.
As shown in Fig. 2, the renewal of the page device of the embodiment of the present invention may include: data afferent module 201 and the page more New module 202.Wherein:
Data afferent module 201, if passing the new data for detecting that the static loading page is loaded with new data Enter the target layout container of corresponding binding on the page;
Renewal of the page module 202, for determining the target layout module in the target layout container, by the new data The target layout module is passed to, and the new data is updated onto the target layout module, by the target layout Module carries out renewal of the page.
On the basis of the above embodiments, optionally, the renewal of the page module 202 may include:
Legacy data determination unit, for determining the quantity for having legacy data in the target layout container;
Module number determination unit, for the quantity of quantity and the legacy data according to the new data, determine described in For carrying the target layout module number of the new data in target layout container;
Layout modules determination unit, for determining target layout module according to the target layout module number.
On the basis of the above embodiments, optionally, the module number determination unit may include:
First determines subelement, if being greater than the quantity of the legacy data for the quantity of the new data, according to described in Difference between new data and the legacy data increases the quantity for the layout modules for including in the target container;
Second determines subelement, if being less than the quantity of the legacy data for the quantity of the new data, according to described in Difference between new data and the legacy data deletes the quantity for the layout modules for including in the target container.
On the basis of the above embodiments, optionally, the renewal of the page module 202 may include:
Renewal of the page unit, for described in the position Rankine-Hugoniot relations and the target layout container according to the new data The position Rankine-Hugoniot relations of target layout module updates the new data to the target layout module.
Renewal of the page device provided in the embodiment of the present invention can be performed provided in aforementioned present invention any embodiment Method for updating pages, have and execute the corresponding functional module of the method for updating pages and beneficial effect.
Fig. 3 is a kind of structural schematic diagram of the equipment provided in the embodiment of the present invention.Fig. 3, which is shown, to be suitable for being used to realizing this The block diagram of the example devices 312 of invention embodiment.The equipment 312 shown in Fig. 3 is only an example, should not be to this hair The function and use scope of bright embodiment bring any restrictions.
As shown in figure 3, equipment 312 is showed in the form of universal computing device.The component of equipment 312 may include but unlimited In one or more processor 316, system storage 328, different system components (including system storage 328 and place are connected Manage device 316) bus 318.
Bus 318 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Equipment 312 typically comprises a variety of computer system readable media.These media can be it is any can be by equipment The usable medium of 312 access, including volatile and non-volatile media, moveable and immovable medium.
System storage 328 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 330 and/or cache memory 332.Equipment 312 may further include other removable/not removable Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 334 can be used for read and write can not Mobile, non-volatile magnetic media (Fig. 3 do not show, commonly referred to as " hard disk drive ").It, can although being not shown in Figure 3 To provide the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk "), and it is non-volatile to moving Property CD (such as CD-ROM, DVD-ROM or other optical mediums) read and write CD drive.In these cases, each drive Dynamic device can be connected by one or more data media interfaces with bus 318.Memory 328 may include at least one journey Sequence product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform this hair The function of bright each embodiment.
Program/utility 340 with one group of (at least one) program module 342, can store in such as memory In 328, such program module 342 includes but is not limited to operating system, one or more application program, other program modules And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 342 Usually execute the function and/or method in embodiment described in the invention.
Equipment 312 can also be logical with one or more external equipments 314 (such as keyboard, sensing equipment, display 324 etc.) Letter can also enable a user to equipment interact with equipment 312 with one or more and communicate, and/or with enable the equipment 312 Any equipment (such as network interface card, modem etc.) communicated with one or more of the other calculating equipment communicates.It is this Communication can be carried out by input/output (I/O) interface 322.Also, equipment 312 can also pass through network adapter 320 and one A or multiple networks (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.Such as figure Shown, network adapter 320 is communicated by bus 318 with other modules of equipment 312.It should be understood that although not showing in Fig. 3 Out, other hardware and/or software module can be used with bonding apparatus 312, including but not limited to: microcode, device driver, superfluous Remaining processing unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processor 316 by the program that is stored in system storage 328 of operation, thereby executing various function application and Data processing, for example, realizing method for updating pages provided in the embodiment of the present invention, comprising:
If detecting, the static loading page is loaded with new data, and the new data is passed on the page corresponding binding Target layout container;
It determines the target layout module in the target layout container, the new data is passed into the target layout mould Block, and the new data is updated onto the target layout module, renewal of the page is carried out by the target layout module.
A kind of computer readable storage medium is additionally provided in the embodiment of the present invention, is stored thereon with computer program, it should The method for updating pages as provided in the embodiment of the present invention is realized when program is executed by processor, comprising:
If detecting, the static loading page is loaded with new data, and the new data is passed on the page corresponding binding Target layout container;
It determines the target layout module in the target layout container, the new data is passed into the target layout mould Block, and the new data is updated onto the target layout module, renewal of the page is carried out by the target layout module.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of method for updating pages characterized by comprising
If detecting, the static loading page is loaded with new data, and the new data is passed to the mesh of corresponding binding on the page Mark layout container;
It determines the target layout module in the target layout container, the new data is passed into the target layout module, And update the new data onto the target layout module, renewal of the page is carried out by the target layout module.
2. the method according to claim 1, wherein determining the target layout mould in the target layout container Block, comprising:
Determine have the quantity of legacy data in the target layout container;
According to the quantity of the new data and the quantity of the legacy data, determine described for carrying in the target layout container The target layout module number of new data;
According to the target layout module number, target layout module is determined.
3. according to the method described in claim 2, it is characterized in that, according to the quantity of the new data and the number of the legacy data Amount determines in the target layout container for carrying the target layout module number of the new data, comprising:
If the quantity of the new data is greater than the quantity of the legacy data, according between the new data and the legacy data Difference increases the quantity for the layout modules for including in the target container;
If the quantity of the new data is less than the quantity of the legacy data, according between the new data and the legacy data Difference deletes the quantity for the layout modules for including in the target container.
4. the method according to claim 1, wherein updating the new data to the target layout module On, comprising:
It arranges the position of target layout module described in position Rankine-Hugoniot relations and the target layout container according to the new data Column relationship updates the new data onto the target layout module.
5. a kind of renewal of the page device characterized by comprising
Data afferent module, if for detecting that the static loading page is loaded with new data, the new data is incoming described The target layout container of corresponding binding on the page;
Renewal of the page module passes to the new data for determining the target layout module in the target layout container The target layout module, and the new data is updated in the target layout module, by the target layout module into Row renewal of the page.
6. device according to claim 5, which is characterized in that the renewal of the page module includes:
Legacy data determination unit, for determining the quantity for having legacy data in the target layout container;
Module number determination unit determines the target for the quantity of quantity and the legacy data according to the new data For carrying the target layout module number of the new data in layout container;
Layout modules determination unit, for determining target layout module according to the target layout module number.
7. device according to claim 6, which is characterized in that the module number determination unit includes:
First determines subelement, if being greater than the quantity of the legacy data for the quantity of the new data, according to the new number Increase according to quantity of the difference between the legacy data to the layout modules for including in the target container;
Second determines subelement, if being less than the quantity of the legacy data for the quantity of the new data, according to the new number It is deleted according to quantity of the difference between the legacy data to the layout modules for including in the target container.
8. device according to claim 5, which is characterized in that the renewal of the page module includes:
Renewal of the page unit, for target described in the position Rankine-Hugoniot relations and the target layout container according to the new data The position Rankine-Hugoniot relations of layout modules updates the new data onto the target layout module.
9. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method for updating pages as described in any in claim 1-4.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The method for updating pages as described in any in claim 1-4 is realized when execution.
CN201811311475.7A 2018-11-06 2018-11-06 Method for updating pages, device, equipment and storage medium Pending CN109408191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811311475.7A CN109408191A (en) 2018-11-06 2018-11-06 Method for updating pages, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811311475.7A CN109408191A (en) 2018-11-06 2018-11-06 Method for updating pages, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109408191A true CN109408191A (en) 2019-03-01

Family

ID=65471680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811311475.7A Pending CN109408191A (en) 2018-11-06 2018-11-06 Method for updating pages, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109408191A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413921A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 Webpage loading method, device, computer equipment and storage medium
CN111552531A (en) * 2020-04-23 2020-08-18 北京字节跳动网络技术有限公司 Page display method, device, terminal and storage medium
CN111723317A (en) * 2019-03-22 2020-09-29 深圳Tcl新技术有限公司 Page dynamic processing method, intelligent terminal and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095445A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Page generation method and system
CN105159999A (en) * 2015-09-08 2015-12-16 百度在线网络技术(北京)有限公司 Dynamic page displaying method and dynamic page displaying device
CN105824900A (en) * 2016-03-14 2016-08-03 传线网络科技(上海)有限公司 Page display system based on react-native
CN106155708A (en) * 2015-03-24 2016-11-23 Tcl集团股份有限公司 A kind of dynamic load and the method and system of renewal content of pages
CN107741970A (en) * 2017-10-09 2018-02-27 北京京东尚科信息技术有限公司 Method and apparatus for being laid out to homepage
CN108073438A (en) * 2018-01-02 2018-05-25 武汉斗鱼网络科技有限公司 Page display method, device and electric terminal
CN108334386A (en) * 2017-01-20 2018-07-27 阿里巴巴集团控股有限公司 A kind of layout method and system of view component
CN108664486A (en) * 2017-03-28 2018-10-16 腾讯科技(深圳)有限公司 A kind of webpage texture memory management method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155708A (en) * 2015-03-24 2016-11-23 Tcl集团股份有限公司 A kind of dynamic load and the method and system of renewal content of pages
CN105095445A (en) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 Page generation method and system
CN105159999A (en) * 2015-09-08 2015-12-16 百度在线网络技术(北京)有限公司 Dynamic page displaying method and dynamic page displaying device
CN105824900A (en) * 2016-03-14 2016-08-03 传线网络科技(上海)有限公司 Page display system based on react-native
CN108334386A (en) * 2017-01-20 2018-07-27 阿里巴巴集团控股有限公司 A kind of layout method and system of view component
CN108664486A (en) * 2017-03-28 2018-10-16 腾讯科技(深圳)有限公司 A kind of webpage texture memory management method and device
CN107741970A (en) * 2017-10-09 2018-02-27 北京京东尚科信息技术有限公司 Method and apparatus for being laid out to homepage
CN108073438A (en) * 2018-01-02 2018-05-25 武汉斗鱼网络科技有限公司 Page display method, device and electric terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723317A (en) * 2019-03-22 2020-09-29 深圳Tcl新技术有限公司 Page dynamic processing method, intelligent terminal and storage medium
CN110413921A (en) * 2019-06-21 2019-11-05 深圳壹账通智能科技有限公司 Webpage loading method, device, computer equipment and storage medium
CN110413921B (en) * 2019-06-21 2022-08-30 深圳壹账通智能科技有限公司 Webpage loading method and device, computer equipment and storage medium
CN111552531A (en) * 2020-04-23 2020-08-18 北京字节跳动网络技术有限公司 Page display method, device, terminal and storage medium
CN111552531B (en) * 2020-04-23 2023-04-18 北京字节跳动网络技术有限公司 Page display method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN111090628B (en) Data processing method and device, storage medium and electronic equipment
US20200004556A1 (en) Facilitating multi-inheritance within a single inheritance container-based environment
CN104836715B (en) Run on the mobile apparatus it is multiple using data sharing method and apparatus
CN110008045A (en) Polymerization, device, equipment and the storage medium of micro services
CN109408191A (en) Method for updating pages, device, equipment and storage medium
CN105550345A (en) File operation method and apparatus
CN109542459A (en) Application program packaging method and device, computer installation and computer storage medium
CN108255989B (en) Picture storage method and device, terminal equipment and computer storage medium
CN111399833A (en) Service data processing method and device, computer equipment and storage medium
CN110908697A (en) Resource packaging method, device, server and storage medium
CN112416359A (en) Dynamic partition customizing method, device, equipment and computer readable storage medium
US10031764B2 (en) Managing executable files
CN106022010A (en) File display method and device
CN109347899A (en) The method of daily record data is written in distributed memory system
CN111008934B (en) Scene construction method, device, equipment and storage medium
CN110222478A (en) A kind of method and mobile terminal for protecting document
CN113656359A (en) Method and device for lightening three-dimensional model, computer equipment and storage medium
CN109460226A (en) Test certificate image generation method, device, equipment and storage medium
CN115270198A (en) Signature method, device and storage medium of PDF document
CN112818129B (en) Atlas modeling system and method
JP7328797B2 (en) Terminal device, character recognition system and character recognition method
CN105378645A (en) Virtualizing applications for multi-monitor environments
CN112764802A (en) Business logic customization method and device, electronic equipment and storage medium
CN113672261A (en) Cloud software updating method, electronic device and storage medium
CN113010129A (en) Virtual studio full-flow multi-terminal blackboard writing extraction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190301

RJ01 Rejection of invention patent application after publication