Summary of the invention
The embodiment of the present invention provides a kind of data-updating method and relevant apparatus that is applied to multipage label, for the mechanism of the data of automatic renewal tab is provided, and the bandwidth resources that take while saving Data Update.
For solving the problems of the technologies described above, the embodiment of the present invention provides following technical scheme:
First aspect present invention provides a kind of data-updating method that is applied to multipage label, comprising:
Detect and in the tab of front opening, whether have the shared data that need renewal, wherein, above-mentioned shared data refer to the data that are simultaneously present in plural tab;
If above-mentioned, in the tab of front opening, there are the shared data that need renewal,, the above-mentioned shared data of upgrading that need in the tab of front opening are upgraded.
Based on first aspect present invention, in the possible implementation of the first, whether above-mentioned detection there are the shared data that need renewal in the tab of front opening, comprising:
Renewal status indicator to the above-mentioned all shared data in the tab of front opening that record in monitored variable detects;
When existing renewal status indicator to be the shared data of the first sign, the shared data that definite renewal status indicator is the first sign are for needing the shared data of renewal;
When existing renewal status indicator to be the shared data of the second sign, the shared data of the shared data that definite renewal status indicator is the second sign for not needing to upgrade.
The possible implementation of the first based on first aspect present invention, in the possible implementation of the second, above-mentioned to needing the shared data of upgrading to upgrade in above-mentioned tab, comprise afterwards:
In above-mentioned monitored variable, the renewal status indicator of the shared data of having upgraded of the above-mentioned tab when front opening is revised as to above-mentioned the second sign.
The possible implementation of the first based on first aspect present invention, or the implementation that the second of first aspect present invention is possible, in the third possible implementation, in above-mentioned monitored variable, also recording the renewal status indicator of all shared data of other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the above-mentioned tab when front opening one or more bookmark in same page framework;
If user being detected modifies to the first data in the tab of front opening, said method also comprises: in above-mentioned monitored variable, the renewal status indicator of above-mentioned first data of other tab that comprises above-mentioned the first data is revised as to above-mentioned the second sign.
Based on first aspect present invention, in the 4th kind of possible implementation, whether above-mentioned detection there are the shared data that need renewal in the tab of front opening, comprising:
Relatively in the tab of front opening, share the modification time of data and the modification time of the same shared data in other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the bookmark of the above-mentioned tab when front opening in same page framework;
If share the modification time of data not for the latest in the tab of front opening,, determine that above-mentioned shared data need to upgrade;
If share the modification time of data for the latest in the tab of front opening,, determine that above-mentioned shared data do not need to upgrade.
Second aspect present invention provides a kind of data update apparatus that is applied to multipage label, comprising:
Detecting unit, for detection of whether there are the shared data that need renewal in the tab of front opening, wherein, above-mentioned shared data refer to the data that are simultaneously present in plural tab;
Updating block, while there are for detect the above-mentioned tab when front opening when above-mentioned detecting unit the shared data that need renewal, upgrades the above-mentioned shared data of upgrading that need in the tab of front opening.
Based on second aspect present invention, in the possible implementation of the first, above-mentioned detecting unit, comprising:
Detection sub-unit, detects for the above-mentioned renewal status indicator of working as all shared data in the tab of front opening that monitored variable is recorded;
Determining unit, for when existing renewal status indicator to be the shared data of the first sign, the shared data that definite renewal status indicator is the first sign are for needing the shared data of renewal; When existing renewal status indicator to be the shared data of the second sign, the shared data of the shared data that definite renewal status indicator is the second sign for not needing to upgrade.
The possible implementation of the first based on second aspect present invention, in the possible implementation of the second, above-mentioned data update apparatus also comprises:
First revises unit, in above-mentioned monitored variable, the renewal status indicator of the shared data of having upgraded of the above-mentioned tab when front opening is revised as to above-mentioned the second sign.
The possible implementation of the first based on second aspect present invention, or the implementation that the second of second aspect present invention is possible, in the third possible implementation, in above-mentioned monitored variable, also recording the renewal status indicator of all shared data of other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the above-mentioned tab when front opening one or more bookmark in same page framework;
Above-mentioned data update apparatus, also comprises:
Second revises unit, for when user being detected the first data of the tab when front opening modified, in above-mentioned monitored variable, the renewal status indicator of above-mentioned first data of other tab that comprises above-mentioned the first data is revised as to above-mentioned the second sign.
Based on second aspect present invention, in the 4th kind of possible implementation, above-mentioned detecting unit, comprising:
Comparing unit, for relatively working as the tab of front opening, share the modification time of data and the modification time of the same shared data in other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the bookmark of the above-mentioned tab when front opening in same page framework;
Determining unit, for when above-mentioned comparing unit, compare when the tab of front opening, share data modification time not for the latest time, determine that above-mentioned shared data need renewal; When above-mentioned comparing unit compares in the tab of front opening the modification time of sharing data for the latest time, determine that above-mentioned shared data do not need renewal.
Therefore, in the embodiment of the present invention, by detection, work as the shared data that whether exist needs to upgrade in the tab of front opening, and during the shared data of exist to need upgrading in the tab when front opening, the shared data that need to upgrade in the tab of front opening are upgraded, on the one hand, the invention provides the mechanism of the data in automatic renewal tab, without user, click refresh button and trigger renewal, on the other hand, the present invention only just upgrades these shared data when shared data need to be upgraded, thereby the waste of the bandwidth resources that can avoid data to not needing to upgrade also to upgrade and cause, the bandwidth resources that taken while effectively having saved Data Update.
Embodiment
The embodiment of the present invention provides a kind of data-updating method and relevant apparatus that is applied to multipage label.
For making goal of the invention of the present invention, feature, advantage can be more obvious and understandable, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, but not whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
First explanation, the multipage label in the embodiment of the present invention refer on the same page, the technology of utilizing a plurality of pages that page framework is built to coexist, switches by the tab on the page between each page.
Below the data-updating method that is applied to multipage label in the embodiment of the present invention is described, refers to Fig. 1, a kind of data-updating method in the embodiment of the present invention comprises:
101, detect in the tab of front opening, whether there are the shared data that need renewal;
Wherein, above-mentioned shared data refer to the data that are simultaneously present in plural tab.
In the embodiment of the present invention, adopt multipage label technology at line products (as software serve (SaaS, Software-as-a-service)) at line products) exist a plurality of tabs to quote the situation of identical data, also there is the situation of above-mentioned shared data.
When user opens the page of certain tab, data update apparatus detects in the tab of front opening, whether there are the shared data that need renewal.
In a kind of implementation of the present invention, the renewal status indicator that monitored variable records all shared data in one or more tab is set, and set to upgrade status indicator be the shared data of the first sign shared data for needing to upgrade, setting renewal status indicator is that the shared data of the second sign are the shared data that do not need renewal, while opening the page of certain tab with convenient user, by detecting the renewal status indicator of all shared data in this tab recording in monitored variable, determine the shared data that whether exist needs to upgrade in this tab.Alternatively, above-mentioned the first sign and second is designated different numerals; Or above-mentioned the first sign and second to be designated different numerals be different characters; Or above-mentioned first be designated numeral, second is designated character; Or above-mentioned first be designated character, second is designated numeral.The embodiment of the present invention does not limit particular type and the value of the first sign and the second sign.
Further, in monitored variable, can also record the renewal status indicator of all shared data of other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the above-mentioned tab when front opening one or more bookmark in same page framework, when data update apparatus detects user, the first data in the tab of front opening are modified,, in above-mentioned monitored variable, the renewal status indicator of above-mentioned first data of other tab that comprises above-mentioned the first data is revised as to above-mentioned the second sign.
In the another kind of implementation of the present invention, by relatively share the modification time of data and the modification time of the same shared data in other tab in the tab of front opening, detect in the tab of front opening, whether there are the shared data that need renewal, when comparing in the tab of front opening the modification time of sharing data for the latest time, determine that these the shared data in the tab of front opening do not need to upgrade, when compare in the tab of front opening share data modification time not for the latest time, determine that these the shared data in the tab of front opening need renewal.
Certainly, the embodiment of the present invention also can be taked alternate manner to detect and in the tab of front opening, whether have the shared data that need renewal, is not construed as limiting herein.
If 102 exist the shared data that need renewal in the tab of front opening,, the shared data that need to upgrade in the tab of front opening are upgraded;
In step 101, detect the shared data that existence need to be upgraded, the shared data that data update apparatus upgrades needs are upgraded.
Alternatively, if detect whether there are the shared data that need renewal in the tab of front opening by monitored variable in step 101, after the shared data that need to upgrade in the tab of front opening in step 102 pair are upgraded, in above-mentioned monitored variable, the renewal status indicator of the shared data of having upgraded of the above-mentioned tab when front opening is revised as to above-mentioned the second sign.
Therefore, in the embodiment of the present invention, by detection, work as the shared data that whether exist needs to upgrade in the tab of front opening, and during the shared data of exist to need upgrading in the tab when front opening, the shared data that need to upgrade in the tab of front opening are upgraded, on the one hand, the invention provides the mechanism of the data in automatic renewal tab, without user, click refresh button and trigger renewal, on the other hand, the present invention only just upgrades these shared data when shared data need to be upgraded, thereby the waste of the bandwidth resources that can avoid data to not needing to upgrade also to upgrade and cause, the bandwidth resources that taken while effectively having saved Data Update.
With another embodiment, the data-updating method that is applied to multipage label in the embodiment of the present invention is described below, refers to Fig. 2, a kind of data-updating method in the embodiment of the present invention comprises:
201, the renewal status indicator of all shared data in the tab of front opening that record in monitored variable is detected;
In embodiments of the present invention, the renewal status indicator that monitored variable records all shared data in one or more tab is set.
When user opens the page of certain tab, data update apparatus detects the renewal status indicator of all shared data in the tab of front opening that record in monitored variable.
Alternatively, in the common parent page setup monitored variable of a plurality of tabs.
Alternatively, when tab is opened, just in monitored variable, increase the renewal status indicator of the shared data in this tab, when this tab is closed, delete the renewal status indicator of the shared data in this tab in monitored variable.
Alternatively, monitored variable, except comprising the renewal status indicator of sharing data, also comprises the renewal status indicator of unshared data.
202,, when existing renewal status indicator to be the shared data of the first sign, the shared data that definite renewal status indicator is the first sign are for needing the shared data of renewal;
Alternatively, above-mentioned first is designated different digital or character, and the embodiment of the present invention does not limit the particular type of the first sign and value.
203, when existing renewal status indicator to be the shared data of the second sign, the shared data of the shared data that definite renewal status indicator is the second sign for not needing to upgrade;
Alternatively, above-mentioned second is designated different digital or character, and the embodiment of the present invention does not limit the particular type of the second sign and value.
If 204 exist the shared data that need renewal in the tab of front opening,, the shared data that need to upgrade in the tab of front opening are upgraded.
205,, in above-mentioned monitored variable, the renewal status indicator of the shared data of having upgraded of the above-mentioned tab when front opening is revised as to above-mentioned the second sign.
Alternatively, in monitored variable, can also record the renewal status indicator of all shared data of other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the above-mentioned tab when front opening one or more bookmark in same page framework, when data update apparatus detects user, the first data in the tab of front opening are modified,, in above-mentioned monitored variable, the renewal status indicator of above-mentioned first data of other tab that comprises above-mentioned the first data is revised as to above-mentioned the second sign.
Therefore, in the embodiment of the present invention, by detection, work as the shared data that whether exist needs to upgrade in the tab of front opening, and during the shared data of exist to need upgrading in the tab when front opening, the shared data that need to upgrade in the tab of front opening are upgraded, on the one hand, the invention provides the mechanism of the data in automatic renewal tab, without user, click refresh button and trigger renewal, on the other hand, the present invention only just upgrades these shared data when shared data need to be upgraded, thereby the waste of the bandwidth resources that can avoid data to not needing to upgrade also to upgrade and cause, the bandwidth resources that taken while effectively having saved Data Update.
For ease of better understanding the technical scheme of the embodiment of the present invention, with a concrete application examples, the data-updating method of this law is described in detail below.
Suppose to set a monitored variable c at tab A, tab B and the common parent page P of tab C, as shown in Figure 3, tab A comprises data cached a, tab B comprises data cached a and data cached b, tab C comprises data cached a and data cached c, because data cached a exists in tab A, tab B and tab C simultaneously, therefore data cached a is the shared data in the embodiment of the present invention.
Suppose that the monitored variable c in the embodiment of the present invention has recorded the data cached renewal status indicator of each tab, in monitored variable c except recording the renewal status indicator of sharing data, also recorded the renewal status indicator of unshared data.
Under initial situation, these data cached renewal status indicators are all false, and monitored variable c thes contents are as follows:
After user modifies to the data cached a in tab A, data update apparatus is revised as true by the renewal status indicator of data cached a in the tab B in monitored variable c and tab C, and now, monitored variable c thes contents are as follows:
When user's switching page label arrives tab B, data update apparatus judges by checking the data cached renewal status indicator of the tab B recording in monitored variable c, when the state of the data cached a of tab B being detected and be true, data cached a to tab B upgrades, after renewal completes, the renewal status indicator of the data cached a of page B in monitored variable c is revised as to false, and other of page B is data cached, as data cached b, owing to upgrading status indicator, be false, just it does not upgraded.
Now, theing contents are as follows of monitored variable c:
In like manner, when user's switching page label arrives tab C, also the same with the situation that is switched to page B, now, monitored variable c thes contents are as follows:
To being applied in the embodiment of the present invention, the data update apparatus of tab is described below, refers to Fig. 4, the data update apparatus 400 that the embodiment of the present invention provides, comprising:
Detecting unit 401, for detection of whether there are the shared data that need renewal in the tab of front opening, wherein, above-mentioned shared data refer to the data that are simultaneously present in plural tab;
In the embodiment of the present invention, what adopt multipage label technology exists a plurality of tabs to quote the situation of identical data at line products (if SaaS is at line products), also has the situation of above-mentioned shared data.
Updating block 402, while there are for detect the above-mentioned tab when front opening when detecting unit 401 the shared data that need renewal, upgrades the above-mentioned shared data of upgrading that need in the tab of front opening.
In a kind of implementation of the present invention, the renewal status indicator that monitored variable records all shared data in one or more tab is set, and set to upgrade status indicator be the shared data of the first sign shared data for needing to upgrade, set that to upgrade status indicator be the shared data of the second sign shared data for not needing to upgrade.On basis embodiment illustrated in fig. 4, as shown in Figure 5, detecting unit 401 comprises: detection sub-unit 4011, for the renewal status indicator of working as all shared data in the tab of front opening that monitored variable is recorded, detect, determining unit 4012, for when existing renewal status indicator to be the shared data of the first sign, the shared data that definite renewal status indicator is the first sign are for needing the shared data of renewal; When existing renewal status indicator to be the shared data of the second sign, the shared data of the shared data that definite renewal status indicator is the second sign for not needing to upgrade.Further, on basis embodiment illustrated in fig. 5, as shown in Figure 6, data update apparatus 600 also comprises: first revises unit 403, for in above-mentioned monitored variable, the renewal status indicator of the shared data of having upgraded of the tab when front opening is revised as to above-mentioned the second sign.
Alternatively, in above-mentioned monitored variable, also recording the renewal status indicator of all shared data of other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the above-mentioned tab when front opening one or more bookmark in same page framework.On Fig. 5 or basis embodiment illustrated in fig. 6, data update apparatus, also comprise: second revises unit, for when user being detected the first data of the tab when front opening modified, in above-mentioned monitored variable, the renewal status indicator of above-mentioned first data of other tab that comprises above-mentioned the first data is revised as to above-mentioned the second sign.
Alternatively, above-mentioned the first sign and second is designated different numerals; Or above-mentioned the first sign and second to be designated different numerals be different characters; Or above-mentioned first be designated numeral, second is designated character; Or above-mentioned first be designated character, second is designated numeral.The embodiment of the present invention does not limit particular type and the value of the first sign and the second sign.
In the another kind of implementation of the present invention, on basis embodiment illustrated in fig. 4, detecting unit 401 comprises: comparing unit, for relatively working as the tab of front opening, share the modification time of data and the modification time of the same shared data in other tab, wherein, above-mentioned other tab refers to except above-mentioned when the tab of front opening, with the bookmark of the above-mentioned tab when front opening in same page framework; Determining unit, for when above-mentioned comparing unit, compare when the tab of front opening, share data modification time not for the latest time, determine that above-mentioned shared data need renewal; When above-mentioned comparing unit compares in the tab of front opening the modification time of sharing data for the latest time, determine that above-mentioned shared data do not need renewal.
It should be noted that, the data update apparatus of the present embodiment can be as the data update apparatus in above-mentioned embodiment of the method, can be for realizing the whole technical schemes in said method embodiment, the function of its each functional module can be according to the method specific implementation in said method embodiment, its specific implementation process can, with reference to the associated description in above-described embodiment, repeat no more herein.
Therefore, data update apparatus in the embodiment of the present invention is worked as the shared data that whether exist needs to upgrade in the tab of front opening by detection, and during the shared data of exist to need upgrading in the tab when front opening, the shared data that need to upgrade in the tab of front opening are upgraded, on the one hand, the invention provides the mechanism of the data in automatic renewal tab, without user, click refresh button and trigger renewal, on the other hand, the present invention only just upgrades these shared data when shared data need to be upgraded, thereby the waste of the bandwidth resources that can avoid data to not needing to upgrade also to upgrade and cause, the bandwidth resources that taken while effectively having saved Data Update.
It should be noted that, for aforesaid each embodiment of the method, for easy description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the present invention is not subject to the restriction of described sequence of movement, because according to the present invention, some step can adopt other order or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action and module might not be all that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part of detailed description, can be referring to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), random access memory, disk or CD etc.
Above a kind of data-updating method and relevant apparatus that is applied to multipage label provided by the present invention is described in detail, for one of ordinary skill in the art, thought according to the embodiment of the present invention, all will change in specific embodiments and applications, to sum up, this description should not be construed as limitation of the present invention.