Summary of the invention
Fundamental purpose of the present invention is to provide a kind of statistical method and the device of sharing capacity of returns, cannot count on the real problem sharing capacity of returns to solve.
To achieve these goals, according to an aspect of the present invention, a kind of statistical method sharing capacity of returns is provided.The method comprises: obtain and access corresponding station address uniform resource position mark URL with this, above-mentioned URL is for accessing by the address of sharing website; Judge whether to exist in above-mentioned URL carry above-mentioned by the anchor chain sharing identification information of sharing website; And if judge in above-mentioned URL exist carry above-mentioned by the above-mentioned anchor chain sharing identification information of sharing website, then by this acess control for once to share capacity of returns.
Further, by this acess control for before once sharing capacity of returns, above-mentioned statistical method also comprises: if judge that in above-mentioned URL, existence carries above-mentioned by the above-mentioned anchor chain sharing identification information of sharing website, then verify that whether above-mentioned anchor chain is correct, wherein, if it is correct to verify above-mentioned anchor chain, then performing this acess control is the step once sharing capacity of returns.
Further, verify whether above-mentioned anchor chain correctly comprises: obtain the key word and the key word obtaining the social media for providing above-mentioned URL of accessing corresponding current site with this; According to the key word of above-mentioned current site, above-mentioned for providing the key word of the social media of above-mentioned URL and above-mentioned URL to generate cryptographic hash to be verified; And verify that whether above-mentioned cryptographic hash to be verified is consistent with default cryptographic hash, wherein, if above-mentioned cryptographic hash to be verified is consistent with above-mentioned default cryptographic hash, then above-mentioned anchor chain is correct, if above-mentioned cryptographic hash to be verified and above-mentioned default cryptographic hash inconsistent, then above-mentioned anchor chain mistake.
Further, generate above-mentioned default cryptographic hash in the following manner: obtain above-mentioned by the key word of the key word of sharing website, target social media and above-mentioned URL, above-mentioned target social media is above-mentioned by the social media of the content of sharing website for sharing; And generated above-mentioned default cryptographic hash according to above-mentioned by the key word of the key word of sharing website, above-mentioned target social media and above-mentioned URL.
Further, above-mentioned anchor chain also carries this and shares above-mentioned by the timestamp of sharing website, while being once share capacity of returns by this acess control, above-mentioned statistical method also comprises: this obtaining entrained by above-mentioned anchor chain is shared above-mentioned by the above-mentioned timestamp of sharing website; Determine that this accesses the degree of association shared with this according to the above-mentioned timestamp obtained; And to share according to above-mentioned degree of association statistics and this and corresponding share capacity of returns.
Further, in the following manner above-mentioned anchor chain is added in above-mentioned URL: judge whether there is original anchor chain in above-mentioned URL; If judge to there is above-mentioned original anchor chain in above-mentioned URL, then first delete above-mentioned original anchor chain, then carry the above-mentioned anchor chain sharing identification information by sharing website be added into above-mentioned in above-mentioned URL.
To achieve these goals, according to a further aspect in the invention, a kind of statistic device sharing capacity of returns is provided.This device comprises: the first acquiring unit, accesses corresponding station address uniform resource position mark URL for obtaining with this, and above-mentioned URL is for accessing by the address of sharing website; Judging unit, for judge whether to exist in above-mentioned URL carry above-mentioned by the anchor chain sharing identification information of sharing website; And first statistic unit, for judge to exist in above-mentioned URL carry above-mentioned by sharing website share the above-mentioned anchor chain of identification information time, by this acess control for once to share capacity of returns.
Further, above-mentioned statistic device also comprises: authentication unit, for by this acess control for before once sharing capacity of returns, judge in above-mentioned URL exist carry above-mentioned by sharing website share the above-mentioned anchor chain of identification information time, verify that whether above-mentioned anchor chain is correct, wherein, when verifying above-mentioned anchor chain and being correct, then perform the function of above-mentioned first statistic unit.
Further, above-mentioned authentication unit comprises: acquisition module, for obtaining the key word of accessing corresponding current site with this and obtaining the key word of the social media for providing above-mentioned URL; Generation module, for the key word according to above-mentioned current site, above-mentioned for providing the key word of the social media of above-mentioned URL and above-mentioned URL to generate cryptographic hash to be verified; And authentication module, whether consistent with default cryptographic hash for verifying above-mentioned cryptographic hash to be verified, wherein, if above-mentioned cryptographic hash to be verified is consistent with above-mentioned default cryptographic hash, then above-mentioned anchor chain is correct, if above-mentioned cryptographic hash to be verified and above-mentioned default cryptographic hash inconsistent, then above-mentioned anchor chain mistake.
Further, above-mentioned statistic device also comprises: generation unit, above-mentioned generation unit generates above-mentioned default cryptographic hash in the following manner: obtain above-mentioned by the key word of the key word of sharing website, target social media and above-mentioned URL, and above-mentioned target social media is above-mentioned by the social media of the content of sharing website for sharing; And generated above-mentioned default cryptographic hash according to above-mentioned by the key word of the key word of sharing website, above-mentioned target social media and above-mentioned URL.
Further, above-mentioned anchor chain also carries this and shares above-mentioned by the timestamp of sharing website, above-mentioned statistic device also comprises: second acquisition unit, for while being once share capacity of returns by this acess control, this obtaining entrained by above-mentioned anchor chain is shared above-mentioned by the above-mentioned timestamp of sharing website; Determining unit, for determining that according to the above-mentioned timestamp obtained this accesses the degree of association shared with this; And second statistic unit, corresponding share capacity of returns for sharing according to above-mentioned degree of association statistics and this.
Further, above-mentioned statistic device also comprises: adding device, and above-mentioned adding device is used for being added in above-mentioned URL by above-mentioned anchor chain in the following manner: judge whether there is original anchor chain in above-mentioned URL; If judge to there is above-mentioned original anchor chain in above-mentioned URL, then first delete above-mentioned original anchor chain, then carry the above-mentioned anchor chain sharing identification information by sharing website be added into above-mentioned in above-mentioned URL.
By the present invention, adopt to obtain and access corresponding station address URL with this, URL is for accessing by the address of sharing website; Judge in URL, whether to there is the anchor chain sharing identification information carried by sharing website; And if judge in URL exist carry by the anchor chain sharing identification information of sharing website, then by this acess control for once to share capacity of returns, solve in correlation technique and cannot count on the real problem sharing capacity of returns, and then reach and can count on the real effect sharing capacity of returns.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
The application's scheme is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the embodiment of the application's part, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
It should be noted that, term " first ", " second " etc. in the instructions of the application and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged, in the appropriate case so that the embodiment of the application described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
According to embodiments of the invention, provide a kind of statistical method sharing capacity of returns.This statistical method sharing capacity of returns may operate on computer-processing equipment.
Fig. 1 is the process flow diagram sharing the statistical method of capacity of returns according to the embodiment of the present invention.As shown in Figure 1, the method comprises following step S102 to step S106:
Step S102, obtains and accesses corresponding station address URL with this.
URL (Uniform Resource Locator, URL(uniform resource locator)) is for accessing by the address of sharing website.Such as, if this access is the official website of " Central People's Government of the People's Republic of China ", what then obtain accesses corresponding station address URL for " www.gov.cn " with this, wherein, " www.gov.cn " is the address of official website for accessing " Central People's Government of the People's Republic of China ", and " Central People's Government of the People's Republic of China " website be share that product shares by sharing website.Share product and comprise the plug-in unit of front end and the server of rear end.After the plug-in unit of front end is triggered, the server of rear end performs to be shared accordingly and shares capacity of returns statistical treatment.It should be noted that, the plug-in unit sharing the front end of product be arranged on need on the website of sharing.
Step S104, judges whether there is the anchor chain sharing identification information carried by sharing website in URL.
In practice, when user triggers sharing function by the plug-in unit sharing the front end of product, when implementing to share to current page, then this server sharing the rear end of product first can add one after by the page path URL of sharing website and carries this by the anchor chain sharing identification information of sharing website.Wherein, share the unique identification information that identification information is anchor chain, and wherein include URL by the information of target social media shared.Like this, when there being user to access current page, can by judge access page path URL after whether carry mark this anchor chain shared determine whether this acess control as sharing capacity of returns.
Step S106, if judge in URL exist carry by the anchor chain sharing identification information of sharing website, then by this acess control for once to share capacity of returns.
If judging to exist in URL carries by the anchor chain sharing identification information of sharing website, then think that this access brought shares backflow for this is shared, thus by this acess control for once to share capacity of returns; If judging to exist in URL carries by the anchor chain sharing identification information of sharing website, then think that this access brought shares backflow for other are shared, thus not by this acess control for once to share capacity of returns.
Pass through the embodiment of the present invention, due to a unique mark can be done for sharing each time of user, and the relevant information of this mark is added into shares for each time in corresponding URL, therefore, as long as the backflow access that the URL that with the addition of identification information by this carries out just is shared for this time the capacity of returns of sharing brought by statistics, reach and can count on the real effect sharing capacity of returns.
Preferably, in embodiments of the present invention, in step S106 by this acess control for before once sharing capacity of returns, this statistical method can also comprise:
S2, if judging to exist in URL carries by the anchor chain sharing identification information of sharing website, then verify that whether anchor chain is correct, wherein, if it is correct to verify anchor chain, then performing this acess control is the step once sharing capacity of returns; If verify anchor chain mistake, then not performing this acess control is the step once sharing capacity of returns.
Owing to being shared to after target social media by the related content of sharing website by this, user in this target social media can forward it in other social media, like this, user in other social media can access by sharing website again, the source of this access owing to not being target social media, be not therefore this share share capacity of returns.Such as, user A by the related content of " Central People's Government of the People's Republic of China " official website by after sharing the Sina's microblogging to oneself for the N time, the microblogging of the related content of " Central People's Government of the People's Republic of China " official website is forwarded to Tengxun's microblogging again by the user B of user A in the circle of friends of Sina's microblogging, now, the user C URL according to the related content of " Central People's Government of the People's Republic of China " official website corresponding to of user B in the circle of friends of Tengxun's microblogging conducts interviews, the source of this access is Tengxun's microblogging, instead of Sina's microblogging, therefore not brought share capacity of returns sharing for the N time of user A.
By the embodiment of the present invention, the statistics sharing capacity of returns more accurately can be obtained.
Further preferably, in embodiments of the present invention, S2 verifies whether anchor chain correctly can comprise:
S22, obtains the key word and the key word obtaining the social media for the source as URL of accessing corresponding current site with this;
S24, the key word according to current site, the key word for the social media in the source as URL and URL generate cryptographic hash to be verified; And
S26, verifies that whether cryptographic hash to be verified consistent with default cryptographic hash, and wherein, cryptographic hash to be verified is consistent with default cryptographic hash, then anchor chain is correct, cryptographic hash to be verified and default cryptographic hash inconsistent, then anchor chain mistake.Further, when anchor chain is correct, by this acess control for once to share capacity of returns; When anchor chain mistake, capacity of returns statistics is not shared to this access.
Owing to the addition of unique anchor chain for sharing link (that is, URL) when sharing, therefore needing first to verify when adding up capacity of returns and whether sharing in link (that is, URL) containing anchor chain.If containing anchor chain, then verify that whether anchor chain is correct further.If not containing anchor chain, then without the need to verifying that whether anchor chain correct further, because if there is no anchor chain, then certainly can not by this acess control for sharing capacity of returns.
Owing to containing anchor chain in URL, and when verifying that whether anchor chain accurate, need to be verified by the information in anchor chain, therefore when statistics shares capacity of returns, can access (namely from this, current accessed) URL in containing anchor chain resolve current site key word (as, the key word of current site title), the key word of URL and the social media as the source of this URL (as, key word as the title of the social media in the source of this URL), and generate cryptographic hash to be verified according to analysis result.
During due to anchor chain mistake, be likely simulation share backflow, and and really share backflow, by the embodiment of the present invention, can prevent some share product malice simulation share backflow, cause statistics virtual height.
Preferably, in embodiments of the present invention, aforesaid default cryptographic hash can be generated in the following manner:
S4, obtains by the key word of the key word of sharing website, target social media and URL, and target social media is for sharing by the social media of the content of sharing website; And
S6, presets cryptographic hash according to being generated by the key word of the key word of sharing website, target social media and URL.
Particularly, can perform the above-mentioned steps in the present embodiment when sharing, like this, can be eachly added a unique anchor chain by the URL shared when sharing.Because URL has length restriction, therefore when adding the anchor chain after URL, the expression can simplified by above-mentioned key word by the sharing information of the key of sharing website and target social media, thus generates a brief cryptographic hash, and using the part of this cryptographic hash as anchor chain.
Preferably, in embodiments of the present invention, anchor chain is shared except identification information except carrying by sharing website, also carrying this shares middle by the timestamp of sharing website, like this, while this acess control is once share capacity of returns step by execution, this statistical method can also comprise:
S8, this entrained by acquisition anchor chain is shared by the timestamp of sharing website;
According to the timestamp obtained, S10, determines that this accesses the degree of association shared with this; And
S12, shares according to degree of association statistics and this and corresponding shares capacity of returns.
Because system can record this concrete time point shared, and entrained this is shared by this concrete time point shared of the system log (SYSLOG) just of the time point on the timestamp of sharing website in anchor chain, therefore anchor chain exist between sharing with this one time correlation relation, that is, the degree of association.Like this, when this access produces, can according to access with this anchor chain that is associated and this share between the degree of association determine that this accesses whether to be shared by this and brought.Wherein, brought if determine that this access is shared by this, then this access added up as this capacity of returns of once sharing shared; Otherwise, then do not take statistics.
It should be noted that, the cryptographic hash in above-described embodiment and the timestamp in the present embodiment can be added into simultaneously be about to by the URL that shares, and using they unique anchor chains as this URL.
Because the timestamp in anchor chain can be associated with in concrete sharing exactly, therefore, pass through the embodiment of the present invention, the object sharing backflow quantitative statistics grain size refinement can be realized, thus can not only count on each social media always share capacity of returns and every day share capacity of returns, and can be added up certain share and brought share capacity of returns, and in certain period this certain share and brought share capacity of returns.
Preferably, in embodiments of the present invention, can in the following manner anchor chain be added in URL:
S14, judges whether there is original anchor chain in URL; And
S16, if judge to there is original anchor chain in URL, then first deletes original anchor chain, then is added into carrying in URL by the anchor chain sharing identification information of sharing website.
Also namely, if share link self originally just have anchor chain, then first remove and share the anchor chain that in link, self just has originally, share after link the default anchor chain generated in previous embodiment is added to, and then complete and share.
Because some URL self is with anchor chain, like this, if directly add new anchor chain after these URL, then these URL can be caused unavailable.And these URL self with anchor chain just location is played to the page, therefore, when sharing these URL, need first to delete original anchor chain, again the anchor chain with mark effect generated in previous embodiment is added after these URL, and finally complete and share.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
According to embodiments of the invention, provide a kind of statistic device sharing capacity of returns.It should be noted that, the statistical method of capacity of returns that what the embodiment of the present invention provided share can be performed by the statistic device sharing capacity of returns of the embodiment of the present invention, and the statistic device sharing capacity of returns of the embodiment of the present invention also may be used for the statistical method sharing capacity of returns performing the embodiment of the present invention.
Fig. 2 is the schematic diagram sharing the statistic device of capacity of returns according to the embodiment of the present invention.As shown in Figure 2, this device comprises: the first acquiring unit 10, judging unit 20 and the first statistic unit 30.First acquiring unit 10 accesses corresponding station address URL for obtaining with this, and URL is for accessing by the address of sharing website; Whether judging unit 20 exists for judging the anchor chain sharing identification information carried by sharing website in URL; And first statistic unit 30 for judge in URL exist carry by sharing website share the anchor chain of identification information time, by this acess control for once to share capacity of returns.
URL is for accessing by the address of sharing website.Such as, if this access is the official website of " Central People's Government of the People's Republic of China ", what then obtain accesses corresponding station address URL for " www.gov.cn " with this, wherein, " www.gov.cn " is the address of official website for accessing " Central People's Government of the People's Republic of China ", and " Central People's Government of the People's Republic of China " website be share that product shares by sharing website.Share product and comprise the plug-in unit of front end and the server of rear end.After the plug-in unit of front end is triggered, the server of rear end performs to be shared accordingly and shares capacity of returns statistical treatment.It should be noted that, the plug-in unit sharing the front end of product be arranged on need on the website of sharing.
In practice, when user triggers sharing function by the plug-in unit sharing the front end of product, when implementing to share to current page, then this server sharing the rear end of product first can add one after by the page path URL of sharing website and carries this by the anchor chain sharing identification information of sharing website.Wherein, share the unique identification information that identification information is anchor chain, and wherein include URL by the information of target social media shared.Like this, when there being user to access current page, can by judge access page path URL after whether carry mark this anchor chain shared determine whether this acess control as sharing capacity of returns.
If judging to exist in URL carries by the anchor chain sharing identification information of sharing website, then think that this access brought shares backflow for this is shared, thus by this acess control for once to share capacity of returns; If judging to exist in URL carries by the anchor chain sharing identification information of sharing website, then think that this access brought shares backflow for other are shared, thus not by this acess control for once to share capacity of returns.
Pass through the embodiment of the present invention, due to a unique mark can be done for sharing each time of user, and the relevant information of this mark is added into shares for each time in corresponding URL, therefore, as long as the backflow access that the URL that with the addition of identification information by this carries out just is shared for this time the capacity of returns of sharing brought by statistics, reach and can count on the real effect sharing capacity of returns.
Preferably, in embodiments of the present invention, this statistic device also comprises: authentication unit.Authentication unit be used for by this acess control for before once sharing capacity of returns, judge to exist in URL carry by sharing website share the anchor chain of identification information time, whether checking anchor chain correct, wherein, when verifying anchor chain and being correct, then perform the function of the first statistic unit.
Owing to being shared to after target social media by the related content of sharing website by this, user in this target social media can forward it in other social media, like this, user in other social media can access by sharing website again, the source of this access owing to not being target social media, be not therefore this share share capacity of returns.Such as, user A by the related content of " Central People's Government of the People's Republic of China " official website by after sharing the Sina's microblogging to oneself for the N time, the microblogging of the related content of " Central People's Government of the People's Republic of China " official website is forwarded to Tengxun's microblogging again by the user B of user A in the circle of friends of Sina's microblogging, now, the user C URL according to the related content of " Central People's Government of the People's Republic of China " official website corresponding to of user B in the circle of friends of Tengxun's microblogging conducts interviews, the source of this access is Tengxun's microblogging, instead of Sina's microblogging, therefore not brought share capacity of returns sharing for the N time of user A.
By the embodiment of the present invention, the statistics sharing capacity of returns more accurately can be obtained.
Further preferably, in embodiments of the present invention, authentication unit can comprise: acquisition module, generation module and authentication module.Acquisition module is for obtaining the key word of accessing corresponding current site with this and obtaining the key word of the social media for the source as URL; Generation module is used for the key word according to current site, the key word for the social media in the source as URL and URL and generates cryptographic hash to be verified; And authentication module is for verifying that whether cryptographic hash to be verified consistent with default cryptographic hash, wherein, cryptographic hash to be verified is consistent with default cryptographic hash, then anchor chain is correct, cryptographic hash to be verified and default cryptographic hash inconsistent, then anchor chain mistake.Further, when anchor chain is correct, by this acess control for once to share capacity of returns; When anchor chain mistake, capacity of returns statistics is not shared to this access.
Owing to the addition of unique anchor chain for sharing link (that is, URL) when sharing, therefore needing first to verify when adding up capacity of returns and whether sharing in link (that is, URL) containing anchor chain.If containing anchor chain, then verify that whether anchor chain is correct further.If not containing anchor chain, then without the need to verifying that whether anchor chain correct further, because if there is no anchor chain, then certainly can not by this acess control for sharing capacity of returns.
Owing to containing anchor chain in URL, and when verifying that whether anchor chain accurate, need to be verified by the information in anchor chain, therefore when statistics shares capacity of returns, can access (namely from this, current accessed) URL in containing anchor chain resolve current site key word (as, the key word of current site title), the key word of URL and the social media as the source of this URL (as, key word as the title of the social media in the source of this URL), and generate cryptographic hash to be verified according to analysis result.
During due to anchor chain mistake, be likely simulation share backflow, and and really share backflow, by the embodiment of the present invention, can prevent some share product malice simulation share backflow, cause statistics virtual height.
Preferably, in embodiments of the present invention, this statistic device can also comprise: generation unit.This generation unit may be used for generating default cryptographic hash in the following manner: obtain by the key word of the key word of sharing website, target social media and URL, and target social media is for sharing by the social media of the content of sharing website; And preset cryptographic hash according to being generated by the key word of the key word of sharing website, target social media and URL.
Particularly, can perform the above-mentioned steps in the present embodiment when sharing, like this, can be eachly added a unique anchor chain by the URL shared when sharing.Because URL is according to there being length to limit, therefore when adding the anchor chain after URL, the expression can simplified by above-mentioned key word by the sharing information of the key of sharing website and target social media, thus generates a brief cryptographic hash, and using the part of this cryptographic hash as anchor chain.
Preferably, in embodiments of the present invention, anchor chain is shared except identification information except carrying by sharing website, also carries this and shares by the timestamp of sharing website, like this, this statistic device can also comprise: second acquisition unit, determining unit and the second statistic unit.Second acquisition unit is used for while being once share capacity of returns by this acess control, and this entrained by acquisition anchor chain is shared by the timestamp of sharing website; Determining unit is used for determining that this accesses the degree of association shared with this according to the timestamp obtained; And second statistic unit be used for sharing according to degree of association statistics and this corresponding sharing capacity of returns.
It should be noted that, the cryptographic hash in above-described embodiment and the timestamp in the present embodiment can be added into simultaneously be about to by the URL that shares, and using they unique anchor chains as this URL.
Because the timestamp in anchor chain can be associated with in concrete sharing exactly, therefore, pass through the embodiment of the present invention, the object sharing backflow quantitative statistics grain size refinement can be realized, thus can not only count on each social media always share capacity of returns and every day share capacity of returns, and can be added up certain share and brought share capacity of returns, and in certain period this certain share and brought share capacity of returns.
Preferably, in embodiments of the present invention, this statistic device can also comprise: adding device.Adding device may be used for being added in URL by anchor chain in the following manner: judge whether there is original anchor chain in URL; If judge to there is original anchor chain in URL, then first delete original anchor chain, then be added into carrying in URL by the anchor chain sharing identification information of sharing website.
Also namely, if share link self originally just have anchor chain, then first remove and share the anchor chain that in link, self just has originally, share after link the default anchor chain generated in previous embodiment is added to, and then complete and share.
Because some URL self is with anchor chain, like this, if directly add new anchor chain after these URL, then these URL can be caused unavailable.And these URL self with anchor chain just location is played to the page, therefore, when sharing these URL, need first to delete original anchor chain, again the anchor chain with mark effect generated in aforementioned enforcement is added after these URL, and finally complete and share.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.