CN108255878B - User information processing method and related device - Google Patents
User information processing method and related device Download PDFInfo
- Publication number
- CN108255878B CN108255878B CN201611250144.8A CN201611250144A CN108255878B CN 108255878 B CN108255878 B CN 108255878B CN 201611250144 A CN201611250144 A CN 201611250144A CN 108255878 B CN108255878 B CN 108255878B
- Authority
- CN
- China
- Prior art keywords
- webpage
- user information
- domain name
- web page
- domain
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9558—Details of hyperlinks; Management of linked annotations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种用户信息传递方法,具体地,终端加载第一网页后,第一网页的Tracker在第一网页包含的网页元素中,查找链接地址指向第二网页的元素,并在查找到的元素的链接地址上,添加第一网页记录的用户信息。该链接地址指向第二网页,因此,终端由第一网页跳转至第二网页后,第二网页的Tracker可在该链接地址内提取用户信息,从而实现了将第一网页的用户信息传递至第二网页。
The invention discloses a method for transmitting user information. Specifically, after a terminal loads a first web page, the Tracker of the first web page searches for the element whose link address points to the second web page among the web page elements contained in the first web page, and finds the element whose link address points to the second web page. On the link address of the element, add the user information recorded on the first web page. The link address points to the second web page. Therefore, after the terminal jumps from the first web page to the second web page, the Tracker of the second web page can extract the user information from the link address, thereby realizing the transmission of the user information of the first web page to the second web page. Second page.
Description
技术领域technical field
本发明涉及互联网技术领域,更具体地,是用户信息处理方法及相关装置。The present invention relates to the field of Internet technology, and more particularly, to a user information processing method and a related device.
背景技术Background technique
用户在访问某个网站时,可以点击该网站页面内的一个链接,以进入另一网站的页面。需要说明的是,跳转前后的网页属于两个不同的网站。When a user visits a website, he or she can click a link in the page of the website to enter the page of another website. It should be noted that the webpages before and after the jump belong to two different websites.
例如,用户在访问淘宝页面时,点击该页面内的一个商品图片后,出现提示信息,询问用户是否进入天猫页面,若用户选择是,则从淘宝页面跳转到天猫页面。For example, when a user visits a Taobao page and clicks on a product image in the page, a prompt message appears, asking the user whether to enter the Tmall page. If the user chooses yes, the user will jump from the Taobao page to the Tmall page.
但是,用户在跳转前网页的个人信息无法传递至跳转后的网页,跳转后的网页无法使用该用户的个人信息。However, the user's personal information on the web page before the jump cannot be transferred to the web page after the jump, and the user's personal information cannot be used on the web page after the jump.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的用户信息传递方法。In view of the above problems, the present invention is proposed to provide a user information delivery method that overcomes the above problems or at least partially solves the above problems.
为实现所述目的,本申请提供以下技术方案:To achieve the purpose, the application provides the following technical solutions:
第一方面,本申请提供了一种用户信息处理方法,包括:In a first aspect, the present application provides a method for processing user information, including:
加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页;其中,所述第一网页与所述第二网页的主域不同;After loading the first web page, determine a preset second web page to which the user information of the first web page is allowed to be transferred; wherein the primary domain of the first web page is different from that of the second web page;
在所述第一网页的所有网页元素中,查找链接地址指向所述第二网页的目标元素;In all web page elements of the first web page, search for a target element whose link address points to the second web page;
获取所述第一网页中的用户信息,将所述用户信息添加在所述目标元素的所述链接地址中。Obtain user information in the first webpage, and add the user information to the link address of the target element.
可选地,所述加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页,包括:Optionally, after the first webpage is loaded, determining a preset second webpage to which the user information of the first webpage is allowed to be transmitted, including:
加载第一网页后,确定所述第一网页的主域;After loading the first webpage, determine the main domain of the first webpage;
从预设的网页主域集合中,提取所述第一网页的主域之外的网页主域,并将提取到的网页主域确定为第二网页的主域。From the preset main domain set of webpages, the main domains of webpages other than the main domain of the first webpage are extracted, and the main domain of the extracted webpage is determined as the main domain of the second webpage.
可选地,所述加载第一网页后,确定所述第一网页的主域,包括:Optionally, after the first webpage is loaded, determining the main domain of the first webpage includes:
加载第一网页后,从所述第一网页的域名中提取第一个标志位之后的字符串;After loading the first web page, extract the string after the first flag bit from the domain name of the first web page;
若所述字符串的长度小于3,则将所述字符串确定为第一网页的主域;If the length of the character string is less than 3, the character string is determined as the main domain of the first web page;
若所述字符串的长度并非小于3但所述字符串同时包括预设的顶级域名集合中的域名元素及预设的二级域名集合中的域名元素,则将所述字符串中倒数三个域名元素及之间的标志位确定为第一网页的主域;If the length of the character string is not less than 3 but the character string includes both the domain name element in the preset top-level domain name set and the domain name element in the preset second-level domain name set, the last three in the string The domain name elements and the flags between them are determined as the main domain of the first web page;
若所述字符串的长度并非小于3且所述字符串并非同时包括预设的顶级域名集合中的域名元素及预设的二级域名集合中的域名元素,则将所述字符串中倒数两个域名元素及之间的标志位确定为第一网页的主域。If the length of the character string is not less than 3 and the character string does not include both the domain name element in the preset top-level domain name set and the domain name element in the preset second-level domain name set, the last two in the string will be counted. The domain name elements and the flag bits between them are determined as the main domain of the first web page.
第二方面,本申请提供了一种用户信息处理方法,包括:In a second aspect, the present application provides a method for processing user information, including:
加载由第一网页跳转至的第二网页后,从所述第二网页的链接地址中提取用户信息;其中,所述用户信息为所述第一网页中的用户信息;After loading the second webpage jumped from the first webpage, user information is extracted from the link address of the second webpage; wherein, the user information is the user information in the first webpage;
将所述用户信息保存为所述第二网页的用户信息。The user information is saved as the user information of the second webpage.
第三方面,本申请提供了一种用户信息处理方法,包括:In a third aspect, the present application provides a method for processing user information, including:
加载模块加载第一网页;The loading module loads the first web page;
第一网页的追踪器基于加载模块的触发,确定预设的允许将第一网页的用户信息传递至的第二网页,在第一网页的所有网页元素中,查找链接地址指向第二网页的目标元素,并获取第一网页中的用户信息,将用户信息添加在目标元素的链接地址中;Based on the trigger of the loading module, the tracker of the first web page determines a preset second web page to which the user information of the first web page is allowed to be transferred, and searches all the web page elements of the first web page for the target whose link address points to the second web page element, and obtain the user information in the first web page, and add the user information to the link address of the target element;
加载模块基于用户对第一网页中的目标元素的触发,向所述目标元素对应的服务器发送所述链接地址;The loading module sends the link address to the server corresponding to the target element based on the user's triggering of the target element in the first web page;
服务器接收到所述链接地址后,将所述链接地址封装在所述第二网页中发送至加载模块;After receiving the link address, the server encapsulates the link address in the second webpage and sends it to the loading module;
加载模块加载第二网页;The loading module loads the second web page;
第二网页的追踪器基于加载模块的触发,从第二网页的链接地址中提取用户信息,并将提取到的用户信息保存为第二网页的用户信息;Based on the trigger of the loading module, the tracker of the second webpage extracts user information from the link address of the second webpage, and saves the extracted user information as the user information of the second webpage;
加载模块基于第二网页的追踪器的触发,将第二网页的用户信息发送至服务器;The loading module sends the user information of the second webpage to the server based on the trigger of the tracker of the second webpage;
服务器将所述用户信息对应的用户设置为在第二网页中的登录状态。The server sets the user corresponding to the user information as the login state in the second webpage.
第四方面,本申请提供了一种用户信息处理装置,包括:In a fourth aspect, the present application provides a user information processing device, including:
第二网页确定模块,用于加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页;其中,所述第一网页与所述第二网页的主域不同;The second webpage determining module is configured to determine a preset second webpage to which the user information of the first webpage is allowed to be transmitted after the first webpage is loaded; wherein, the main pages of the first webpage and the second webpage are different domains;
目标元素查找模块,用于在所述第一网页的所有网页元素中,查找链接地址指向所述第二网页的目标元素;a target element search module, configured to search for a target element whose link address points to the second web page among all the web page elements of the first web page;
链接地址添加模块,用于获取所述第一网页中的用户信息,将所述用户信息添加在所述目标元素的所述链接地址中。A link address adding module is configured to acquire user information in the first web page, and add the user information to the link address of the target element.
可选地,在所述加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页的方面,所述第二网页确定模块具体用于:Optionally, after the first webpage is loaded, a preset aspect of the second webpage to which the user information of the first webpage is allowed to be transmitted is determined, and the second webpage determination module is specifically configured to:
加载第一网页后,确定所述第一网页的主域;After loading the first webpage, determine the main domain of the first webpage;
从预设的网页主域集合中,提取所述第一网页的主域之外的网页主域,并将提取到的网页主域确定为第二网页的主域。From the preset main domain set of webpages, the main domains of webpages other than the main domain of the first webpage are extracted, and the main domain of the extracted webpage is determined as the main domain of the second webpage.
可选地,在所述加载第一网页后,确定所述第一网页的主域的方面,所述第二网页确定模块具体用于:Optionally, after the first webpage is loaded, the aspect of the main domain of the first webpage is determined, and the second webpage determination module is specifically configured to:
加载第一网页后,从所述第一网页的域名中提取第一个标志位之后的字符串;After loading the first web page, extract the string after the first flag bit from the domain name of the first web page;
若所述字符串的长度小于3,则将所述字符串确定为第一网页的主域;If the length of the character string is less than 3, the character string is determined as the main domain of the first web page;
若所述字符串的长度并非小于3但所述字符串同时包括预设的顶级域名集合中的域名元素及预设的二级域名集合中的域名元素,则将所述字符串中倒数三个域名元素及之间的标志位确定为第一网页的主域;If the length of the character string is not less than 3 but the character string includes both the domain name element in the preset top-level domain name set and the domain name element in the preset second-level domain name set, the last three in the string The domain name elements and the flags between them are determined as the main domain of the first web page;
若所述字符串的长度并非小于3且所述字符串并非同时包括预设的顶级域名集合中的域名元素及预设的二级域名集合中的域名元素,则将所述字符串中倒数两个域名元素及之间的标志位确定为第一网页的主域。If the length of the character string is not less than 3 and the character string does not include both the domain name element in the preset top-level domain name set and the domain name element in the preset second-level domain name set, the last two in the string will be counted. The domain name elements and the flag bits between them are determined as the main domain of the first web page.
第五方面,本申请提供了一种用户信息处理装置,包括:In a fifth aspect, the present application provides a user information processing device, including:
用户信息提取模块,用于加载由第一网页跳转至的第二网页后,从所述第二网页的链接地址中提取用户信息;其中,所述用户信息为所述第一网页中的用户信息;A user information extraction module, configured to extract user information from the link address of the second webpage after loading the second webpage jumped from the first webpage; wherein the user information is the user in the first webpage information;
用户信息保存模块,用于将所述用户信息保存为所述第二网页的用户信息。A user information saving module, configured to save the user information as the user information of the second webpage.
第六方面,本申请提供了一种终端,包括:上述第四方面提供的用户信息处理装置及第五方面提供的用户信息处理装置。In a sixth aspect, the present application provides a terminal, including: the user information processing apparatus provided in the fourth aspect and the user information processing apparatus provided in the fifth aspect.
借由上述技术方案,本发明提供的用户信息传递方法,终端加载第一网页后,在第一网页包含的网页元素中,查找链接地址指向第二网页的元素,并在查找到的元素的链接地址上,添加第一网页记录的用户信息。该链接地址指向第二网页,因此,终端由第一网页跳转至第二网页后,可在该链接地址内提取用户信息,从而实现了将第一网页的用户信息传递至第二网页。With the above technical solution, in the user information transmission method provided by the present invention, after the terminal loads the first web page, it searches for the element whose link address points to the second web page among the web page elements contained in the first web page, and finds the link of the found element. Add the user information recorded on the first webpage to the address. The link address points to the second web page. Therefore, after the terminal jumps from the first web page to the second web page, the terminal can extract user information from the link address, thereby realizing the transfer of the user information of the first web page to the second web page.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention. In order to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other objects, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:
图1示出了本申请提供的应用在终端上的用户信息传递方法的流程图;Fig. 1 shows the flow chart of the user information transfer method applied on the terminal provided by the present application;
图2示出了本申请提供的用户信息提取方法的流程图;Fig. 2 shows the flow chart of the user information extraction method provided by the present application;
图3示出了本申请提供的应用在系统上的用户信息传递方法的流程图;Fig. 3 shows the flow chart of the user information transfer method applied on the system provided by the present application;
图4示出了本申请提供的用户信息传递装置的结构示意图;FIG. 4 shows a schematic structural diagram of a user information transmission device provided by the present application;
图5示出了本申请提供的用户信息提取装置的结构示意图。FIG. 5 shows a schematic structural diagram of the apparatus for extracting user information provided by the present application.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.
用户从一个网页跳转到另一网页,虽然这两个网页属于不同的网站,但实际应用中,有一种需求是,需要将用户在前一网页的个人信息传递至跳转后的网页,例如,用户从淘宝网页(一种电商网页)跳转至天猫网页(一种电商网页)后,将淘宝网页上的用户信息传递至天猫网页。A user jumps from one webpage to another. Although the two webpages belong to different websites, in practical applications, there is a requirement that the user's personal information on the previous webpage needs to be transferred to the webpage after the jump, for example , after the user jumps from a Taobao webpage (an e-commerce webpage) to a Tmall webpage (an e-commerce webpage), the user information on the Taobao webpage is transferred to the Tmall webpage.
为了便于描述,将跳转前的网站页面称为第一网页,跳转后的网站页面称为第二网页。For the convenience of description, the website page before the jump is called the first webpage, and the website page after the jump is called the second webpage.
见图1,本申请提供了一种用户信息传递方法,以将用户在第一网页的个人信息传递至第二网页,具体的方法流程包括以下步骤S101~S103。Referring to FIG. 1 , the present application provides a user information transfer method to transfer the user's personal information on the first web page to the second web page. The specific method flow includes the following steps S101 to S103.
S101:加载第一网页后,确定预设的允许将第一网页的用户信息传递至的第二网页。S101: After loading the first web page, determine a preset second web page to which the user information of the first web page is allowed to be transferred.
其中,该方法应用在客户端,客户端加载一网页后,该网页便显示给用户,该网页即第一网页。客户端加载第一网页后,便确定该网页上的用户信息所能传递到的网页,该网页即第二网页。Wherein, the method is applied to the client, after the client loads a web page, the web page is displayed to the user, and the web page is the first web page. After loading the first web page, the client determines the web page to which the user information on the web page can be transmitted, and the web page is the second web page.
第二网页是预先设置的网页,即根据实际情况,允许将用户在第一网页上的信息传递到哪个(些)网页,则将该网页设置为第二网页。第二网页可以是一个,也可以是多个。需要说明的是,第二网页是与第一网页主域不同的网页,换句话说,第一网页与第二网页的主域不同。The second webpage is a preset webpage, that is, according to the actual situation, to which webpage(s) the user's information on the first webpage is allowed to be transmitted, the webpage is set as the second webpage. The second webpage may be one or multiple. It should be noted that the second webpage is a webpage with a different main domain from that of the first webpage, in other words, the main domains of the first webpage and the second webpage are different.
可以理解的是,每个网页具有各自的域名,域名具有一定的标准结构,由标志位“.”及域名元素组成。域名中的一部分为主域名(或简称为主域)。主域中包括域名后缀(最后一个标志位“.”之后的域名元素为域名后缀),域名后缀可以分为两种类型,一是国家和地区类型的后缀,如中国是cn、日本是jp、美国是us;二是国际类型后缀,如工商企业是com、网络提供商是net、非盈利组织是org。例如,天猫网页的域名为www.tmall.com,其中,主域名为tmall.com,域名后缀为com,通过该域名后缀com可以明确该主域名是一个工商企业。It can be understood that each web page has its own domain name, and the domain name has a certain standard structure, which is composed of the sign bit "." and the domain name element. A portion of the domain name is the primary domain name (or simply the primary domain). The main domain includes the domain name suffix (the domain name element after the last flag "." is the domain name suffix), the domain name suffix can be divided into two types, one is the suffix of the country and region type, such as China is cn, Japan is jp, The United States is us; the second is the international type suffix, such as com for industrial and commercial enterprises, net for network providers, and org for non-profit organizations. For example, the domain name of the Tmall webpage is www.tmall.com, wherein the main domain name is tmall.com, and the domain name suffix is com. Through the domain name suffix com, it can be determined that the main domain name is an industrial and commercial enterprise.
又如,新浪网页的域名为www.sina.com.cn,其中,主域名为sina.com.cn,域名后缀为cn,通过该域名后缀cn可以明确该主域名属于中国地区。For another example, the domain name of the Sina web page is www.sina.com.cn, wherein the main domain name is sina.com.cn, and the domain name suffix is cn. Through the domain name suffix cn, it can be determined that the main domain name belongs to China.
再如,中国铁路服务网站的域名为www.12306.cn,其中,主域名为12306.cn,域名后缀为cn,通过该域名后缀cn可以明确该主域名属于中国地区。For another example, the domain name of the China Railway Service website is www.12306.cn, of which the main domain name is 12306.cn, and the domain name suffix is cn. Through the domain name suffix cn, it can be determined that the main domain name belongs to China.
若客户端记载的第一网页为新浪网页,若预先设置允许将用户在新浪网页上的信息传递至天猫网页,则第二网页包括天猫网页。当然,若还允许将用户在新浪网页上的信息传递至京东网页(一个电商网页),则第二网页还包括京东网页。If the first web page recorded by the client is a Sina web page, and if it is preset to allow the user's information on the Sina web page to be transmitted to the Tmall web page, the second web page includes the Tmall web page. Of course, if the user's information on the Sina webpage is also allowed to be transmitted to the Jingdong webpage (an e-commerce webpage), the second webpage also includes the Jingdong webpage.
需要说明的是,第一网页的用户信息与第二网页的用户信息可以互相传递,也就是说,用户在第二网页上的信息可以传递给第一网页,此时第二网页便作为第一网页,第一网页便作为第二网页。It should be noted that the user information of the first webpage and the user information of the second webpage can be transmitted to each other, that is to say, the information of the user on the second webpage can be transmitted to the first webpage, at this time, the second webpage is used as the first webpage. web pages, the first web page is used as the second web page.
S102:在第一网页的所有网页元素中,查找链接地址指向第二网页的目标元素。S102: In all webpage elements of the first webpage, search for a target element whose link address points to the second webpage.
可以理解的是,网页中包含多个网页元素,例如图片、文字、网址等等,有些网页元素是可以具有链接地址的,用户点击这些网页元素后,可以由当前的网页,跳转至该链接地址所指向的网页。It is understandable that a webpage contains multiple webpage elements, such as pictures, text, URLs, etc. Some webpage elements can have link addresses. After users click on these webpage elements, they can jump to the link from the current webpage. The webpage the address points to.
因此,在第一网页的所有网页元素中,查找链接地址指向的是上一步骤所确定的第二网页的元素,为了便于描述,所查找到的元素可以称为目标元素。Therefore, among all the webpage elements of the first webpage, the search link address points to the element of the second webpage determined in the previous step. For the convenience of description, the found element may be called a target element.
例如,第一网页为新浪网页,预先设置的允许从新浪网页中将用户信息传递至的第二网页包括天猫网页,在第一网页中查找到某张图片的链接地址为天猫网页如www.Tmall.com/index.html,则该图片即为目标元素。For example, the first webpage is the Sina webpage, the preset second webpage that allows user information to be transferred from the Sina webpage includes the Tmall webpage, and the link address of a picture found in the first webpage is the Tmall webpage such as www .Tmall.com/index.html, the image is the target element.
S103:获取第一网页中的用户信息,将该用户信息添加在目标元素的链接地址中。S103: Acquire user information in the first web page, and add the user information to the link address of the target element.
其中,第一网页中的用户信息可以存储在Cookie中,从第一网页的Cookie中获取用户信息,用户信息可以包括用户标识(user id)。The user information in the first webpage may be stored in a cookie, and the user information may be obtained from the cookie in the first webpage, and the user information may include a user ID (user id).
将用户信息作为用户参数添加在目标元素的链接地址的末尾。例如,目标元素的链接地址为www.Tmall.com/index.html,第一网页中的用户信息包括user id为111,则在链接地址添加用户标识的参数后变为www.Tmall.com/index.html?uid=111。其中,uid即添加的用户参数,该用户参数的值为从Cookie中提取到的用户信息。Add the user information as a user parameter at the end of the link address of the target element. For example, if the link address of the target element is www.Tmall.com/index.html, and the user information in the first web page includes the user id as 111, the link address becomes www.Tmall.com/index after adding the user ID parameter .html? uid=111. The uid is the added user parameter, and the value of the user parameter is the user information extracted from the cookie.
以上技术方案可以应用在第一网页的追踪器Tracker上,终端加载第一网页后,第一网页的Tracker在第一网页内查找链接地址指向第二网页的元素,进而在查找到的元素的链接地址上添加第一网页上的用户信息。该链接地址指向第二网页,因此,终端跳转至第二网页后,可在第二网页内提取该链接地址包含的用户信息,从而实现了将第一网页的用户信息传递至第二网页。The above technical solutions can be applied to the tracker tracker of the first web page. After the terminal loads the first web page, the tracker of the first web page searches the first web page for elements whose link addresses point to the second web page, and then searches the links of the found elements in the first web page. Add the user information on the first web page to the address. The link address points to the second web page. Therefore, after the terminal jumps to the second web page, the user information contained in the link address can be extracted from the second web page, thereby realizing the transfer of the user information of the first web page to the second web page.
终端上还可以设置第二网页的追踪器Tracker,用户点击该链接地址进入第二网页后,第二网页的追踪器Tracker可以从该链接地址中提取到用户信息。A tracker Tracker of the second webpage may also be set on the terminal. After the user clicks the link address to enter the second webpage, the Tracker Tracker of the second webpage can extract user information from the link address.
见图2,第二网页的追踪器Tracker提取用户信息的方法具体包括以下步骤S201~S202。Referring to FIG. 2 , the method for extracting user information by the tracker of the second webpage specifically includes the following steps S201-S202.
S201:加载由第一网页跳转至的第二网页后,从第二网页的链接地址中提取用户信息。S201: After loading the second webpage jumped from the first webpage, user information is extracted from the link address of the second webpage.
其中,终端加载的第二网页是由第一网页跳转至的网页,而不是通过其他方式加载的网页。第二网页的链接地址中包含用户信息,且该用户信息是第一网页内的用户信息。Wherein, the second webpage loaded by the terminal is a webpage jumped to by the first webpage, rather than a webpage loaded by other means. The link address of the second webpage includes user information, and the user information is the user information in the first webpage.
由图1中的步骤S103的说明可知,用户信息可以作为用户参数添加在链接地址的末尾,因此,可以从第二网页的链接地址的末尾提取用户参数,进而提取该用户参数的值。It can be seen from the description of step S103 in FIG. 1 that the user information can be added at the end of the link address as a user parameter. Therefore, the user parameter can be extracted from the end of the link address of the second webpage, and then the value of the user parameter can be extracted.
例如,第一网页www.sina.com/index.html中包含某张图片,该图片经过图1的处理后,链接地址变为www.Tmall.com/index.html?uid=111,其中,111为第一网页的用户信息。用户点击该链接地址进入第二网页后,第二网页的追踪器Tracker可以提取到用户参数uid,进而提取到的第一网页的用户信息111。For example, the first webpage www.sina.com/index.html contains a certain picture. After the picture is processed in Figure 1, the link address becomes www.Tmall.com/index.html? uid=111, where 111 is the user information of the first webpage. After the user clicks the link address to enter the second webpage, the tracker Tracker of the second webpage can extract the user parameter uid, and then extract the user information 111 of the first webpage.
S202:将提取到的用户信息保存为第二网页的用户信息。S202: Save the extracted user information as user information of the second webpage.
其中,第二网页具有自身的Cookie,可以将提取到的用户信息保存在第二网页的Cookie中,作为第二网页的用户信息。The second webpage has its own Cookie, and the extracted user information can be saved in the Cookie of the second webpage as the user information of the second webpage.
需要说明的是,以上步骤S103在链接地址中添加的第一网页的用户信息在包括用户标识的基础上,还可以进一步包括会话标识(session id)。这样,步骤S201还可以提取会话标识以及步骤S202还可以保存该会话标识。It should be noted that, the user information of the first web page added in the link address in the above step S103 may further include a session identifier (session id) in addition to the user identifier. In this way, step S201 may further extract the session identifier and step S202 may further store the session identifier.
步骤S202保存为第二网页的用户信息后,该用户信息可以用于第二网页的登录等用途,详见下文描述。After step S202 is saved as the user information of the second web page, the user information can be used for purposes such as login of the second web page, as described below for details.
见图3,其示出了本申请提供的用户信息传递方法的系统流程,包括如下步骤S301~S310。Referring to FIG. 3, it shows the system flow of the user information transmission method provided by the present application, including the following steps S301-S310.
S301:加载模块加载第一网页。S301: The loading module loads the first webpage.
其中,终端上可以设置加载模块,如浏览器或者应用,由加载模块加载第一网页。另外,终端上还可以设置第一网页的追踪器及第二网页的追踪器。Wherein, a loading module may be set on the terminal, such as a browser or an application, and the first webpage is loaded by the loading module. In addition, a tracker for the first web page and a tracker for the second web page may also be set on the terminal.
S302:基于加载模块的触发,第一网页的追踪器确定预设的允许将第一网页的用户信息传递至的第二网页。S302: Based on the triggering of the loading module, the tracker of the first web page determines a preset second web page to which the user information of the first web page is allowed to be transferred.
S303:第一网页的追踪器在第一网页的所有网页元素中,查找链接地址指向第二网页的目标元素。S303: The tracker of the first web page searches for a target element whose link address points to the second web page among all the web page elements of the first web page.
S304:第一网页的追踪器获取第一网页中的用户信息,将该用户信息添加在目标元素的链接地址中。S304: The tracker of the first web page acquires user information in the first web page, and adds the user information to the link address of the target element.
S305:用户触发第一网页中的目标元素后,加载模块向该目标元素对应的服务器发送该链接地址。S305: After the user triggers the target element in the first webpage, the loading module sends the link address to the server corresponding to the target element.
例如,第一网页中的目标元素为图片,该图片的链接地址指向第二网页,且步骤S303在该链接地址的末尾添加了第一网页中的用户信息。用户点击该图片后,加载模块便向该图片对应的服务器发送该链接地址。For example, the target element in the first webpage is a picture, the link address of the picture points to the second webpage, and step S303 adds the user information in the first webpage at the end of the link address. After the user clicks the picture, the loading module sends the link address to the server corresponding to the picture.
S306:服务器接收到该链接地址后,将该链接地址封装在第二网页中发送至加载模块。S306: After receiving the link address, the server encapsulates the link address in the second webpage and sends it to the loading module.
其中,服务器上设置有第二网页,服务器接收到链接地址后,将该链接地址封装在第二网页中,将第二网页发送至加载模块。Wherein, a second web page is set on the server, after receiving the link address, the server encapsulates the link address in the second web page, and sends the second web page to the loading module.
S307:加载模块加载第二网页。S307: The loading module loads the second webpage.
S308:基于加载模块的触发,第二网页的追踪器从链接地址中提取用户信息。S308: Based on the triggering of the loading module, the tracker of the second webpage extracts user information from the link address.
S309:第二网页的追踪器将提取到的用户信息保存为第二网页的用户信息。S309: The tracker of the second webpage saves the extracted user information as the user information of the second webpage.
其中,第二网页的追踪器保存第二网页的用户信息后,该用户信息可以用于用户登录第二网页,具体如下步骤S308及S309。另外,需要说明的是,第一网页及第二网页的用户信息相同,这样,某一用户相对于第一网页及第二网页为同一用户。Wherein, after the tracker of the second web page saves the user information of the second web page, the user information can be used for the user to log in to the second web page, and the details are as follows in steps S308 and S309. In addition, it should be noted that the user information of the first web page and the second web page are the same, so that a certain user is the same user with respect to the first web page and the second web page.
S310:基于第二网页的追踪器的触发,加载模块将第二网页的用户信息发送至服务器。S310: Based on the triggering of the tracker of the second webpage, the loading module sends the user information of the second webpage to the server.
其中,第二网页的追踪器可以执行刷新动作,从而触发加载模块将提取到的用户信息发送至服务器。The tracker of the second webpage may perform a refresh action, thereby triggering the loading module to send the extracted user information to the server.
S311:服务器将该用户信息对应的用户设置为在第二网页中的登录状态。S311: The server sets the user corresponding to the user information as the login state in the second webpage.
其中,服务器将用户设置为登录状态,该登录状态是在第二网页上的登录状态。Wherein, the server sets the user to a login state, and the login state is a login state on the second web page.
由以上技术方案可知,终端由第一网页跳转至与第一网页的主域不同的第二网页后,第一网页上的用户信息可以传递至第二网页,且该用户信息可以用于用户登录第二网页。It can be seen from the above technical solutions that after the terminal jumps from the first webpage to a second webpage that is different from the main domain of the first webpage, the user information on the first webpage can be transferred to the second webpage, and the user information can be used by the user. Log in to the second web page.
预先设置的允许互相传递用户信息的网页可以设置在同一个集合内,该集合内的每两个网页之间都可以互相传递用户信息。更具体地,集合内可以保存网页的主域名,不同的主域名表示不同的网页。The preset web pages that allow mutual transfer of user information can be set in the same set, and each two web pages in the set can transfer user information to each other. More specifically, the main domain names of web pages can be stored in the collection, and different main domain names represent different web pages.
例如,某集合为{sina.com.cn、Tmall.com、12306.cn},该集合内包含三个网页的主域,分别表示新浪网页、天猫网页及铁路服务网页。For example, a set is {sina.com.cn, Tmall.com, 12306.cn}, and the set includes the main domains of three web pages, which respectively represent the Sina web page, the Tmall web page and the railway service web page.
则以上用户信息传递方法中,步骤S101(加载第一网页后,确定预设的允许将第一网页的用户信息传递至的第二网页)的具体实现方式可以包括以下步骤A1及A2。In the above user information transfer method, the specific implementation of step S101 (after loading the first web page, determining a preset second web page to which user information of the first web page is allowed to be transferred) may include the following steps A1 and A2.
A1:加载第一网页后,确定第一网页的主域。A1: After loading the first web page, determine the primary domain of the first web page.
其中,终端加载一网页后,该网页的域名可能很复杂,例如某域名为www.1111.Tmall.com。因此,需要从域名中准确提取到主域名。Wherein, after the terminal loads a webpage, the domain name of the webpage may be complicated, for example, a domain name is www.1111.Tmall.com. Therefore, it is necessary to accurately extract the main domain name from the domain name.
发明人对域名进行研究后发现,虽然网页域名虽然复杂,但其具有一定的结构特征,即网页的域名是按照一定规则设置的,由标志位“.”及域名元素组成。After researching the domain name, the inventor found that although the domain name of the webpage is complex, it has certain structural characteristics, that is, the domain name of the webpage is set according to certain rules and consists of the sign bit "." and the domain name element.
例如,新浪域名为www.sina.com.cn,其中“www”、“sina”、“com”及“cn”为域名元素。For example, the Sina domain name is www.sina.com.cn, where "www", "sina", "com" and "cn" are domain name elements.
需要说明的是,主域名的长度小于3,长度指的是域名元素的个数。例如,主域名sina.com.cn、Tmall.com、12306.cn的长度分别为3、2、2。It should be noted that the length of the main domain name is less than 3, and the length refers to the number of domain name elements. For example, the lengths of the main domain names sina.com.cn, Tmall.com, and 12306.cn are 3, 2, and 2, respectively.
因此,可以使用以下步骤A11~A14来确定第一网页的主域。Therefore, the following steps A11 to A14 can be used to determine the main domain of the first web page.
A11:加载第一网页后,从第一网页的域名中提取第一个标志位之后的字符串。A11: After loading the first webpage, extract the character string after the first flag bit from the domain name of the first webpage.
其中,加载第一网页后,可以从第一网页的URL(Uniform Resoure Locator:统一资源定位器)中提取第一网页的域名。该域名中包含主机名(第一个标志位之前的域名元素),再进一步从域名中提取第一个标志位之后的字符串。Wherein, after the first webpage is loaded, the domain name of the first webpage can be extracted from the URL (Uniform Resoure Locator: Uniform Resource Locator) of the first webpage. The domain name contains the host name (the domain name element before the first flag bit), and further extracts the string after the first flag bit from the domain name.
例如,从第一网页的URL中提取到的域名为www.1111.Tmall.com,其中“www”为主机名,则进一步提取到的字符串为“1111.Tmall.com”;又如,从第一网页的URL中提取到的域名为www.Tmall.com,其中“www”为主机名,则进一步提取到的字符串为“Tmall.com”;再如,从第一网页的URL中提取到的域名为www.1111.sina.com.cn,其中“www”为主机名,则进一步提取到的字符串为“1111.sina.com.cn”;再如,从第一网页的URL中提取到的域名为www.sina.com.cn,其中“www”为主机名,则进一步提取到的字符串为“sina.com.cn”;再如,从第一网页的URL中提取到的域名为www.12306.cn,其中“www”为主机名,则进一步提取到的字符串为“12306.cn”。For example, if the domain name extracted from the URL of the first web page is www.1111.Tmall.com, where "www" is the host name, the further extracted string is "1111.Tmall.com"; The domain name extracted from the URL of the first web page is www.Tmall.com, where "www" is the host name, and the further extracted string is "Tmall.com"; for another example, extracting from the URL of the first web page The obtained domain name is www.1111.sina.com.cn, where "www" is the host name, then the further extracted string is "1111.sina.com.cn"; for another example, from the URL of the first web page The extracted domain name is www.sina.com.cn, where "www" is the host name, and the further extracted string is "sina.com.cn"; for another example, the URL extracted from the first webpage The domain name is www.12306.cn, where "www" is the host name, and the further extracted string is "12306.cn".
总结上述几个例子,提取到的字符串为:“1111.Tmall.com”、“Tmall.com”、“1111.sina.com.cn”、“sina.com.cn”及“12306.cn”。Summarizing the above examples, the extracted strings are: "1111.Tmall.com", "Tmall.com", "1111.sina.com.cn", "sina.com.cn" and "12306.cn" .
A12:判断字符串的长度是否小于3。A12: Determine whether the length of the string is less than 3.
前已述及,长度指的是域名元素的个数。以上述字符串“Tmall.com”、“12306.cn”、“sina.com.cn”、“1111.Tmall.com”及“1111.sina.com.cn”为例,字符串的长度分别为2、2、3、3、4。As mentioned earlier, the length refers to the number of domain name elements. Taking the above strings "Tmall.com", "12306.cn", "sina.com.cn", "1111.Tmall.com" and "1111.sina.com.cn" as examples, the lengths of the strings are respectively 2, 2, 3, 3, 4.
A13:若字符串的长度小于3,则将提取到的字符串确定为第一网页的主域。A13: If the length of the character string is less than 3, the extracted character string is determined as the main domain of the first web page.
其中,若字符串的长度小于3,可以表示该字符串中的全部域名元素为主域名,因此,可以将提取到的该字符串直接作为第一网页的主域。例如,在字符串Tmall.com”、“12306.cn”、“sina.com.cn”、“1111.Tmall.com”及“1111.sina.com.cn”中,可以被直接确定为第一网页的主域的是字符串为:“Tmall.com”及“12306.cn”。其他的字符串“sina.com.cn”、“1111.Tmall.com”及“1111.sina.com.cn”可以通过步骤A14确定出第一网页的主域。Wherein, if the length of the character string is less than 3, it can indicate that all domain name elements in the character string are the main domain name. Therefore, the extracted character string can be directly used as the main domain of the first webpage. For example, in the character strings Tmall.com", "12306.cn", "sina.com.cn", "1111.Tmall.com" and "1111.sina.com.cn", it can be directly determined as the first The main domain of the webpage is the string: "Tmall.com" and "12306.cn". Other strings are "sina.com.cn", "1111.Tmall.com" and "1111.sina.com.cn" ” The main domain of the first web page can be determined through step A14.
A14:若字符串的长度不小于3,则判断该字符串是否同时包括顶级域名集合中的域名元素及二级域名集合中的域名元素;若是,则将字符串中倒数三个域名元素及之间的标志位确定为第一网页的主域;若否,则将倒数两个域名元素及之间的标志位确定为第一网页的主域。A14: If the length of the string is not less than 3, judge whether the string includes both the domain name element in the top-level domain name set and the domain name element in the second-level domain name set; The flag bit between is determined as the main domain of the first web page; if not, then the last two domain name elements and the flag bit between are determined as the main domain of the first web page.
其中,预先设置顶级域名集合及二级域名集合。顶级域名集合及二级域名集合可以具体为字符串数组。顶级域名集合中包含可能使用的所有顶级域名的后缀,如["cn","hk","tw","au","uk","us","公司","中国","网络"];二级域名集合中包含可能使用的所有二级域名的后缀,如["com","edu","net","org","gov","int","cc","me","tel","mobi","asia","biz","info","name","tv"]。当然,以上仅仅是示例说明,还可以包含其他。Among them, a set of top-level domain names and a set of second-level domain names are preset. The set of top-level domain names and the set of second-level domain names can be specified as string arrays. The TLD set contains all possible TLD suffixes, such as ["cn","hk","tw","au","uk","us","company","China","network" "]; The second-level domain name set contains all possible suffixes of second-level domain names, such as ["com","edu","net","org","gov","int","cc"," me","tel","mobi","asia","biz","info","name","tv"]. Of course, the above are just examples, and others may also be included.
若步骤A11提取到的字符串大于或等于3,则需要进一步判断字符串中是否既包括顶级域名集合中的域名元素也包括二级域名集合中的域名元素,若两者都包括,则将字符串中的倒数三个域名元素及之间的标志位确定为第一网页的主域。需要说明的是,If the character string extracted in step A11 is greater than or equal to 3, it is necessary to further judge whether the character string includes both the domain name element in the top-level domain name set and the domain name element in the second-level domain name set. The last three domain name elements in the string and the flag bits between them are determined as the main domain of the first web page. It should be noted,
以字符串“sina.com.cn”、“1111.Tmall.com”及“1111.sina.com.cn”为例。其中,字符串“sina.com.cn”既包括顶级域名集合中的域名元素“cn”,也包括二级域名集合中的域名元素“com”,因此,将该字符串中的倒数三个域名元素及之间的标志位即sina.com.cn确定为主域。同理,字符串“1111.sina.com.cn”既包括顶级域名集合中的域名元素“cn”,也包括二级域名集合中的域名元素“com”,因此,将该字符串中的倒数三个域名元素及之间的标志位即sina.com.cn确定为主域。但是,若字符串中并非同时包括顶级域名集合中的域名元素及二级域名集合中的域名元素,则将将字符串中的倒数两个域名元素及之间的标志位确定为第一网页的主域。以字符串“1111.Tmall.com”为例,该字符串中仅包括二级域名集合中的域名元素“com”,但未包含顶级域名集合中的域名元素,因此,将该字符串中的倒数两个域名元素及之间的标志位即Tmall.com确定为主域。Take the strings "sina.com.cn", "1111.Tmall.com" and "1111.sina.com.cn" as examples. Among them, the string "sina.com.cn" includes both the domain name element "cn" in the top-level domain name set and the domain name element "com" in the second-level domain name set. Therefore, the last three in the string are The domain name element and the flags between them, namely sina.com.cn, are determined as the main domain. Similarly, the string "1111.sina.com.cn" includes both the domain name element "cn" in the top-level domain name set and the domain name element "com" in the second-level domain name set. The number of three domain name elements and the flags between them, namely sina.com.cn, is determined as the main domain. However, if the string does not include both the domain name element in the top-level domain name set and the domain name element in the second-level domain name set, the last two domain name elements in the string and the flag bits between them are determined as the first webpage's domain name element. main domain. Taking the string "1111.Tmall.com" as an example, the string only includes the domain name element "com" in the second-level domain name set, but does not include the domain name element in the top-level domain name set. The last two domain name elements and the flag between them, namely Tmall.com, are determined as the main domain.
A2:从预设的网页主域集合中,提取第一网页的主域之外的网页主域,并将提取到的网页主域作为第二网页的主域。A2: Extract the main domains of webpages other than the main domain of the first webpage from the preset main domain set of webpages, and use the extracted main domain of the webpage as the main domain of the second webpage.
前已述及,网页主域集合中包含的是所有可以互相传递用户信息的网页主域,因此,在网页主域集合中提取主域时,需要将第一网页的主域排除。例如,以网页主域集合{sina.com.cn、Tmall.com、12306.cn}为例,若第一网页的主域为sina.com.cn,则提取到的第二网页的主域为Tmall.com、12306.cn。As mentioned above, the webpage main domain set contains all webpage main domains that can transfer user information to each other. Therefore, when extracting the main domain from the webpage main domain set, the main domain of the first webpage needs to be excluded. For example, taking the main domain set of webpages {sina.com.cn, Tmall.com, 12306.cn} as an example, if the main domain of the first webpage is sina.com.cn, the main domain of the extracted second webpage is Tmall.com, 12306.cn.
可以理解的是,网页的主域可以表示网页,因此,提取到第二网页的主域后,便可以确定第二网页是哪些网页。It can be understood that the main domain of the web page may represent the web page. Therefore, after the main domain of the second web page is extracted, it can be determined which web pages the second web page is.
另外,见图4,本申请还提供了一种用户信息传递装置,该装置可以具体包括:第二网页确定模块41、目标元素查找模块42及链接地址添加模块43。In addition, as shown in FIG. 4 , the present application also provides a user information transmission device, which may specifically include: a second
第二网页确定模块41,用于加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页;其中,所述第一网页与所述第二网页的主域不同;The second
目标元素查找模块42,用于在所述第一网页的所有网页元素中,查找链接地址指向所述第二网页的目标元素;The target
链接地址添加模块43,用于获取所述第一网页中的用户信息,将所述用户信息添加在所述目标元素的所述链接地址中。The link
在一个示例中,在执行加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页的步骤时,所述第二网页确定模块具体用于:In one example, after the first webpage is loaded, the second webpage determining module is specifically configured to:
加载第一网页后,确定所述第一网页的主域;从预设的网页主域集合中,提取所述第一网页的主域之外的网页主域,并将提取到的网页主域确定为第二网页的主域。After loading the first webpage, determine the main domain of the first webpage; extract main domains of webpages other than the main domain of the first webpage from the preset main domain set of webpages, and extract the main domain of the webpage Determined as the primary domain of the second web page.
在一个示例中,在执行加载第一网页后,确定所述第一网页的主域的步骤时,所述第二网页确定模块具体用于:In an example, when the step of determining the main domain of the first web page is performed after the first web page is loaded, the second web page determining module is specifically configured to:
加载第一网页后,从所述第一网页的域名中提取第一个标志位之后的字符串;After loading the first web page, extract the string after the first flag bit from the domain name of the first web page;
若所述字符串的长度小于3,则将所述字符串确定为第一网页的主域;If the length of the character string is less than 3, the character string is determined as the main domain of the first web page;
若所述字符串的长度并非小于3但所述字符串同时包括预设的顶级域名集合中的域名元素及预设的二级域名集合中的域名元素,则将所述字符串中倒数三个域名元素及之间的标志位确定为第一网页的主域;If the length of the character string is not less than 3 but the character string includes both the domain name element in the preset top-level domain name set and the domain name element in the preset second-level domain name set, the last three in the string The domain name elements and the flags between them are determined as the main domain of the first web page;
若所述字符串的长度并非小于3且所述字符串并非同时包括预设的顶级域名集合中的域名元素及预设的二级域名集合中的域名元素,则将所述字符串中倒数两个域名元素及之间的标志位确定为第一网页的主域。If the length of the character string is not less than 3 and the character string does not include both the domain name element in the preset top-level domain name set and the domain name element in the preset second-level domain name set, the last two in the string will be counted. The domain name elements and the flag bits between them are determined as the main domain of the first web page.
见图5,本申请还提供了一种用户信息提取装置,具体包括:用户信息提取模块51及用户信息保存模块52。Referring to FIG. 5 , the present application further provides a user information extraction device, which specifically includes: a user
用户信息提取模块51,用于加载由第一网页跳转至的第二网页后,从所述第二网页的链接地址中提取用户信息;其中,所述用户信息为所述第一网页中的用户信息;The user
用户信息保存模块52,用于将所述用户信息保存为所述第二网页的用户信息。The user
本申请还提供了一种终端,包括:上述任意一种用户信息传递装置及任意一种用户信息提取装置。需要说明的是,用户信息传递装置可以是上述的第一网页的追踪器,用户信息提取装置可以是上述的第二网页的追踪器。The present application also provides a terminal, comprising: any of the above-mentioned user information transmission apparatuses and any of the above-mentioned user information extraction apparatuses. It should be noted that the user information transmission device may be the above-mentioned tracker of the first web page, and the user information extraction device may be the above-mentioned tracker of the second web page.
需要说明的是,终端包括处理器和存储器,上述第二网页确定模块、目标元素查找模块、链接地址添加模块、用户信息提取模块及用户信息保存模块均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。It should be noted that the terminal includes a processor and a memory, and the above-mentioned second webpage determination module, target element search module, link address addition module, user information extraction module and user information storage module are all stored in the memory as program units, and are stored in the memory by the processor. The above-mentioned program elements stored in the memory are executed to realize the corresponding functions.
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来实现将用户信息由一个网页跨主域传递至另一网页。The processor includes a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to one or more, and the user information can be transferred from one web page to another web page across the main domain by adjusting the kernel parameters.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (flash RAM), the memory including at least one memory chip.
本申请还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序代码:The present application also provides a computer program product that, when executed on a data processing device, is adapted to execute program code initialized with the following method steps:
加载第一网页后,确定预设的允许将所述第一网页的用户信息传递至的第二网页;其中,所述第一网页与所述第二网页的主域不同;After loading the first web page, determine a preset second web page to which the user information of the first web page is allowed to be transferred; wherein the primary domain of the first web page is different from that of the second web page;
在所述第一网页的所有网页元素中,查找链接地址指向所述第二网页的目标元素;In all web page elements of the first web page, search for a target element whose link address points to the second web page;
获取所述第一网页中的用户信息,将所述用户信息添加在所述目标元素的所述链接地址中;acquiring user information in the first web page, and adding the user information to the link address of the target element;
加载由第一网页跳转至的第二网页后,从所述第二网页的链接地址中提取用户信息;其中,所述用户信息为所述第一网页中的用户信息;After loading the second webpage jumped from the first webpage, user information is extracted from the link address of the second webpage; wherein, the user information is the user information in the first webpage;
将所述用户信息保存为所述第二网页的用户信息。The user information is saved as the user information of the second webpage.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory in the form of, for example, read only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are merely examples of the present application, and are not intended to limit the present application. Various modifications and variations of this application are possible for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the scope of the claims of this application.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611250144.8A CN108255878B (en) | 2016-12-29 | 2016-12-29 | User information processing method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611250144.8A CN108255878B (en) | 2016-12-29 | 2016-12-29 | User information processing method and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108255878A CN108255878A (en) | 2018-07-06 |
CN108255878B true CN108255878B (en) | 2022-05-27 |
Family
ID=62721975
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611250144.8A Expired - Fee Related CN108255878B (en) | 2016-12-29 | 2016-12-29 | User information processing method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108255878B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110971578B (en) * | 2018-09-30 | 2022-07-05 | 北京国双科技有限公司 | User identity confirmation method and device |
CN114281464A (en) * | 2021-12-31 | 2022-04-05 | 瀚云科技有限公司 | Multi-tenant dynamic login page generation method and system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8095967B2 (en) * | 2006-07-27 | 2012-01-10 | White Sky, Inc. | Secure web site authentication using web site characteristics, secure user credentials and private browser |
US9367860B2 (en) * | 2011-08-05 | 2016-06-14 | Sean McKirdy | Barcode generation and implementation method and system for processing information |
CN102957699B (en) * | 2012-10-26 | 2017-07-21 | 北京奇安信科技有限公司 | A kind of corporate intranet access control method and system |
CN104301379A (en) * | 2014-08-28 | 2015-01-21 | 北京奇虎科技有限公司 | A webpage cross-domain communication method and device |
CN104462182B (en) * | 2014-10-10 | 2017-11-14 | 北京国双科技有限公司 | Webpage redirects processing method and processing device |
-
2016
- 2016-12-29 CN CN201611250144.8A patent/CN108255878B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN108255878A (en) | 2018-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10764350B2 (en) | Setting first-party cookies by redirection | |
JP6122199B2 (en) | System, method and storage medium for improving access to search results | |
CN106933871B (en) | Short link processing method, device and short link server | |
CN103443781B (en) | data delivery | |
US20190340205A1 (en) | Reducing redirects | |
JP7331073B2 (en) | Enhanced online privacy | |
US8990341B2 (en) | System for tracking diffusion | |
CN105100294B (en) | Obtain method, system, the webserver, browser and the GSLB of webpage | |
CN103617267B (en) | Socialized extension search method, device and system | |
JP6854046B2 (en) | Data backfill method, terminal, and system | |
US8782157B1 (en) | Distributed comment moderation | |
CN105335404A (en) | Page information loading method and device | |
WO2020015579A1 (en) | Method and device for determining promotional resource | |
CN102708132A (en) | A web page recommendation method and system | |
US11775518B2 (en) | Asynchronous predictive caching of content listed in search results | |
US20170134512A1 (en) | Setting a first-party user id cookie on a web server's domain | |
CN102436509B (en) | Method and system for web browsing on mobile terminal | |
CN108255878B (en) | User information processing method and related device | |
EP3435253B1 (en) | Method and device for page display | |
CN104021143A (en) | Method and device for recording webpage access behavior | |
CN110971578B (en) | User identity confirmation method and device | |
CN104657360A (en) | Method and equipment for displaying and monitoring web content | |
CN117118668A (en) | Automatic batch detection method and device for SSRF vulnerabilities, storage medium and electronic equipment | |
HK1239862B (en) | Method and device used for cookie mapping and electronic equipment |
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 |
Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20220527 |
|
CF01 | Termination of patent right due to non-payment of annual fee |