CN106919620A - Single-page processing method and processing device - Google Patents
Single-page processing method and processing device Download PDFInfo
- Publication number
- CN106919620A CN106919620A CN201511000894.5A CN201511000894A CN106919620A CN 106919620 A CN106919620 A CN 106919620A CN 201511000894 A CN201511000894 A CN 201511000894A CN 106919620 A CN106919620 A CN 106919620A
- Authority
- CN
- China
- Prior art keywords
- pages
- page
- content
- page object
- target pages
- 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
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of single-page processing method and processing device, it is related to Internet technical field, solves the problems, such as page status cannot temporarily be preserved and recovered in existing single-page application process.The method of the present invention includes:When target pages are hung up, the content of pages of target pages is obtained;Wherein, the content of pages includes:Data type content of pages and Task content of pages;The page object of target pages is created according to the content of pages;By in the global page object array of page object addition of the target pages;When the target pages are recovered, according to the page object of the target pages selected from global page object array, the target pages to hanging up recover.Operated present invention is mainly used for other pages are switched in single-page application, and page status of the page before switching after recovery are ensure that when the page is recovered.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of single-page processing method and processing device.
Background technology
Single-page can be a kind of very simple static page of topology layout, the page structure letter of single-page
Single, layout is clear and easy to maintain.But on the website of single-page application type, due to while only
A page can be shown, during page table list is filled in, if desired checked into other pages or
Copy Info, then after other pages are entered, no matter the page is still reopened using fallback function,
When filling in the page of list before turning again to, the content being input on the page will disappear, and fill in before
The page of list is in original state, the characteristics of this is also single-page application website.
Also often there are some on single-page application website than relatively time-consuming operation simultaneously, for example in fact
When calculate, derive and download file etc., user can only select to wait in operating process, if in user
Way opens other pages, even if then operating successfully, user cannot also view result;And in behaviour
After work starts, once opening other pages, the task of operation will be dropped, either using browsing
The fallback function of device still reopens the page, and operation is required for re-starting.
The content of the invention
In view of this, the present invention proposes a kind of single-page processing method and processing device, and main purpose is
Solve the problems, such as page status cannot temporarily be preserved and recovered in existing single-page application process.
According to the first aspect of the invention, the present invention proposes a kind of single-page processing method, including:
When target pages are hung up, the content of pages of target pages is obtained;Wherein, the content of pages
Including:Data type content of pages and Task content of pages;
The page object of target pages is created according to the content of pages;
By in the global page object array of page object addition of the target pages;
When the target pages are recovered, according to the target selected from global page object array
The page object of the page, the target pages to hanging up recover.
According to the second aspect of the invention, the present invention proposes a kind of single-page processing unit, including:
Acquiring unit, for when target pages are hung up, obtaining the content of pages of target pages;Wherein,
The content of pages includes:Data type content of pages and Task content of pages;
Creating unit, the page object for creating target pages according to the content of pages;
Adding device, in the global page object array of page object addition by the target pages;
Recovery unit, for when the target pages are recovered, according to from global page object array
The page object of the target pages of selection, the target pages to hanging up recover.
By above-mentioned technical proposal, single-page processing method and processing device provided in an embodiment of the present invention, energy
Enough when target pages are hung up, the content of pages of target pages is obtained;Wherein, the content of pages bag
Include:Data type content of pages and Task content of pages;Target pages are created according to the content of pages
Page object;By in the global page object array of page object addition of the target pages;Extensive
During the multiple target pages, according to the page of the target pages selected from global page object array
In face of as the target pages to hanging up recover.And existing single-page application is due to simultaneously
A page is only able to display, after other pages are entered, no matter still reopened using fallback function
When the page, the page before turning again to, the content being input on the page before will disappear, at the page
In original state.Therefore, page status cannot temporarily be preserved with single-page application in the prior art and
The defect of recovery is compared, and the present invention can between the page be switched in single-page application process,
And the page status before switching can be returned to.
Described above is only the general introduction of technical solution of the present invention, of the invention in order to better understand
Technological means, and being practiced according to the content of specification, and in order to allow it is of the invention above-mentioned and
Other objects, features and advantages can become apparent, below especially exemplified by specific embodiment of the invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantage and benefit for
Those of ordinary skill in the art will be clear understanding.Accompanying drawing is only used for showing the mesh of preferred embodiment
, and it is not considered as limitation of the present invention.And in whole accompanying drawing, with identical with reference to symbol
Number represent identical part.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of single-page processing method provided in an embodiment of the present invention;
Fig. 2 shows a kind of composition frame chart of single-page processing unit provided in an embodiment of the present invention;
Fig. 3 shows the composition frame chart of another single-page processing unit provided in an embodiment of the present invention;
Fig. 4 shows the composition frame chart of another single-page processing unit provided in an embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is described more fully below with reference to accompanying drawings.Although in accompanying drawing
Show the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms this public affairs
Open without that should be limited by embodiments set forth here.Conversely, there is provided these embodiments are able to
The disclosure is best understood from, and can be by the complete skill for conveying to this area of the scope of the present disclosure
Art personnel.
On the website of single-page application type, due to being only able to display a page simultaneously, page is being filled in
During the list of face, if desired checked or Copy Info into other pages, then entering other pages
Behind face, no matter still reopening the page using fallback function, list was filled in before turning again to
During the page, the content being input on the page will disappear, and the page that list is filled in before is in original state.
Because single-page application has These characteristics, therefore cannot be by the page in single-page application process
State is preserved and recovered temporarily.In order to solve this defect of single-page application, the embodiment of the present invention is carried
A kind of single-page processing method is supplied, as shown in figure 1, the method includes:
101st, when target pages are hung up, the content of pages of target pages is obtained.
Wherein, content of pages includes:Data type content of pages and Task content of pages.
Due in using single-page application process, to switch between the page, being then switched
The page cannot return to switching before state, if that is, the page be switched after return to switching before
During the page, the page is in original state, and the data content that the page is input into before handover is all vanished from sight.
Therefore, the embodiment of the present invention is when using single-page application, in order that the page is returned to before switching
State, that is, recover the data content that the page is input into before handover, it is necessary to hang up to be restored
The page.Wherein, when the hang-up page to be restored refers to that user carries out content input in current page,
If it is desired to other pages are opened in midway, it is necessary to which the state of current page is hung up, the state is hung up
The exactly interim input content for preserving current page simultaneously hangs up current page.
In sum, the embodiment of the present invention needs execution step 101 to obtain mesh when target pages are hung up
Mark the content of pages of the page.Wherein, the content of pages of acquisition is the content that user is input into the page, institute
The page of the target pages content that has been exactly user input is stated, while being also the page to be restored.
102nd, the page object of target pages is created according to the content of pages.
After the content of pages for getting target pages in a step 101, in order to subsequently recover institute
The content of pages of target pages before switching can be shown page object after recovery when stating target pages
In face, it is necessary to which the content of pages of the target pages that will be got in step 101 is preserved.Therefore,
The embodiment of the present invention is created, it is necessary to perform step 102 according to the content of pages after step 101
The page object of target pages.Wherein, the page object is used to preserve the Page Range of target pages
The content of pages of interior input.
103rd, by the global page object array of page object addition of the target pages.
After the page object that target pages are created according to the content of pages in a step 102,
After exactly the content of pages of target pages is stored in page object, in order to not influence target pages
Operation after hang-up on other pages influences, while the page of the target pages in order to not influence hang-up
In face of continuing executing with for content of pages (such as Task content of pages of long-play) as middle preservation,
Therefore, the embodiment of the present invention needs to perform step 103 by the page object addition of the target pages entirely
In office's page object array.
In a browser, there is special purposes in global object, except all in preservation JavaScript
General function and as global context environment outside, also houses a large amount of objects specific to browser.
Wherein, the page object in the embodiment of the present invention constitutes global page object as global page object
Array, each page object in the global page object array of the embodiment of the present invention is specific for clear
Look at the object of device.
Therefore, the global page object array (each page object namely therein) along with
The whole life cycle of webpage, until user closes webpage, just reclaims array pair automatically by browser
As.The global page object array interim storage all page status for being suspended the page, each
Page status are all the references to former page object.The presence of global page object array is to prevent
During user's switching page, browser transfers the new page object of generation after recycling former page object automatically.
By the global page object array, after ensuring that the page is suspended, the state of the page is suspended,
Including being suspended being carrying out in the page for task, may continue to keep, without being returned by browser
Receive and destroy.
Whether browser can judge also protected in global page object array when internal memory garbage reclamation is carried out
Page object is deposited, if in store page object in global page object array, browser will judge
The page object in use so that not reclaim.For these reasons, so the embodiment of the present invention
In the action scope of global page object array be global, if global page object array is in browser
It is created that during opening, then it starts with the beginning of browser execution program, in browser execution journey
Just withered away at the end of sequence.Therefore the Task content of pages being stored in page object is added into global page
In the object array of face, even if being switched to other pages after target pages are suspended, in the Task page
Appearance can exist always, will not be reclaimed by browser, so the ongoing task of target pages can also be after
It is continuous to perform.
104th, when the target pages are recovered, according to the selection from global page object array
The page object of target pages, the target pages to hanging up recover.
In the page object of the target pages is added into global page object array in step 103
Afterwards, it is possible to be arbitrarily switched to other pages and operated.When the operation in other pages completes it
Afterwards, if user continues to operate in needing to return to the target pages before switching, that is, return to and be suspended
Target pages in operated, it is necessary to recover the target pages, therefore at step 104
The page object of the target pages can be selected from global page object array, by the page pair
It is displayed in the target pages as the content of pages of middle preservation is corresponding, so that target pages recover
State before to switching.
A kind of single-page processing method provided in an embodiment of the present invention, can hang up target pages when,
Obtain the content of pages of target pages;Wherein, the content of pages includes:Data type content of pages and
Task content of pages;The page object of target pages is created according to the content of pages;By the mesh
The page object of the mark page is added in global page object array;When the target pages are recovered, root
According to the page object of the target pages selected from global page object array, described in hanging up
Target pages are recovered.And existing single-page application due to simultaneously be only able to display a page,
Into after other pages, no matter the page is still reopened using fallback function, before turning again to
The page when, before on the page be input into content will disappear, the page be in original state.Therefore, with
Page status cannot temporarily be preserved and compared with the defect recovered by single-page application in the prior art, this hair
It is bright between the page to be switched in single-page application process, and switching can be returned to
Preceding page status.
In order to preferably understand the method shown in above-mentioned Fig. 1, as to above-mentioned implementation method
Refinement and extension, the embodiment of the present invention will be described in detail for each step in Fig. 1.
In embodiments of the present invention, in order that can arbitrarily switch between the page of single-page application and
The page status before switching can be returned to, the embodiment of the present invention increases for the page of single-page application
The hang-up of page status and recover function.Wherein, page status hang-up function is user current
When content input is carried out in the page, if it is desired to other pages are opened in midway, present invention implementation need to be only used
The function a kind of globally available for whole Website page that example is provided, hangs up current page, you can face
Input content in Shi Baocun current pages, and hang up whole current page.Wherein, hanging up the page can
To be considered to be placed in backstage after the page is minimized, it is input into the static content such as the page after page hang-up
Data etc. can be saved, the page hang up after the dynamic content such as page in the task of operation especially need
The task of long-play is wanted, it runs and will not interrupt after page hang-up, also may proceed to perform.And
The page recovers function, is the page that user can recover to be suspended at any time, and the page after recovery is comprising all
The content being input into before, and user can be based on the page continuation operation after recovery.
Based on above-mentioned functions provided in an embodiment of the present invention, as a kind of optional implementation method, this hair
Bright embodiment can increase the hang-up function button of the overall situation in the page of single-page application and recover function
Button, only can could show the function in the page of the opening with the function button, it is also possible to
The function is all shown in all pages.
It is following the single-page that the present invention is provided to be processed as a example by all showing the function in all pages
Method is illustrated.After user have input content in current page, if user needs to be switched to it
He is operated the page, and when subsequently also returning to the page being currently input into, it is possible to click on
The hang-up function button in target pages described in current page is namely follow-up.Now when click target
After hang-up function button in the page, begin to obtain the content of pages in target pages, wherein obtaining
The content of pages for taking is the content of pages of user input, rather than the page having in itself in target pages
Content.In embodiments of the present invention, the content of pages of acquisition both includes static content, while also wrapping
Include dynamic content, wherein static content including the content of user input etc. (generally include character,
Numeral etc.), dynamic content is including the operation task that user adds in the page etc..Therefore, the present invention
Content of pages in the target pages that embodiment is obtained may be summarized to be two kinds of content of pages:Number
According to type content of pages and Task content of pages.
After the content of pages in getting target pages, in order to subsequently recover the target pages
When the content of pages of target pages before switching can be shown target pages after recovery, this hair
Bright embodiment is accomplished by being created according to the content of pages page object of target pages, that is, by mesh
The content of pages for marking the page is stored in page object.Because the type of the content of pages for obtaining is different,
Therefore, it is following to be carried out for the page object that target pages are created according to different types of content of pages
Explanation.
When data type content of pages is got, data type that can be in content of pages creates band
There is the page object of the data type correspondence attribute, the data of the data type are assigned to the page
Corresponding attribute in object, so that the data are preserved in global page object array.
For example, when the content of pages for obtaining is quantity, one can be created and carry amount attributes
Page object page, page.amount is assigned to by the quantity;Or, when in the page for obtaining
Hold during for title, a page object page with name attributes can be created, the title is assigned
It is worth to page.name;Or, not only included quantity but also during including title when the content of pages for obtaining, can be with
The page object page for not only carrying name attributes again with amount attributes is created, and by the quantity
It is assigned to page.amount and page.name respectively with title.
When Task content of pages is got, task type that can be in content of pages creates band
There is the page object of the task type correspondence attribute, the task of the task type is assigned to the page
Corresponding attribute in object, so that the task is continued executing with global page object array.For
The Task content of pages of the Task content of pages of operation, especially long-play, when user needs
When being switched to other pages and being operated, in order to allow users to be directly switch to other pages, and
Need not wait until just carry out page layout switch, the embodiment of the present invention after the completion of the task run in target pages
Before tasks carrying the task object of the overall situation can be first created in target pages.
For example, when the content of pages for obtaining is export task, one can be created and carried
The page object page of exportTask attributes, the task object of the export task is assigned to
page.exportTask;Or, when the content of pages for obtaining is to import file task, can create
One page object page with inputTask attributes, by the task pair of the importing file task
As being assigned to page.inputTask;Or, when the content of pages for obtaining both includes export task
When including importing file task again, can create not only with exportTask attributes but also with inputTask
The page object page of attribute, and by the task object of the export task and import file task
Task object be assigned to page.exportTask and page.inputTask respectively.
After the content of pages in the target pages for saving acquisition by page object, for not shadow
Ring after target pages are hung up influences on the operation of other pages, and also to not influence what is hung up
The Task content of pages preserved in the page object of target pages is continued executing with, the embodiment of the present invention
The page object of the target pages that will can be created is added in global page object array pageList.By
In the action scope of global page object array be global, therefore by the page object of target pages
Task content of pages is added in global page object array, ensure that after target pages hang-up
Even if the switching page, the Task content of pages will not also be reclaimed by browser, ongoing task
Can always exist and can continue executing with.
When before target pages recover, that is, during target pages are hung up, if page object
Tasks carrying in face is completed, then implementing result can be in page object or global page object array
Preserved.For example, for above-mentioned export task, due to after file is derived successfully
Through being preserved, therefore, it is possible to directly be downloaded, it may not be necessary to recover target pages.Here need
It is noted that when target pages are hung up and are switched to other pages, due to target pages
Suffered in the absence of current browser DOM, thus hang up target pages in task can not include to mesh
The modification of mark page DOM, may otherwise cause run-time error.
Because in practical situations both, user may need to hang up a page repeatedly, that is, recover one
It is individual to hang up the multiple page, therefore the target pages for needing to recover accurately are recognized for the ease of user,
Be not in that the situation for recovering mistake occurs, the embodiment of the present invention can be the page object of target pages
Object identity is set, by the global page object array of page object addition with object identity.Institute
State object identity for distinguish hang-up multiple target pages, in order to effectively distinguish multiple mesh of hang-up
The mark page, used as a kind of optional implementation method, the embodiment of the present invention can be using timestamp as object
Mark.It is exactly by the page when object identity of the choosing timestamp as the page object of target pages
Object adds time during global page object array to be set to page object as object identity, wherein,
Page object is added time during global page object array, can be current operating temporal on line,
When will operate under current time, or line of the page object when adding global page object array
Between, will page object add a certain moment in the middle of the process of global page object array as by page
In face of as adding time during global page object array;To above two object identity set-up mode,
The present invention does not do any restriction.User can be made in this way according to the difference of timestamp, selection
Need the target pages sometime hung up for recovering.
In the page object of target pages is added into global page object array through the above way it
Afterwards, it is possible to be switched to other pages and operated.After the operation of other pages terminates, if
Needs return to switching before target pages when, that is, be suspended target pages when, Ke Yicong
Select to need the page object of the target pages for recovering to be recovered in global page object array.Specifically
, the page object of the target pages of recovery can be needed according to the selection of the timestamp of page object;And
The content of pages that the target pages for recovering are obtained when hanging up is read, that is, reads the page
Each property value in object;And the content of pages (property value) that will be read corresponds to assignment to recovery
In target pages, so that the target pages after recovering revert to the state of target pages before switching.
Explanation is needed exist for, if the target pages for recovering for reading are obtained when hanging up
Content of pages be data type content of pages when, can will read data indirect assignment to recover mesh
In the mark page;If the content of pages that the target pages for recovering for reading are obtained when hanging up is
During Task content of pages, the task object of reading can be assigned to the page of the target pages of recovery
Object, wherein the state of the task object for reading can continue to keep, if the shape of the task object for reading
State terminates for tasks carrying, then after the target pages for being assigned to recover, can continue in page object
Subsequent operation is carried out to completing for task in face;If the state of the task object for reading is in tasks carrying,
Then after the target pages for being assigned to recover, can continue to continue executing with described appointing in target pages
Business.And for needing to change the task of DOM, after the target pages for being assigned to recover, can
With subsequent execution, such as show what is arrived to server lookup by tasks carrying in the target pages for recovering
Order list etc..
Further, in order to keep the succinct of global page object array, while can avoid due to adding
Entering page object excessively causes user to select to recover to be gone wrong during target pages, the embodiment of the present invention
After the page object of the selection target page from global page object array is recovered, can be by
The page object of the target pages of recovery is deleted from global page object array, it is to avoid subsequently again
Cause to recover to fail due to selection page object mistake during the secondary recovery page.
Function is hung up and recovered to the page that the single-page processing method of the embodiment of the present invention is provided, and can make
The task that the page is carrying out before hanging up will not be interrupted after page hang-up, but be continued executing with, and wait to appoint
Respective handling is done after the completion of business.If for example, the tasks carrying that is suspended is completed before the page is recovered,
Can then notify that user checks or be downloaded etc. operation;If task is not carried out just recovering when completing
The page, then continue executing with after recovery in the page that the task can be, is made so as to solve page layout switch
The time-consuming problem of tasks carrying into the page.
Further, as the application to method shown in above-mentioned Fig. 1, the embodiment of the present invention is additionally provided
A kind of single-page processing unit, as shown in Fig. 2 the device includes:Acquiring unit 21, creating unit
22nd, adding device 23 and recovery unit 24, wherein,
Acquiring unit 21, for when target pages are hung up, obtaining the content of pages of target pages;Its
In, the content of pages includes:Data type content of pages and Task content of pages;
Creating unit 22, the page object for creating target pages according to the content of pages;
Adding device 23, for the page object of the target pages to be added into global page object array
In;
Recovery unit 24, for when the target pages are recovered, according to from global page object array
The page object of the target pages of middle selection, the target pages to hanging up recover.
Further, creating unit 22 is used for the data type in data type content of pages, creates
Page object with data type correspondence attribute;It is additionally operable to the number in data type content of pages
According to the corresponding attribute being assigned in page object, so as to by the data in global page object array
Preserved;Creating unit 22 is used for the task type in Task content of pages, and establishment is carried
The page object of the task type correspondence attribute;It is additionally operable to assign the task in Task content of pages
Corresponding attribute in being worth to page object, so that the task continues to hold in global page object array
OK.
Further, as shown in figure 3, adding device 23 includes:
Setup module 231, object identity is set for the page object for the target pages;Wherein,
The object identity includes timestamp;
Add module 232, for the page object with object identity to be added into global page object array
In.
Further, as shown in figure 3, recovery unit 24 includes:
Selecting module 241, for selecting the target pages for recovery in global page object array
Page object;
Read module 242, for reading the page that the target pages for recovering are obtained when hanging up
Content;
Assignment module 243, for content of pages correspondence to be assigned into the page object for recovering
Face.
Further, recovery unit 24 is obtained for reading the target pages for recovering when hanging up
The data type content of pages and/or Task content of pages for taking;It is additionally operable to the data type page that will be read
Task correspondence in data and/or Task content of pages in the content of face is assigned to described for recovering
Target pages.
Further, as shown in figure 4, described device also includes:
Unit 25 is deleted, for the page object of target pages that will recover from global page object array
In deleted.
A kind of single-page processing unit provided in an embodiment of the present invention, can hang up target pages when,
Obtain the content of pages of target pages;Wherein, the content of pages includes:Data type content of pages and
Task content of pages;The page object of target pages is created according to the content of pages;By the mesh
The page object of the mark page is added in global page object array;When the target pages are recovered, root
According to the page object of the target pages selected from global page object array, described in hanging up
Target pages are recovered.And existing single-page application due to simultaneously be only able to display a page,
Into after other pages, no matter the page is still reopened using fallback function, before turning again to
The page when, before on the page be input into content will disappear, the page be in original state.Therefore, with
Page status cannot temporarily be preserved and compared with the defect recovered by single-page application in the prior art, this hair
It is bright between the page to be switched in single-page application process, and switching can be returned to
Preceding page status.
Additionally, function is hung up and recovered to the page that the single-page processing unit of the embodiment of the present invention is provided,
The task that the page is carrying out before hanging up can be made will not interrupt after page hang-up, but continue executing with,
Treat to do respective handling after the completion of task.If tasks carrying is completed, can notify that user checks;If
Task is not carried out just having recovered the page when completing, then the task can be continued executing with, so as to solve
Page layout switch causes the time-consuming problem of tasks carrying in the page.
The single-page processing unit includes processor and memory, and above-mentioned acquiring unit 21, establishment are single
Unit 22, adding device 23 and recovery unit 24, as program unit storage in memory,
Corresponding function is realized by computing device storage said procedure unit in memory.
Kernel is included in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can
To set one or more, realized page shape by adjusting kernel parameter in single-page application process
State is preserved and is recovered purpose temporarily.
Memory potentially includes the volatile memory in computer-readable medium, random access memory
The form such as device (RAM) and/or Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash
RAM), memory includes at least one storage chip.
Present invention also provides a kind of computer program product, when being performed on data processing equipment,
It is adapted for carrying out the program code of initialization there are as below methods step:When target pages are hung up, mesh is obtained
Mark the content of pages of the page;Wherein, the content of pages includes:Data type content of pages and Task
Content of pages;The page object of target pages is created according to the content of pages;By the target pages
Page object add global page object array;When the target pages are recovered, according to from complete
The page object of the target pages selected in office's page object array, to the page object hung up
Recovered in face.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system,
Or computer program product.Therefore, the application can be implemented using complete hardware embodiment, complete software
The form of the embodiment in terms of example or combination software and hardware.And, the application can be used at one
Or multiple wherein includes the computer-usable storage medium of computer usable program code (including but not
Be limited to magnetic disk storage, CD-ROM, optical memory etc.) on implement computer program product shape
Formula.
The application is with reference to the method according to the embodiment of the present application, equipment (system) and computer program
The flow chart and/or block diagram of product is described.It should be understood that can be realized flowing by computer program instructions
In each flow and/or square frame and flow chart and/or block diagram in journey figure and/or block diagram
Flow and/or square frame combination.Can provide these computer program instructions to all-purpose computer, specially
With the processor of computer, Embedded Processor or other programmable data processing devices producing one
Machine so that produced by the instruction of computer or the computing device of other programmable data processing devices
It is raw to be used to realize in one flow of flow chart or multiple flow and/or block diagram one square frame or multiple side
The device of the function of being specified in frame.
These computer program instructions may be alternatively stored in can guide computer or other programmable datas to process
In the computer-readable memory that equipment works in a specific way so that storage is deposited in the computer-readable
Instruction in reservoir is produced and includes the manufacture of command device, and command device realization is in flow chart one
The function of being specified in flow or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can also be loaded into computer or other programmable data processing devices
On so that series of operation steps is performed on computer or other programmable devices to produce computer
The treatment of realization, so as to the instruction performed on computer or other programmable devices is provided for realizing
Specified in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames
The step of function.
In a typical configuration, computing device include one or more processors (CPU), input/
Output interface, network interface and internal memory.
Memory potentially includes the volatile memory in computer-readable medium, random access memory
The form such as device (RAM) and/or Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash
RAM).Memory is the example of computer-readable medium.
Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be with
Information Store is realized by any method or technique.Information can be computer-readable instruction, data knot
Structure, the module of program or other data.The example of the storage medium of computer includes, but are not limited to phase
Become internal memory (PRAM), static RAM (SRAM), dynamic random access memory
(DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electrically erasable
Except programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc only
Read memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic box type magnetic
Band, the storage of tape magnetic rigid disk or other magnetic storage apparatus or any other non-transmission medium, can be used for
The information that storage can be accessed by a computing device.Defined according to herein, computer-readable medium is not
Including keeping in computer readable media (transitory media), such as data-signal and carrier wave of modulation.
Embodiments herein is these are only, the application is not limited to.For this area skill
For art personnel, the application can have various modifications and variations.It is all spirit herein and principle it
Interior made any modification, equivalent substitution and improvements etc., should be included in claims hereof model
Within enclosing.
Claims (12)
1. a kind of single-page processing method, it is characterised in that methods described includes:
When target pages are hung up, the content of pages of target pages is obtained;Wherein, the content of pages
Including:Data type content of pages and Task content of pages;
The page object of target pages is created according to the content of pages;
By in the global page object array of page object addition of the target pages;
When the target pages are recovered, according to the target selected from global page object array
The page object of the page, the target pages to hanging up recover.
2. method according to claim 1, it is characterised in that created according to the content of pages
The page object of target pages includes:
According to the data type in data type content of pages, create with data type correspondence attribute
Page object;
Data in data type content of pages are assigned to the corresponding attribute in page object, so as to by institute
Data are stated to be preserved in global page object array;
According to the task type in Task content of pages, create with task type correspondence attribute
Page object;
Task in Task content of pages is assigned to the corresponding attribute in page object, so as to described
Task is continued executing with global page object array.
3. method according to claim 1, it is characterised in that by the page of the target pages
The global page object array of object addition includes:
For the page object of the target pages sets object identity;Wherein, the object identity includes
Timestamp;
By in the global page object array of page object addition with object identity.
4. method according to claim 2, it is characterised in that when the target pages are recovered,
According to the page object of the target pages selected from global page object array, to the institute for hanging up
Stating target pages and carrying out recovery includes:
The page object for the target pages for recovering is selected in global page object array;
Read the content of pages that the target pages for recovering are obtained when hanging up;
Content of pages correspondence is assigned to the target pages for recovering.
5. method according to claim 4, it is characterised in that read the mesh for recovering
The content of pages that the mark page is obtained when hanging up includes:
Read data type content of pages that the target pages for recovering obtain when hanging up and/or
Task content of pages;
Content of pages correspondence is assigned into the target pages for recovering includes:
Appointing in the data and/or Task content of pages in the data type content of pages that will be read
Business correspondence is assigned to the target pages for recovering.
6. the method according to any one of claim 1-5, it is characterised in that recovering described
During target pages, according to the page object of the target pages selected from global page object array,
After the target pages to hanging up recover, methods described also includes:
The page object of the target pages of recovery is deleted from global page object array.
7. a kind of single-page processing unit, it is characterised in that described device includes:
Acquiring unit, for when target pages are hung up, obtaining the content of pages of target pages;Wherein,
The content of pages includes:Data type content of pages and Task content of pages;
Creating unit, the page object for creating target pages according to the content of pages;
Adding device, in the global page object array of page object addition by the target pages;
Recovery unit, for when the target pages are recovered, according to from global page object array
The page object of the target pages of selection, the target pages to hanging up recover.
8. device according to claim 7, it is characterised in that
The creating unit is used for the data type in data type content of pages, creates with described
The page object of data type correspondence attribute;It is additionally operable to be assigned to the data in data type content of pages
Corresponding attribute in page object, so that the data are preserved in global page object array;
The creating unit is used for the task type in Task content of pages, creates with described
The page object of task type correspondence attribute;It is additionally operable to be assigned to the task in Task content of pages
Corresponding attribute in page object, so that the task is continued executing with global page object array.
9. device according to claim 7, it is characterised in that the adding device includes:
Setup module, object identity is set for the page object for the target pages;Wherein, it is described
Object identity includes timestamp;
Add module, for by the global page object array of page object addition with object identity.
10. device according to claim 8, it is characterised in that the recovery unit includes:
Selecting module, for selecting the page for the target pages for recovering in global page object array
In face of as;
Read module, for reading in the page that the target pages for recovering are obtained when hanging up
Hold;
Assignment module, for content of pages correspondence to be assigned into the target pages for recovering.
11. devices according to claim 10, it is characterised in that
The recovery unit is used to read the data that the target pages for recovering are obtained when hanging up
Type content of pages and/or Task content of pages;
The recovery unit is additionally operable to data and/or task in the data type content of pages that will be read
Task correspondence in type content of pages is assigned to the target pages for recovering.
12. device according to any one of claim 7-11, it is characterised in that described device
Also include:
Delete unit, for will recover target pages page object from global page object array
Deleted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511000894.5A CN106919620B (en) | 2015-12-28 | 2015-12-28 | Single page processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511000894.5A CN106919620B (en) | 2015-12-28 | 2015-12-28 | Single page processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106919620A true CN106919620A (en) | 2017-07-04 |
CN106919620B CN106919620B (en) | 2021-06-04 |
Family
ID=59456218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511000894.5A Active CN106919620B (en) | 2015-12-28 | 2015-12-28 | Single page processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106919620B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108363499A (en) * | 2018-01-31 | 2018-08-03 | 维沃移动通信有限公司 | A kind of text restoration methods and mobile terminal |
CN108416011A (en) * | 2018-03-02 | 2018-08-17 | 中国平安人寿保险股份有限公司 | A kind of page processing method, device, terminal and computer readable storage medium |
CN111597475A (en) * | 2020-04-21 | 2020-08-28 | 五八有限公司 | Page returning method and device, electronic equipment and computer storage medium |
CN112000255A (en) * | 2020-08-21 | 2020-11-27 | 北京明略软件系统有限公司 | List display method and apparatus, storage medium, and electronic apparatus |
CN112114735A (en) * | 2019-06-21 | 2020-12-22 | 百度在线网络技术(北京)有限公司 | Method and device for managing tasks |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6993523B1 (en) * | 2000-12-05 | 2006-01-31 | Silicon Graphics, Inc. | System and method for maintaining and recovering data consistency in a data base page |
CN101364227A (en) * | 2008-09-12 | 2009-02-11 | 深圳市茁壮网络技术有限公司 | Page switching method and system and digital television processing apparatus |
CN102158853A (en) * | 2011-05-23 | 2011-08-17 | 广州市动景计算机科技有限公司 | Method and device for managing download of mobile communication equipment terminal browser |
CN102682060A (en) * | 2011-01-28 | 2012-09-19 | 西门子公司 | Enabling information exchange while switching between web-pages |
CN102760162A (en) * | 2012-06-11 | 2012-10-31 | 北京搜狗信息服务有限公司 | Method and device for revealing and acquiring download link |
CN103034724A (en) * | 2012-12-14 | 2013-04-10 | 北京奇虎科技有限公司 | Method and device for carrying out input data recovery in browser |
CN103077092A (en) * | 2012-12-25 | 2013-05-01 | 北京奇虎科技有限公司 | Browser control recovering method and system |
CN103399693A (en) * | 2013-07-08 | 2013-11-20 | 北京华胜天成科技股份有限公司 | Method and system for relocating menus after overall refreshment of single page |
CN103984686A (en) * | 2013-02-07 | 2014-08-13 | 阿里巴巴集团控股有限公司 | Page-switching method and device |
CN104283920A (en) * | 2013-07-05 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Use method, server, terminal and system for Webapp router |
CN104685469A (en) * | 2012-08-09 | 2015-06-03 | 谷歌公司 | Background application page architecture for WEB applications |
CN104750730A (en) * | 2013-12-30 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Display method and display device implemented by browsers |
CN104978385A (en) * | 2015-03-19 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Information processing method, browser client and terminal |
-
2015
- 2015-12-28 CN CN201511000894.5A patent/CN106919620B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6993523B1 (en) * | 2000-12-05 | 2006-01-31 | Silicon Graphics, Inc. | System and method for maintaining and recovering data consistency in a data base page |
CN101364227A (en) * | 2008-09-12 | 2009-02-11 | 深圳市茁壮网络技术有限公司 | Page switching method and system and digital television processing apparatus |
CN102682060A (en) * | 2011-01-28 | 2012-09-19 | 西门子公司 | Enabling information exchange while switching between web-pages |
CN102158853A (en) * | 2011-05-23 | 2011-08-17 | 广州市动景计算机科技有限公司 | Method and device for managing download of mobile communication equipment terminal browser |
CN102760162A (en) * | 2012-06-11 | 2012-10-31 | 北京搜狗信息服务有限公司 | Method and device for revealing and acquiring download link |
CN104685469A (en) * | 2012-08-09 | 2015-06-03 | 谷歌公司 | Background application page architecture for WEB applications |
CN103034724A (en) * | 2012-12-14 | 2013-04-10 | 北京奇虎科技有限公司 | Method and device for carrying out input data recovery in browser |
CN103077092A (en) * | 2012-12-25 | 2013-05-01 | 北京奇虎科技有限公司 | Browser control recovering method and system |
CN103984686A (en) * | 2013-02-07 | 2014-08-13 | 阿里巴巴集团控股有限公司 | Page-switching method and device |
CN104283920A (en) * | 2013-07-05 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Use method, server, terminal and system for Webapp router |
CN103399693A (en) * | 2013-07-08 | 2013-11-20 | 北京华胜天成科技股份有限公司 | Method and system for relocating menus after overall refreshment of single page |
CN104750730A (en) * | 2013-12-30 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Display method and display device implemented by browsers |
CN104978385A (en) * | 2015-03-19 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Information processing method, browser client and terminal |
Non-Patent Citations (2)
Title |
---|
ALESSANDRO MARCHETTO 等: ""Under and Over Approximation of State Models Recovered for Ajax Applications"", 《2010 14TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING》 * |
MARC: ""Form fields in single-page web applications with history support: Caching user input"", 《HTTPS://STACKOVERFLOW.COM/QUESTIONS/13104595/FORM-FIELDS-IN-SINGLE-PAGE-WEB-APPLICATIONS-WITH-HISTORY-SUPPORT-CACHING-USER-I》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108363499A (en) * | 2018-01-31 | 2018-08-03 | 维沃移动通信有限公司 | A kind of text restoration methods and mobile terminal |
CN108416011A (en) * | 2018-03-02 | 2018-08-17 | 中国平安人寿保险股份有限公司 | A kind of page processing method, device, terminal and computer readable storage medium |
CN112114735A (en) * | 2019-06-21 | 2020-12-22 | 百度在线网络技术(北京)有限公司 | Method and device for managing tasks |
CN112114735B (en) * | 2019-06-21 | 2022-08-05 | 百度在线网络技术(北京)有限公司 | Method and device for managing tasks |
CN111597475A (en) * | 2020-04-21 | 2020-08-28 | 五八有限公司 | Page returning method and device, electronic equipment and computer storage medium |
CN111597475B (en) * | 2020-04-21 | 2021-10-29 | 五八有限公司 | Page returning method and device, electronic equipment and computer storage medium |
CN112000255A (en) * | 2020-08-21 | 2020-11-27 | 北京明略软件系统有限公司 | List display method and apparatus, storage medium, and electronic apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN106919620B (en) | 2021-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106919620A (en) | Single-page processing method and processing device | |
JP6818693B2 (en) | Application page quick access | |
CN106164866B (en) | Efficient migration of client-side WEB state | |
CN106886570A (en) | page processing method and device | |
CN106502699A (en) | A kind of five application page processing method, apparatus and system | |
US11048501B2 (en) | Container based application reification | |
CN108509209A (en) | A kind of generation method, device, computer equipment and the storage medium of resource packet | |
CN103365741B (en) | For the snapshot of cluster virtual machine and the method and apparatus of recovery | |
CN106681971A (en) | Form data processing method and device | |
CN104281484B (en) | A kind of virtual machine migration method and device | |
CN103246428B (en) | To applying the method and user terminal of showing in desktop grouping | |
CN108647025A (en) | Processing method and processing device, electronics and the storage device of DOM Document Object Model interior joint | |
CN106610774A (en) | Webpage table editing method and device | |
CN107463418A (en) | The configuration file generation method and device of a kind of server middleware | |
CN106874328A (en) | A kind of data processing method and equipment | |
CN108089865A (en) | Using method of cutting out, device and storage medium | |
CN109634682A (en) | The configuration file update method and device of application program | |
CN107545058A (en) | A kind of page loading method, server and browser | |
CN106843820A (en) | Code process method and apparatus | |
CN110362341A (en) | Business management method, device, equipment and storage medium based on micro services framework | |
CN108073580A (en) | A kind of processing method and processing device based on page concurrent request | |
CN108170430A (en) | A kind of method and system of showing interface | |
CN106657433A (en) | Method and device for naming physical network card in multi-network card environment | |
CN106484755A (en) | The method of asynchronous quick loading video thumbnails | |
CN109617950A (en) | A kind of data-updating method, device, equipment and readable storage medium storing program for executing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: Beijing Guoshuang Technology Co.,Ltd. Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing Applicant before: Beijing Guoshuang Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |