Browser fingerprint storage method and fingerprint acquisition method based on storage method

CN119476202AInactive Publication Date: 2025-02-18CLOUD ATTACK NETWORK TECH HEBEI CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411610609.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Benefits of technology

[0037]本发明中,在数据库中同时记录了用户的静态指纹、ip和cookie,其中静态指纹的计算只选取了不易发生变化的设备和浏览器特征,因此如果仅仅ip或者cookie其中的一项发生变化,仍然可以通过检索数据库的方式找到用户的浏览器指纹id,大大降低了同一设备指纹发生变化的概率。同时由于不同用户即使使用相同类型的浏览器和设备,即静态指纹相同,但由于用户的ip或者cookie不同,因此不同设备的浏览器指纹也会不同,即大大降低了指纹冲突的概率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476202A_ABST
    Figure CN119476202A_ABST
Patent Text Reader

Abstract

The invention discloses a browser fingerprint storage method and an equipment identification method based on the storage method.The browser fingerprint storage method comprises the steps that when a page is accessed for the first time, a request is sent to a server through a current browser and current equipment, and first Cid data with the key being Cid and the value being fingerprint id are generated; meanwhile, generating a static fingerprint by utilizing the feature information of the current browser and the current equipment, and generating second Cid data of which the key is static fingerprint + ip and the value is fingerprint id according to the static fingerprint and the current IP address; the fingerprint id is a randomly generated and unique character string; and storing the first Cid data and the second Cid data into a database. According to the method and the device, the browser fingerprint can be dynamically generated, and the probability of browser fingerprint conflict is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more particularly to a method, system and device for dynamically generating browser fingerprints. Background Art

[0002] Browser static fingerprinting is a technology that identifies and tracks the identity of online users. It creates a unique identifier by collecting and combining characteristic information of multiple browsers and devices. This identifier can be used to identify users, track their behavior, and provide personalized services.

[0003] Typically browser and device feature information includes the following:

[0004] 1. User Agent

[0005] The browser and operating system information can be obtained through navigator.userAgent.

[0006] 2. Hardware information

[0007] Get hardware information such as device memory and number of CPU cores through navigator.deviceMemory, navigator.hardwareConcurrency, etc.

[0008] 3. Screen information

[0009] The screen object provides information such as screen resolution and color depth.

[0010] 4. Canvas fingerprint

[0011] Render text or graphics on the canvas through the Canvas API, and obtain fingerprints based on the rendering results of different hardware and drivers.

[0012] 5. WebGL fingerprint

[0013] The WebGL API exposes some information about the device GPU, which can be used to distinguish different rendering capabilities.

[0014] 6. Font detection

[0015] Enumerate installed font styles, and different system font environments can form fingerprints.

[0016] The browser static fingerprint combines the above browser and device feature information and then uses a hash algorithm to generate a unique string identifier, namely the browser fingerprint. When the same user visits the web page again, since the browser and device feature information have not changed, the generated browser static fingerprint has not changed, so the device can be identified.

[0017] The disadvantage of the above traditional methods is that after a user has used the browser for a long time, the browser and device feature information will change, which will cause the browser fingerprint to change and make it impossible to identify the user. In addition, if multiple users use the same type of browser and device, since these devices have the same feature information, they will also generate the same browser fingerprint, which will also make it impossible to identify the specific user. Summary of the invention

[0018] In view of this, the present invention provides a method, system and device for dynamically generating browser fingerprints, which are used to at least solve some technical defects of traditional browser fingerprint generation methods.

[0019] In order to achieve the above object, the present invention adopts the following technical solution:

[0020] In a first aspect, the present invention discloses a browser fingerprint storage method, comprising the following steps:

[0021] When accessing a page for the first time, a request is sent to the server through the current browser and the current device to generate the first Cid data with the key being Cid and the value being the fingerprint id;

[0022] At the same time, a static fingerprint is generated using the characteristic information of the current browser and the current device, and a second Cid data with a key of static fingerprint + IP and a value of fingerprint ID is generated according to the static fingerprint and the current IP address;

[0023] The fingerprint id is a randomly generated and unique string;

[0024] The first Cid data and the second Cid data are stored in a database.

[0025] Furthermore, the above method also includes the server returning the first Cid data to the current device via a cookie.

[0026] Furthermore, the characteristic information of the current browser and the current device includes browser operating system information, device memory and CPU information, and device screen information.

[0027] In a second aspect, the present invention further discloses a fingerprint acquisition method based on the above storage method, comprising the following steps:

[0028] S1. When a device accesses a page through a browser, the cookie data stored locally on the device is traversed to determine whether there is first Cid data with key Cid and value fingerprint id in the cookie data; if the first Cid data exists in the cookie data, it is determined that this is not the first time that the device accesses the page through the current browser and step S2 is executed; otherwise, it is determined that this is the first time that the device accesses the page through the current browser, and new first Cid data is randomly generated and stored in the database;

[0029] S2. Further determine whether the first Cid data exists in the database. If the first Cid data exists in the database, return the value in the first Cid as the browser output fingerprint of the current device;

[0030] If the first Cid data does not exist in the database, determine whether there is a second Cid data in the database whose key is static fingerprint + IP and value is fingerprint id. If the second Cid data exists in the database, return the value in the second Cid as the browser output fingerprint of the current device; if the second Cid data does not exist in the database, execute step S3.

[0031] S3. Generate new first Cid data and new second Cid data and store them in a database.

[0032] In a third aspect, the present invention discloses a browser fingerprint storage system, including a data collection module, a data processing module and a database;

[0033] The data collection module is used to collect characteristic information of the current browser and the current device, as well as the IP address of the current network;

[0034] The data processing module is used to generate a static fingerprint based on the characteristic information of the current browser and the current device, and store the second Cid data with the key being the static fingerprint + ip and the value being the fingerprint id in the database, and at the same time store the first Cid data with the key being the Cid and the value being the fingerprint id in the database; wherein the fingerprint id is a randomly generated and unique string.

[0035] In a fourth aspect, the present invention further discloses a browser fingerprint storage device, the device comprising a computer system, and the computer system, when executed, can implement any one of the browser fingerprint storage methods described in the first aspect of the present invention.

[0036] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method, system and device for dynamically generating browser fingerprints, which has the following beneficial effects:

[0037] In the present invention, the user's static fingerprint, IP and cookie are recorded in the database at the same time, wherein the calculation of the static fingerprint only selects the device and browser features that are not easy to change, so if only one of the IP or cookie changes, the user's browser fingerprint ID can still be found by searching the database, which greatly reduces the probability of the same device fingerprint changing. At the same time, even if different users use the same type of browser and device, that is, the static fingerprint is the same, but because the user's IP or cookie is different, the browser fingerprints of different devices will also be different, that is, the probability of fingerprint conflict is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0039] Figure 1 The present invention provides a schematic diagram of the overall process of the method for dynamically generating browser fingerprints.

[0040] Figure 2 A schematic diagram of a browser generation process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] In the first aspect, the present invention discloses a method for dynamically generating browser fingerprints, which uses IP and cookies in combination with a database to dynamically generate browser fingerprints based on traditional browser fingerprints (hereinafter referred to as static fingerprints). The static fingerprint only selects browser and device features that are not easy to change.

[0043] IP refers to the Internet Protocol address, which is a unique address assigned to every device and network on the Internet. IP can identify and track users to a certain extent, but IP will change as the network environment changes. For example, when a device is connected to a different network, the assigned IP will also be different, which will cause user identification failure.

[0044] Cookies are a technology that stores small text files on the user's computer. They are mainly used to remember the user's identity after the user logs in, thereby avoiding repeated login actions and improving the user's experience. Cookies can be used to identify and track users, but cookies will become invalid in certain circumstances, such as when the browser settings disable cookies, manually clear cookies, or use incognito mode, which will cause user identification failure.

[0045] A cookie can store multiple pieces of data. This method uses only one piece of data, which is named cid below.

[0046] like Figure 1 As shown, the present invention first discloses a browser fingerprint storage method, comprising the following steps:

[0047] When accessing a page for the first time, a request is sent to the server through the current browser and the current device to generate the first Cid data with the key being Cid and the value being the fingerprint id;

[0048] At the same time, a static fingerprint is generated using the characteristic information of the current browser and the current device, and a second Cid data with a key of static fingerprint + IP and a value of fingerprint ID is generated according to the static fingerprint and the current IP address;

[0049] The fingerprint id is a randomly generated and unique string;

[0050] The first Cid data and the second Cid data are stored in a database.

[0051] The present invention also discloses a method for obtaining a dynamically generated browser fingerprint, the method specifically comprising the following process:

[0052] S1. Traverse the cookie data stored in the client to determine whether there is a cid in the cookie data; if there is a cid in the cookie data, execute step S2; otherwise, randomly generate a new cid and execute step S3;

[0053] S2, traverse and determine whether the cid exists in the database, if the cid exists in the database, execute step S3, otherwise execute step S4;

[0054] S3. Return the value corresponding to cid, which is the fingerprint id. At the same time, update the data whose key is static fingerprint + ip and value is fingerprint id to the database.

[0055] S4, traverse and determine whether the static fingerprint + IP exists in the database, if the static fingerprint + IP exists in the database, execute step S5; otherwise, execute step S6;

[0056] S5. Return the fingerprint ID in the database, and update the data whose key is cid and value is fingerprint ID to the database;

[0057] S6. Randomly generate a new fingerprint ID, and update the data with the key being the static fingerprint + IP and the value being the new fingerprint ID to the database;

[0058] S7. Update the validity period of the cid in the cookie and return the fingerprint id corresponding to the cid to the client.

[0059] The overall process of this method is as follows Figure 2 As shown in 2, although there is a problem of duplicate storage of some data in CID, it does not affect the overall process.

[0060] In the above embodiments, the static fingerprint uses browser and device features that are not easily changed.

[0061] The beneficial effects of the present invention are described below through specific application examples.

[0062] When you visit the page of browser Bro1 in device A for the first time, since the database does not record any information about device A, a fingerprint id of device A will be randomly generated. At the same time, the database will record the static fingerprint, ip and cid information of device A (where key is Cid, value is fingerprint id, and is stored in the database as the first Cid data; key is static fingerprint + ip, value is fingerprint id, and is stored in the database as the second Cid data). At the same time, the local device A will save the first Cid data through the cookie of browser Bro1.

[0063] When you visit the browser Bro1's page next time, if you can retrieve the same value (fingerprint id) from the database, it proves that the device used is device A.

[0064] When two devices A and B are of the same type, when device A accesses a page of browser Bro1, since the database does not record any information of device A, a fingerprint id will be randomly generated, and the database will record the static fingerprint, IP and CID information of device A. When device B accesses a page of browser Bro1, since device A of the same type as device A and the same browser Bro1 are used, the static fingerprint of device B is the same as that of device A, but since the CID of device B does not exist or is different from that of device A, and the IP of browser Bro1 in device B is also different from that of device A, the fingerprint of A will not be retrieved from the database, so a fingerprint different from A will be generated.

[0065] When two devices A and B are of different types, different static fingerprints will be generated regardless of whether the same browser is used to access the page because of the different device types.

[0066] In order to more clearly illustrate the principle of the present application, the technical solution of the present application can be understood as: first comprising the following steps:

[0067] 1. Collect device and browser information, hash the collected device and browser information or use other algorithms to generate a unique string or number as the static fingerprint of the device.

[0068] 2. Get the current IP address of the device.

[0069] 3. Get the value of a fixed data in the cookie in the browser as cookie data

[0070] 4. Hash the current IP address and cookie data to obtain a dynamic fingerprint corresponding to the current device and browser.

[0071] 5. Combine the static fingerprint and the dynamic fingerprint to obtain a composite fingerprint.

[0072] 6. Store the composite fingerprint in the database.

[0073] Then the device is judged based on the matching fingerprint: the device to be detected regenerates the static fingerprint, obtains the IP address and cookie, generates a new composite fingerprint, and searches the database. If the retrieved static fingerprint + IP or CID is the same as the new composite fingerprint, then it proves that the device to be detected corresponding to the new composite fingerprint is the same as the device corresponding to the composite fingerprint retrieved from the database.

[0074] In a second aspect, the present invention discloses a system for dynamically generating browser fingerprints, including a data acquisition module and a data processing module;

[0075] Among them, the data acquisition module is used to obtain cookie data stored in the client; the data processing module is used to receive cookie data stored in the client and execute any one of the methods for dynamically generating browser fingerprints described in the first aspect of the present invention.

[0076] In a third aspect, the present invention further discloses a device for dynamically generating a browser fingerprint, the device comprising a computer system, and when the computer system is executed, it can implement any one of the methods for dynamically generating a browser fingerprint described in the first aspect of the present invention.

[0077] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0078] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A browser fingerprint storage method, characterized in that: The following steps are involved: When accessing a page for the first time, a request is sent to the server through the current browser and the current device to generate the first Cid data with the key being Cid and the value being the fingerprint id; At the same time, a static fingerprint is generated using the characteristic information of the current browser and the current device, and a second Cid data with a key of static fingerprint + IP and a value of fingerprint ID is generated according to the static fingerprint and the current IP address; The fingerprint id is a randomly generated and unique string; The first Cid data and the second Cid data are stored in a database.

2. The browser fingerprint storage method according to claim 1, characterized in that: Also includes: The server returns the first Cid data to the current device via a cookie.

3. A browser fingerprint storage method according to claim 1, characterized in that: The characteristic information of the current browser and the current device includes the browser operating system information, device memory and CPU information, and device screen information.

4. A fingerprint acquisition method based on the browser fingerprint storage method according to claim 2, characterized in that: The following steps are involved: S1. When a device accesses a page through a browser, the cookie data stored locally on the device is traversed to determine whether there is first Cid data with key Cid and value fingerprint id in the cookie data; if the first Cid data exists in the cookie data, it is determined that this is not the first time that the device accesses the page through the current browser and step S2 is executed; otherwise, it is determined that this is the first time that the device accesses the page through the current browser, and new first Cid data is randomly generated and stored in the database; S2. Further determine whether the first Cid data exists in the database. If the first Cid data exists in the database, return the value in the first Cid as the browser output fingerprint of the current device; If the first Cid data does not exist in the database, determine whether there is a second Cid data in the database whose key is static fingerprint + IP and value is fingerprint id. If the second Cid data exists in the database, return the value in the second Cid as the browser output fingerprint of the current device; if the second Cid data does not exist in the database, execute step S3. S3. Generate new first Cid data and new second Cid data and store them in a database.

5. A browser fingerprint storage system, characterized in that: It includes a data collection module, a data processing module and a database; The data collection module is used to collect characteristic information of the current browser and the current device, as well as the IP address of the current network; The data processing module is used to generate a static fingerprint based on the characteristic information of the current browser and the current device, and store the second Cid data with the key being the static fingerprint + ip and the value being the fingerprint id in the database, and at the same time store the first Cid data with the key being the Cid and the value being the fingerprint id in the database; wherein the fingerprint id is a randomly generated and unique string.

6. A browser fingerprint storage device, characterized in that: The device includes a computer system, and when the computer system is executed, it can implement the browser fingerprint storage method described in any one of claims 1-2.

Citation Information

Patent Citations

  • Enhanced ad-serving metric determination

    CN104641389A

  • Method and device for detecting distributed denial of service attack

    CN105430011A

  • Equipment fingerprint recovery method and device

    CN111770080A

  • Method for identifying user based on website access log and computer equipment

    CN112954043A

  • Video stream address request method and device and processing equipment

    CN118764653A