Browser fingerprint identification method and device, electronic equipment and storage medium

By creating Canvas elements in the browser and generating encrypted browser fingerprint identifiers, the problem of the existing technology being disabled or blocked is solved, and user identification and network security are improved.

CN119155057APending Publication Date: 2024-12-17UNICLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411033733.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Existing browser fingerprint technology is easily disabled or blocked by software, affecting user privacy and network security.

Method used

By creating a Canvas element, drawing an image containing browser information and computer information, adding random graphics to the image, extracting pixel data for image processing and encryption, and generating a unique identifier to identify the user device.

Benefits of technology

Without affecting user privacy, improve user tracking and identification capabilities, enhance network security, detect network attacks and fraudulent behaviors, and improve network performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155057A_ABST
    Figure CN119155057A_ABST
Patent Text Reader

Abstract

The invention provides a browser fingerprint identification method and device, electronic equipment and a storage medium. The browser fingerprint identification method comprises the following steps: creating a Canvas element and inserting the Canvas element into an HTML (Hypertext Markup Language) document; an image containing browser information and computer information is drawn on the Canvas, and a random graph is added on the Canvas; extracting pixel data of the whole Canvas area, performing image processing on the extracted data, performing encryption operation on the processed pixel data, and generating a unique identifier corresponding to the browser fingerprint; and comparing the currently generated identifier with the previously stored identifier to identify whether the equipment logged in by the user is the same equipment or not. According to the method, the user can be tracked and recognized, user privacy protection is improved under the condition that user privacy is not affected, meanwhile, the method can be used for detecting network attackers and fraudulent behaviors, and therefore network safety is enhanced, and network performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of browser technology, and in particular, relates to a browser fingerprint recognition method, device, electronic device and storage medium. Background Art

[0002] Browser fingerprint refers to a unique user identifier generated by collecting browser environment information. Browser environment information includes but is not limited to browser type, operating system, screen resolution, browser version, installed plug-ins, fonts, language, etc. By collecting this information, a set of digital strings can be generated to identify the user.

[0003] Currently, browser fingerprinting has been widely used in network security, advertising, anti-fraud and other fields. In order to track users and provide better personalized services, many websites and applications use browser fingerprinting technology. Currently common browser fingerprinting technology is usually based on plug-ins such as Flash and Java Applet, and in many cases, these technologies can be disabled or blocked by software such as ad blockers. Summary of the invention

[0004] In view of this, the present application aims to propose a browser fingerprint recognition method, device, electronic device and storage medium to solve the problem that the current common browser fingerprint technology is easily disabled or blocked by software, affecting user privacy.

[0005] To achieve the above purpose, the technical solution of this application is implemented as follows:

[0006] In a first aspect, the present application provides a browser fingerprint recognition method, comprising:

[0007] Create a Canvas element and insert it into the HTML document;

[0008] Draw an image containing browser information and computer information on Canvas, and add random graphics on Canvas;

[0009] Extracting pixel data of the entire Canvas area, performing image processing on the extracted pixel data, and encrypting the processed pixel data to generate a unique identifier corresponding to the browser fingerprint;

[0010] The currently generated identifier is compared with the previously saved identifier to identify whether the device the user logged in on is the same device.

[0011] In the second aspect, based on the same inventive concept, the present application also provides a browser fingerprint recognition device, including:

[0012] The creation module is configured to create a Canvas element and insert it into an HTML document;

[0013] A drawing module is configured to draw an image including browser information and computer information on the Canvas, and add random graphics on the Canvas;

[0014] A processing module is configured to extract pixel data of the entire Canvas area, perform image processing on the extracted pixel data, and perform encryption operation on the processed pixel data to generate a unique identifier corresponding to the browser fingerprint;

[0015] The identification module is configured to compare the currently generated identifier with the previously saved identifier to identify whether the device logged in by the user is the same device.

[0016] In a third aspect, based on the same inventive concept, the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect is implemented.

[0017] In a fourth aspect, based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0018] Compared with the prior art, the browser fingerprint recognition method, device, electronic device and storage medium described in this application have the following beneficial effects:

[0019] The browser fingerprint recognition method, device, electronic device and storage medium described in this application can track and identify users, improve user privacy protection without affecting user privacy, and can also be used to detect network attackers and fraudulent behavior, thereby enhancing network security and improving network performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 This is a flow chart of the browser fingerprint recognition method described in the embodiment of the present application;

[0022] Figure 2 This is a schematic diagram of the structure of the browser fingerprint recognition device described in the embodiment of the present application;

[0023] Figure 3This is a schematic diagram of the hardware structure of the electronic device described in the embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0025] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0026] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0027] See also Figure 1 As shown, this embodiment provides a browser fingerprint recognition method, which specifically includes the following steps:

[0028] Step S101: Create a Canvas element and insert it into an HTML document.

[0029] Specifically, in this embodiment, in the HTML document, a canvas tag is added to create a Canvas element, which is a Canvas element with a specified width (800 pixels) and height (600 pixels). The created Canvas element is inserted into the HTML, and when it is opened in the browser, the Canvas element will be displayed on the web page.

[0030] It should be noted that adding a line of prompt text (such as "Your browser does not support Canvas") inside the Canvas element can be displayed to users on browsers that do not support Canvas.

[0031] Step S102: Draw an image including browser information and computer information on the Canvas, and add random graphics on the Canvas.

[0032] In this embodiment, browser information and computer information are collected, and relevant information such as browser version, operating system, screen resolution, installed plug-ins, and language settings are obtained from the user's computer and browser. This information can be obtained through the browser API. For example, the browser version can be obtained through navigator.userAgent, the operating system information can be obtained through navigator.platform, and the screen resolution can be obtained through window.screen.width and window.screen.height.

[0033] Create a new Image object and set the URL of the image file as the src property of the object. After the image is loaded, use the drawImage() method to draw the image onto the Canvas. It should be noted here that during the drawing process, you can choose to draw the entire image or only part of it.

[0034] After the image is drawn, random shapes are drawn on or around the image. These shapes can be straight lines, circles, rectangles, etc., or more complex custom shapes, which will not be described in detail here.

[0035] Use random functions in JavaScript (such as Math.random()) to determine the position, size, and other properties of the shape. For example, the position of the shape is randomly determined based on the boundaries of the image, and the color can be randomly selected from a predefined array of colors.

[0036] Step S103: extract pixel data of the entire Canvas area, perform image processing on the extracted pixel data, and encrypt the processed pixel data to generate a unique identifier corresponding to the browser fingerprint.

[0037] In this embodiment, after drawing is completed, the pixel data of the entire Canvas area is extracted, where the pixel data includes the RGB value and Alpha channel value of each pixel, and every four array elements represent the color and transparency value of a pixel, which are red (R), green (G), blue (B) and transparency (Alpha) in order, and the value range of each channel is 0 to 255.

[0038] Perform various processing on the acquired pixel data to increase the complexity and visual effect of the data. The main processing methods include:

[0039] Compression: Reducing the number of pixels in an image or changing the size of an image to reduce the storage requirements of the data;

[0040] Rotation: perform coordinate transformation on image data and rotate the image at a certain angle;

[0041] Color inversion: Change the color value of each pixel, for example, invert the value of each color channel from 255 to the original value, so that the colors show a contrasting effect.

[0042] These manipulations not only change the visual appearance of the image, but also increase the complexity of the data, making the image more difficult to reproduce directly.

[0043] After the pixel data is processed, the hash value of the image is calculated using a hash algorithm to generate a hash value of a fixed length. Random data (salt value) is added before the hash, which will make the hash value different even if the original data is the same, increasing the difficulty of cracking.

[0044] In some implementations, the method further includes: saving the identifier corresponding to the generated browser fingerprint to the user's local storage for subsequent comparison.

[0045] Step S104: Compare the currently generated identifier with the previously saved identifier to identify whether the device logged in by the user is the same device.

[0046] Specifically, in this embodiment, when the user visits the website again, by comparing the currently generated fingerprint data (corresponding identifier) ​​with the previously saved fingerprint data (corresponding identifier), it is determined whether the user is the same device.

[0047] The method described in this embodiment can help network security experts identify different browsers, thereby enhancing network security while protecting user privacy. Specific effects include:

[0048] Enhanced Internet Security: Browser fingerprinting technology can be used to detect cyber attackers and fraudulent activities, thereby enhancing Internet security.

[0049] Improve user privacy protection: Since browser fingerprint recognition technology can identify users, it can improve user privacy protection without affecting user privacy.

[0050] Improve network performance: Through browser fingerprint recognition technology, websites can optimize their services and improve network performance.

[0051] In general, the browser fingerprint recognition technology described in this application can help protect user privacy while enhancing network security and improving network performance.

[0052] Based on the above method, the present application also provides a browser fingerprint recognition system implemented based on the above method, the system includes a fingerprint generator based on Canvas and a fingerprint database. The fingerprint generator is used to generate browser fingerprints and associate them with users, and the fingerprint database is used to store browser fingerprints and related information.

[0053] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0054] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the embodiment of the present application also provides a browser fingerprint recognition device.

[0055] like Figure 2 As shown, the browser fingerprint recognition device includes:

[0056] A creation module 11 is configured to create a Canvas element and insert it into an HTML document;

[0057] A drawing module 12 is configured to draw an image including browser information and computer information on the Canvas, and add random graphics on the Canvas;

[0058] The processing module 13 is configured to extract pixel data of the entire Canvas area, perform image processing on the extracted pixel data, and perform encryption operation on the processed pixel data to generate a unique identifier corresponding to the browser fingerprint;

[0059] The identification module 14 is configured to compare the currently generated identifier with the previously saved identifier to identify whether the device logged in by the user is the same device.

[0060] For the convenience of description, the above devices are described in terms of functions and are divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0061] The device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0062] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the above embodiments is implemented.

[0063] Figure 3A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0064] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0065] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0066] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0067] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0068] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0069] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0070] The electronic device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0071] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.

[0072] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0073] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0074] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0075] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0076] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0077] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A browser fingerprint recognition method, characterized in that: include: Create a Canvas element and insert it into the HTML document; Draw an image containing browser information and computer information on Canvas, and add random graphics on Canvas; Extracting pixel data of the entire Canvas area, performing image processing on the extracted pixel data, and performing encryption operation on the processed pixel data to generate a unique identifier corresponding to the browser fingerprint; The currently generated identifier is compared with the previously saved identifier to identify whether the device the user logged in on is the same device.

2. The method according to claim 1, characterized in that: Obtain browser information and computer information from the user's browser and computer, wherein the browser information includes at least the browser type and browser version; the computer information includes at least the operating system, screen resolution, installed plug-ins, and language settings.

3. The method according to claim 1, characterized in that The method of drawing an image including browser information and computer information on the Canvas and adding random graphics on the Canvas includes: An image including browser information and computer information is drawn on a Canvas, and a random graphic is drawn on or around the image, wherein a position and properties of the graphic are determined by a random function.

4. The method according to claim 1, characterized in that: The extracting pixel data of the entire Canvas area, performing image processing on the extracted pixel data, and performing encryption operation on the processed pixel data to generate a unique identifier corresponding to the browser fingerprint, includes: After the drawing is completed, the pixel data of the entire Canvas area is extracted, wherein the pixel data includes the RGB value and the Alpha channel value of each pixel; Performing image processing on the pixel data, including at least compression, rotation, and color flipping; The processed pixel data is used to calculate the image hash value through a hash algorithm, and the obtained hash value is used as the unique identifier of the browser fingerprint.

5. The method according to claim 4, characterized in that Also includes: The identifier corresponding to the generated browser fingerprint is saved in the user's local storage.

6. A browser fingerprint recognition device, characterized in that: include: The creation module is configured to create a Canvas element and insert it into an HTML document; A drawing module is configured to draw an image including browser information and computer information on the Canvas, and add random graphics on the Canvas; A processing module is configured to extract pixel data of the entire Canvas area, perform image processing on the extracted pixel data, and perform encryption operation on the processed pixel data to generate a unique identifier corresponding to the browser fingerprint; The identification module is configured to compare the currently generated identifier with the previously saved identifier to identify whether the device logged in by the user is the same device.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium, characterized in that: in, The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 5.