Abnormal login identification method and system for account
By establishing a mapping relationship between device ID and UUID in the device, the problem of uniqueness and stability of the device identification code is solved, and the security of account data is improved.
Patent Information
- Application Number
- CN202410892680.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-07-04
AI Technical Summary
In the existing technology, it is difficult to guarantee the global uniqueness of the device identification code, resulting in identification code conflicts and instability, which affects the security of account data.
By establishing a mapping relationship between device ID and UUID, UUID is randomly generated using a universal unique identification code algorithm to ensure the uniqueness of the device ID, and the mapping relationship is stored on the client. The device ID remains unchanged when the device information changes, and the historical account and device are combined The mapping relationship between IDs determines login anomalies.
It improves the stability and global uniqueness of the device identification code and accurately determines whether the target user account has logged in abnormally, thus improving the security of account data.
Smart Images

Figure CN118413408B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and system for identifying abnormal logins of an account. Background Art
[0002] In the current information technology field, with the popularization of the Internet and the widespread use of mobile devices, user account security issues have become increasingly prominent. In particular, the risk of customer account information leakage due to employee resignation, account sharing or other improper behavior continues to increase. In addition, service personnel abuse customer accounts to perform abnormal operations, further exacerbating data security risks.
[0003] In related technologies, device identification codes are often used to identify and track devices. Currently, it is difficult to ensure the global uniqueness of the device identification code generated by each device, which may lead to conflicts in device identification codes. At the same time, when the hardware or software environment of the device changes, the generated device identification code may change, affecting the identification and tracking of the device, resulting in poor stability of the device identification code, thereby reducing the security of account data. Summary of the invention
[0004] The embodiments of the present application provide a method and system for identifying abnormal logins of an account. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0005] In a first aspect, an embodiment of the present application provides a method for identifying abnormal login of an account, which is applied to a server, and the method includes:
[0006] Receive a login request sent by a client, the login request carries a first mapping relationship between a device ID and a UUID, an IP address, and a target user account, the first mapping relationship is stored in the client, and the UUID is randomly generated using a universal unique identifier algorithm;
[0007] According to the device ID, obtain the corresponding historical user account from the pre-stored second mapping relationship between the device ID and the user account; or according to the user account, obtain the corresponding historical device ID from the second mapping relationship;
[0008] Determine whether the target user account has login abnormalities based on historical user accounts or historical device IDs.
[0009] Optionally, based on historical user accounts, determine whether the target user account has login abnormalities, including:
[0010] Count the number of historical user accounts;
[0011] In the case where there are multiple historical user accounts, the historical user accounts are determined to be multiple user accounts associated with the device ID;
[0012] According to each historical user account, obtain the corresponding UUID and IP address from the pre-established third mapping relationship between the user account and the UUID and IP address;
[0013] Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account;
[0014] If yes, determine that the login device corresponding to the device ID logs in to multiple user accounts, and mark the target user account carried in the login request as abnormal login;
[0015] If not, determine that the device ID carried in the login request is associated with multiple login devices, and mark the target user account as having no login anomalies.
[0016] Optionally, determine whether the target user account has login abnormalities based on the historical device ID, including:
[0017] Count the number of historical device IDs;
[0018] In the case where there are multiple historical device IDs, the historical devices are determined to be multiple device IDs associated with the user account;
[0019] According to each historical device ID, obtaining the UUID and IP address of each historical device ID from a pre-established fourth mapping relationship between the device ID and the UUID and IP address;
[0020] Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account;
[0021] If yes, determine that the target user account carried in the login request is logged in on the same login device, and mark that there is no login anomaly in the target user account;
[0022] If not, it is determined that the target user account carried in the login request is logged in on multiple login devices, and the target user account carried in the login request is marked as an abnormal login.
[0023] Optionally, based on historical user accounts or historical device IDs, determine whether the target user account has login abnormalities, including:
[0024] When the number of historical user accounts is one, it is confirmed that the device ID carried in the login request is unique; or, when the number of historical device IDs is one, it is determined that the target user account carried in the login request logs in on the same login device;
[0025] When the device ID carried in the login request is unique or the target user account carried in the login request logs in on the same login device, it is determined that there is no abnormal login in the user account.
[0026] Optionally, the method further includes:
[0027] Storing a second mapping relationship between the device ID carried in the login request and the user account;
[0028] Store the third mapping relationship between the target user account and the UUID and IP address carried in the login request;
[0029] A fourth mapping relationship between the device ID carried in the login request and the UUID and IP address is stored.
[0030] Optionally, determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account, including:
[0031] Vectorize the UUID and IP address carried in the login request to obtain the target UUID vector and the target IP address vector;
[0032] Vectorize the UUID and IP address of each historical user account to obtain each first UUID vector and each first IP address vector;
[0033] The target UUID vector is used as the first central vector, and each first UUID vector is used as the edge vector of the first central vector for association, so as to obtain a UUID vector ring graph;
[0034] The target IP address vector is used as the second central vector, and each first IP address vector is used as an edge vector of the second central vector to associate, thereby obtaining an IP vector ring graph;
[0035] Based on the UUID vector ring graph and the IP vector ring graph, determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account.
[0036] Optionally, judging whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account according to the UUID vector ring graph and the IP vector ring graph, including:
[0037] In the UUID vector ring graph, calculating the distance metric between the target UUID vector and each first UUID vector to obtain a plurality of first similarities;
[0038] In the IP vector ring graph, calculating the distance metric between the target IP address vector and each first IP address vector to obtain a plurality of second similarities;
[0039] When multiple first similarities are exactly the same, determining that the UUID carried in the login request is consistent with the UUID of each historical user account;
[0040] According to a preset IP tolerance, a plurality of weighting factors of the second similarity are set, wherein the preset IP tolerance is to allow IP changes within the same network range;
[0041] According to the weighting factor, multiple second similarities are weighted and averaged to obtain a comprehensive similarity;
[0042] When the comprehensive similarity is greater than a preset threshold, it is determined that the IP address carried in the login request is consistent with the IP address of each historical user account;
[0043] The calculation formula of the first similarity or the second similarity is:
[0044]
[0045] in, is the target UUID vector or target IP address vector, is each first UUID vector or each first IP address vector, the first similarity or the second similarity is the straight-line distance between two points in the multidimensional space, and the smaller the distance, the more similar the vectors are.
[0046] In a second aspect, an embodiment of the present application provides a method for identifying abnormal login of an account, which is applied to a client, and the method includes:
[0047] In response to a login instruction for a target user account, create a device ID and a UUID of a target device for logging into the target user account, where the UUID is randomly generated using a universal unique identifier algorithm;
[0048] A first mapping relationship between storage device ID and UUID;
[0049] When there is no historical device ID in the target device, a login request including a first mapping relationship, an IP address and a target user account is generated and sent to the server, so that the server determines whether there is an abnormal login in the target user account based on a second mapping relationship between the device ID and the user account stored in advance.
[0050] Optionally, create the device ID and UUID of the target device that logs in to the target user account, including:
[0051] Collect browser information from the browser userAgent and information about the operating system running the browser, system resolution, color resolution, aspect ratio, time zone, and local storage support information to obtain multi-dimensional data;
[0052] Use Canvas fingerprint technology to draw a picture and generate a first base64 code, encrypt the first base64 code through MD5, and generate a canvas ID;
[0053] Use WebGL fingerprint technology to draw pictures and generate a second base64 code, encrypt the second base64 code through MD5, generate a webgl ID, and capture the information of the graphics card and GPU device graphics processing unit;
[0054] Generate a font ID by checking the font list supported by the system and performing MD5 encryption to differentiate devices by using the font library differences on the client.
[0055] Obtain client audio-related information and perform MD5 encryption to generate an audio ID;
[0056] Obtain the client camera related information, perform MD5 encryption, and generate the camera fingerprint;
[0057] The multi-dimensional data, canvas ID, webgl ID, font ID, audio ID and camera fingerprint are comprehensively encrypted to obtain the device ID of the target device that logs in the target user account;
[0058] The current UUID is randomly generated using a universal unique identifier algorithm as the UUID of the target device for logging into the target user account.
[0059] In a third aspect, an embodiment of the present application provides an abnormal login identification system for an account, the system comprising a client and a server;
[0060] The client is used to create a device ID and UUID of a target device for logging into the target user account in response to a login instruction for the target user account, where the UUID is randomly generated using a universal unique identifier algorithm; store a first mapping relationship between the device ID and the UUID; and if there is no historical device ID in the target device, generate a login request including the first mapping relationship, the IP address, and the target user account and send it to the server;
[0061] The server receives a login request sent by the client, where the login request carries a first mapping relationship between the device ID and the UUID, an IP address, and a user account; based on the device ID, the server obtains the corresponding historical user account from a pre-stored second mapping relationship between the device ID and the user account; or based on the user account, the server obtains the corresponding historical device ID from the second mapping relationship; and based on the historical user account or the historical device ID, determines whether there is an abnormal login in the target user account.
[0062] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0063] In an embodiment of the present application, on the one hand, by establishing a first mapping relationship between device ID and UUID, one device ID is bound to one UUID, and the UUID is randomly generated using a universal unique identifier algorithm, so that each device has a unique device ID, thereby ensuring that the device identification code generated by each device is unique globally; on the other hand, the first mapping relationship is stored on the client, so that when the browser version, graphics card, GPU and other information of the device changes, the device ID remains unchanged, thereby ensuring that the device identification code generated by each device is highly stable, and at the same time, through the pre-stored second mapping relationship between the device ID and the user account, it can be accurately determined whether the target user account has a login abnormality, thereby improving the security of the account data.
[0064] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0066] Figure 1 It is a flowchart of a method for identifying abnormal login of an account provided in an embodiment of the present application;
[0067] Figure 2 This is a schematic diagram of a process for determining whether a target user account has login abnormality based on multiple historical accounts provided by the present application;
[0068] Figure 3 This is a schematic diagram of a process for determining whether a target user account has a login abnormality based on multiple historical device IDs provided by the present application;
[0069] Figure 4 This is a schematic diagram of verification data for the uniqueness of a device ID provided by this application;
[0070] Figure 5 This is a schematic diagram of verification data of device ID stability provided by this application;
[0071] Figure 6 It is a flowchart of another method for identifying abnormal login of an account provided by the present application;
[0072] Figure 7 This is a schematic diagram of the process of reporting a device ID provided by this application;
[0073] Figure 8 It is a structural diagram of an abnormal login identification device for an account provided in an embodiment of the present application;
[0074] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The following description and the accompanying drawings sufficiently illustrate specific embodiments of the present application to enable those skilled in the art to practice them.
[0076] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0077] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of systems and methods consistent with some aspects of the present application as detailed in the attached claims.
[0078] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0079] The present application provides a method and system for identifying abnormal logins of an account to solve the problems existing in the above-mentioned related technical issues. In the embodiment of the present application, on the one hand, by establishing a first mapping relationship between a device ID and a UUID, a device ID is bound to a UUID, and the UUID is randomly generated using a universal unique identifier algorithm, so that each device has a unique device ID, ensuring the uniqueness of the device identification code generated by each device on a global scale; on the other hand, the first mapping relationship is stored in the client, so that when the browser version, graphics card, GPU and other information of the device changes, the device ID remains unchanged, ensuring the high stability of the device identification code generated by each device, and at the same time, the second mapping relationship between the pre-stored device ID and the user account can accurately determine whether the target user account has an abnormal login, thereby improving the security of the account data, which is described in detail using an exemplary embodiment below.
[0080] The following will be combined with the attached Figure 1 -Attached Figure 7 , the abnormal login identification method of an account provided by the embodiment of the present application is introduced in detail. The method can be implemented by relying on a computer program and can be run on an abnormal login identification device for an account based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0081] See also Figure 1 , which is a flowchart of a method for identifying abnormal login of an account provided in the embodiment of the present application, and is applied to the server. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0082] S101, receiving a login request sent by a client, the login request carries a first mapping relationship between a device ID and a UUID, an IP address, and a target user account, the first mapping relationship is stored in the client, and the UUID is randomly generated using a universally unique identifier algorithm. UUID (Universally Unique Identifier) is a standardized unique identifier, and a globally unique identifier can be generated using a UUID library.
[0083] Among them, the client is used to log in to the target user account. The client is installed on the device. The login request is used to request the server to determine whether the login of the target user account is abnormal. If there is no abnormality in the login, the target user account can be allowed to log in. The device ID is generated by the client based on the relevant information of the device. UUID is a widely used standardized unique identifier that is used to ensure uniqueness in distributed systems without central coordination. Each UUID is randomly generated with a very small probability of duplication. The IP address is the unique address of a network device on the Internet. It is used for communication between devices. Each device connected to the network is assigned an IP address.
[0084] In some embodiments, when a user logs in on a device on which the client is installed, the user enters a user account and other verification information, and submits the data by triggering a login component. After receiving the submitted user account and other verification information, the client obtains a first mapping relationship stored on the client. Based on the user account and other verification information and the first mapping relationship, the client generates a login request. The client sends the login request to the server, which receives the login request. The server parses the request content and extracts key information from it, including the device ID, the mapping relationship between the device ID and the UUID, the IP address, and the user account attempting to log in.
[0085] S102, according to the device ID, obtain the corresponding historical user account from the pre-stored second mapping relationship between the device ID and the user account; or according to the user account, obtain the corresponding historical device ID from the second mapping relationship;
[0086] The second mapping relationship stores all the data related to the device ID and the user account that have logged in.
[0087] Among them, if the system is configured to use the device ID for verification first, it will use the extracted device ID as a keyword to query the corresponding historical user account in the second mapping relationship. If the system is configured to use the user account for verification first, it will use the extracted user account as a keyword to query the corresponding historical device ID in the second mapping relationship.
[0088] In some embodiments, after obtaining the device ID carried in the login request, a traversal search can be performed from the second mapping relationship based on the device ID to find all historical user accounts that match the device ID. The historical user account can be one or more.
[0089] In other embodiments, after obtaining the target user account carried in the login request, a traversal search can be performed from the second mapping relationship based on the target user account to find all historical device IDs that match the target user account. The historical device ID can be one or more.
[0090] S103: Determine whether the target user account has a login abnormality based on the historical user account or the historical device ID.
[0091] In some embodiments, the specific process of determining whether there is an abnormal login of the target user account based on historical user accounts includes: counting the number of historical user accounts; when the number of historical user accounts is multiple, determining the historical user accounts as multiple user accounts associated with the device ID; according to each historical user account, obtaining the corresponding UUID and IP address from a pre-established third mapping relationship between the user account and the UUID and IP address; determining whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account; if so, determining that the login device corresponding to the device ID has logged in to multiple user accounts, and marking the target user account carried in the login request as an abnormal login; if not, determining that the device ID carried in the login request is associated with multiple login devices, and marking the target user account as having no login abnormality.
[0092] For example Figure 2 As shown, Figure 2 It is a schematic flowchart of a process for determining whether a target user account has a login abnormality based on multiple historical accounts. The corresponding historical user account is obtained from a second mapping relationship between a pre-stored device ID and a user account through a device ID to determine whether the same device ID is associated with multiple accounts. If not, it is determined that the device ID is unique and only one user is logged in to the same device, and there is no abnormality in the account at this time. If so, the corresponding UUID and IP address are obtained from a third mapping relationship between a pre-established user account and a UUID and an IP address based on each historical user account to determine whether the UUID and the IP address are consistent. If so, the device ID is unique and the same device has logged in to multiple accounts, and the account login is abnormal. If not, the device ID is not unique and multiple devices manage one device ID.
[0093] In other embodiments, the specific process of determining whether the target user account has a login abnormality based on the historical device ID includes: counting the number of historical device IDs; when the number of historical device IDs is multiple, determining the historical device as multiple device IDs associated with the user account; according to each historical device ID, obtaining the UUID and IP address of each historical device ID from the pre-established fourth mapping relationship between the device ID and the UUID and IP address; determining whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account; if so, determining that the target user account carried in the login request is logged in on the same login device, and marking the target user account as having no login abnormality; if not, determining that the target user account carried in the login request is logged in on multiple login devices, and marking the target user account carried in the login request as having an abnormal login.
[0094] For example Figure 3 As shown, Figure 3 It is a schematic flowchart of a process for determining whether a target user account has logged in abnormally based on multiple historical device IDs. According to the user account, the corresponding historical device ID is obtained from the second mapping relationship to determine whether the same account is associated with multiple device IDs. If not, it is determined that the user has logged in on the same device. If so, according to each historical device ID, the UUID and IP address of each historical device ID are obtained from the fourth mapping relationship between the pre-established device ID and the UUID and IP address to determine whether the UUID and IP address are consistent. If so, it is determined that the user has logged in on the same device. If not, the user has logged in on multiple login devices, and the target user account carried in the login request is marked as having logged in abnormally.
[0095] Specifically, the specific process of determining whether there is an abnormal login of the target user account based on historical user accounts or historical device IDs includes: when the number of historical user accounts is one, ensuring that the device ID carried in the login request is unique; or, when the number of historical device IDs is one, determining that the target user account carried in the login request is logged in on the same login device; when the device ID carried in the login request is unique or the target user account carried in the login request is logged in on the same login device, determining that there is no abnormal login to the user account.
[0096] For example Figure 4 and Figure 5 As shown, in terms of the uniqueness and stability of the device ID, after the abnormal login identification of the present application, the identification accuracy can be around 90%.
[0097] Specifically, the specific process of determining whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account includes: vectorizing the UUID and IP address carried in the login request to obtain a target UUID vector and a target IP address vector; vectorizing the UUID and IP address of each historical user account to obtain each first UUID vector and each first IP address vector; using the target UUID vector as the first center vector and associating each first UUID vector as an edge vector of the first center vector to obtain a UUID vector ring graph; using the target IP address vector as the second center vector and associating each first IP address vector as an edge vector of the second center vector to obtain an IP vector ring graph; determining whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account based on the UUID vector ring graph and the IP vector ring graph.
[0098] In an embodiment of the present application, the present application can more accurately identify the consistency of user devices based on the matching algorithm of the UUID vector ring graph and the IP vector ring graph, improve the security of login verification, and reduce the risk of illegal login.
[0099] Specifically, the specific process of judging whether the UUID and IP address carried by the login request are consistent with the UUID and IP address of each historical user account according to the UUID vector ring graph and the IP vector ring graph includes: in the UUID vector ring graph, calculating the distance measurement between the target UUID vector and each first UUID vector to obtain multiple first similarities; in the IP vector ring graph, calculating the distance measurement between the target IP address vector and each first IP address vector to obtain multiple second similarities; when the multiple first similarities are exactly the same, determining that the UUID carried by the login request is consistent with the UUID of each historical user account; according to the preset IP margin, setting the weighting factors of the multiple second similarities, the preset IP margin is to allow IP changes within the same network range; according to the weighting factor, weighted summing and averaging the multiple second similarities to obtain the comprehensive similarity; when the comprehensive similarity is greater than the preset threshold, determining that the IP address carried by the login request is consistent with the IP address of each historical user account; wherein the calculation formula of the first similarity or the second similarity is:
[0100]
[0101] in, is the target UUID vector or target IP address vector, is each first UUID vector or each first IP address vector, the first similarity or the second similarity is the straight-line distance between two points in the multidimensional space, and the smaller the distance, the more similar the vectors are.
[0102] In an embodiment of the present application, a second mapping relationship between a device ID carried in a login request and a user account is stored; a third mapping relationship between a target user account carried in a login request and a UUID, an IP address is stored; and a fourth mapping relationship between a device ID carried in a login request and a UUID, an IP address is stored.
[0103] In an embodiment of the present application, on the one hand, by establishing a first mapping relationship between device ID and UUID, one device ID is bound to one UUID, and the UUID is randomly generated using a universal unique identifier algorithm, so that each device has a unique device ID, thereby ensuring that the device identification code generated by each device is unique globally; on the other hand, the first mapping relationship is stored on the client, so that when the browser version, graphics card, GPU and other information of the device changes, the device ID remains unchanged, thereby ensuring that the device identification code generated by each device is highly stable, and at the same time, through the pre-stored second mapping relationship between the device ID and the user account, it can be accurately determined whether the target user account has a login abnormality, thereby improving the security of the account data.
[0104] See also Figure 6 , which is a flowchart of a method for identifying abnormal login of an account provided in an embodiment of the present application, and is applied to a client. Figure 6 As shown, the method of the embodiment of the present application may include the following steps:
[0105] S201, in response to a login instruction for a target user account, creating a device ID and a UUID of a target device for logging into the target user account, where the UUID is randomly generated using a universal unique identifier algorithm;
[0106] In some embodiments, the specific process of creating a device ID and UUID of a target device for logging into a target user account includes: collecting browser information from a browser userAgent and information about the operating system running the browser, system resolution, color resolution, aspect ratio, time zone, and local storage support information to obtain multi-dimensional data; using Canvas fingerprint technology to draw a picture and generate a first base64 code, encrypting the first base64 code through MD5 to generate a canvas ID; using WebGL fingerprint technology to draw a picture and generate a second base64 code, encrypting the second base64 code through MD5 to generate a webgl ID to capture information about a graphics card and a graphics processing unit of a GPU device; generating a font ID by checking a list of fonts supported by the system and performing MD5 encryption to distinguish devices by using font library differences on the client; obtaining client audio related information and performing MD5 encryption to generate an audio ID; obtaining client camera related information and performing MD5 encryption to generate a camera fingerprint; combining multi-dimensional data, canvas ID, webgl ID, font The ID, audio ID and camera fingerprint are comprehensively encrypted to obtain the device ID of the target device that logs in to the target user account; the universal unique identification code algorithm is used to randomly generate the UUID at the current moment as the UUID of the target device that logs in to the target user account.
[0107] Among them, userAgent is a string sent by the browser to the server, which contains information such as browser type, version, operating system, etc. The userAgent string is usually used on the server side to identify the type and characteristics of the client browser in order to provide appropriate content and functions. Canvas is an element of HTML5 that can be used to draw graphics. WebGL is a technology for rendering 3D graphics on web pages. Base64 encoding is a method for transmitting binary data on the network. It converts binary data into 64 printable ASCII characters. This encoding method is often used to securely transmit data on media that do not support binary data, such as in text environments such as emails, URLs, and web pages.
[0108] Resolution refers to the number of pixels that can be displayed on the screen, usually expressed as horizontal pixels × vertical pixels, for example, 1920 × 1080, which means that the screen has 1920 pixels horizontally and 1080 pixels vertically. The higher the pixel resolution, the clearer the image displayed on the screen.
[0109] Color resolution, also known as color depth or bit depth, refers to the number of colors that can be displayed per pixel. For example, a screen with 24-bit color resolution can display approximately 16.77 million colors (2^24). The higher the color resolution, the richer the colors displayed on the screen and the more realistic the image.
[0110] The aspect ratio is the ratio of the screen width to the height, usually expressed as a ratio, such as 16:9 or 4:3. The aspect ratio affects the shape of the image displayed on the screen, and different aspect ratios are suitable for different viewing experiences and content formats.
[0111] Among them, the time zone information can provide the geographical location information of the device and is also used for device identification.
[0112] S202, storing a first mapping relationship between a device ID and a UUID;
[0113] In some embodiments, after obtaining the first mapping relationship between the device ID and the UUID, a local storage technology such as localStorage, sessionStorage or cookies may be used to store the mapping relationship.
[0114] S203, when there is no historical device ID in the target device, generates a login request including a first mapping relationship, an IP address and a target user account and sends it to the server, so that the server determines whether there is a login abnormality in the target user account based on a pre-stored second mapping relationship between the device ID and the user account.
[0115] For example Figure 7 As shown, Figure 7 This is a flow chart of device ID reporting provided by this application. The device ID can be generated through browser information, hardware information, time zone, Canvas fingerprint, webgl fingerprint, Audio fingerprint and camera fingerprint, and it is determined whether there is a historical device ID stored locally. If there is a historical device ID in the target device, the historical device ID is obtained, and the historical device ID is compared with the current device ID to determine whether there is a change. If there is a change, both the current device ID and the historical device ID are reported to the server. If there is no change, only the current device ID is reported to the server.
[0116] In an embodiment of the present application, on the one hand, by establishing a first mapping relationship between device ID and UUID, one device ID is bound to one UUID, and the UUID is randomly generated using a universal unique identifier algorithm, so that each device has a unique device ID, thereby ensuring that the device identification code generated by each device is unique globally; on the other hand, the first mapping relationship is stored on the client, so that when the browser version, graphics card, GPU and other information of the device changes, the device ID remains unchanged, thereby ensuring that the device identification code generated by each device is highly stable, and at the same time, through the pre-stored second mapping relationship between the device ID and the user account, it can be accurately determined whether the target user account has a login abnormality, thereby improving the security of the account data.
[0117] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0118] See also Figure 8 , which shows a schematic diagram of the structure of an abnormal login identification device for an account provided by an exemplary embodiment of the present application. The abnormal login identification device for an account can be implemented as all or part of an electronic device through software, hardware or a combination of both. The device 1 includes a receiving module 10, an acquisition module 20, and a judgment module 30.
[0119] The receiving module 10 is used to receive a login request sent by a client, the login request carries a first mapping relationship between a device ID and a UUID, an IP address, and a target user account, the first mapping relationship is stored in the client, and the UUID is randomly generated using a universal unique identifier algorithm;
[0120] The acquisition module 20 is used to acquire the corresponding historical user account from the pre-stored second mapping relationship between the device ID and the user account according to the device ID; or to acquire the corresponding historical device ID from the second mapping relationship according to the user account;
[0121] The judgment module 30 is used to judge whether the target user account has a login abnormality according to the historical user account or the historical device ID.
[0122] It should be noted that the abnormal login identification device for an account provided in the above embodiment only uses the division of the above functional modules as an example when executing the abnormal login identification method for an account. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the abnormal login identification device for an account provided in the above embodiment and the abnormal login identification method embodiment for an account belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0123] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0124] In an embodiment of the present application, on the one hand, by establishing a first mapping relationship between device ID and UUID, one device ID is bound to one UUID, and the UUID is randomly generated using a universal unique identifier algorithm, so that each device has a unique device ID, thereby ensuring that the device identification code generated by each device is unique globally; on the other hand, the first mapping relationship is stored on the client, so that when the browser version, graphics card, GPU and other information of the device changes, the device ID remains unchanged, thereby ensuring that the device identification code generated by each device is highly stable, and at the same time, through the pre-stored second mapping relationship between the device ID and the user account, it can be accurately determined whether the target user account has a login abnormality, thereby improving the security of the account data.
[0125] The present application also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the abnormal login identification method for an account provided by each of the above-mentioned method embodiments.
[0126] The present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the abnormal login identification method for an account in each of the above-mentioned method embodiments.
[0127] See also Fig. 9 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0128] The communication bus 1002 is used to realize the connection and communication between these components.
[0129] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0130] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0131] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0132] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Fig. 9 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an abnormal login identification application for an account.
[0133] exist Fig. 9In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the abnormal login identification application of the account stored in the memory 1005, and specifically perform the following operations:
[0134] Receive a login request sent by a client, the login request carries a first mapping relationship between a device ID and a UUID, an IP address, and a target user account, the first mapping relationship is stored in the client, and the UUID is randomly generated using a universal unique identifier algorithm;
[0135] According to the device ID, obtain the corresponding historical user account from the pre-stored second mapping relationship between the device ID and the user account; or according to the user account, obtain the corresponding historical device ID from the second mapping relationship;
[0136] Determine whether the target user account has login abnormalities based on historical user accounts or historical device IDs.
[0137] In one embodiment, when the processor 1001 determines whether the target user account has a login abnormality based on the historical user account, the processor 1001 specifically performs the following operations:
[0138] Count the number of historical user accounts;
[0139] In the case where there are multiple historical user accounts, the historical user accounts are determined to be multiple user accounts associated with the device ID;
[0140] According to each historical user account, obtain the corresponding UUID and IP address from the pre-established third mapping relationship between the user account and the UUID and IP address;
[0141] Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account;
[0142] If yes, determine that the login device corresponding to the device ID logs in to multiple user accounts, and mark the target user account carried in the login request as abnormal login;
[0143] If not, determine that the device ID carried in the login request is associated with multiple login devices, and mark the target user account as having no login anomalies.
[0144] In one embodiment, when the processor 1001 determines whether the target user account has a login abnormality according to the historical device ID, the processor 1001 specifically performs the following operations:
[0145] Count the number of historical device IDs;
[0146] In the case where there are multiple historical device IDs, the historical devices are determined to be multiple device IDs associated with the user account;
[0147] According to each historical device ID, obtaining the UUID and IP address of each historical device ID from a pre-established fourth mapping relationship between the device ID and the UUID and IP address;
[0148] Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account;
[0149] If yes, determine that the target user account carried in the login request is logged in on the same login device, and mark that there is no login anomaly in the target user account;
[0150] If not, it is determined that the target user account carried in the login request is logged in on multiple login devices, and the target user account carried in the login request is marked as an abnormal login.
[0151] In one embodiment, when the processor 1001 determines whether the target user account has a login abnormality according to the historical user account or the historical device ID, the processor 1001 specifically performs the following operations:
[0152] When the number of historical user accounts is one, it is confirmed that the device ID carried in the login request is unique; or, when the number of historical device IDs is one, it is determined that the target user account carried in the login request logs in on the same login device;
[0153] When the device ID carried in the login request is unique or the target user account carried in the login request logs in on the same login device, it is determined that there is no abnormal login in the user account.
[0154] In one embodiment, the processor 1001 further performs the following operations:
[0155] Storing a second mapping relationship between the device ID carried in the login request and the user account;
[0156] Store the third mapping relationship between the target user account and the UUID and IP address carried in the login request;
[0157] A fourth mapping relationship between the device ID carried in the login request and the UUID and IP address is stored.
[0158] In one embodiment, when the processor 1001 determines whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account, the processor 1001 specifically performs the following operations:
[0159] Vectorize the UUID and IP address carried in the login request to obtain the target UUID vector and the target IP address vector;
[0160] Vectorize the UUID and IP address of each historical user account to obtain each first UUID vector and each first IP address vector;
[0161] The target UUID vector is used as the first central vector, and each first UUID vector is used as the edge vector of the first central vector for association, so as to obtain a UUID vector ring graph;
[0162] The target IP address vector is used as the second central vector, and each first IP address vector is used as an edge vector of the second central vector to associate, thereby obtaining an IP vector ring graph;
[0163] Based on the UUID vector ring graph and the IP vector ring graph, determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account.
[0164] In one embodiment, when the processor 1001 determines whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account according to the UUID vector ring graph and the IP vector ring graph, the processor 1001 specifically performs the following operations:
[0165] In the UUID vector ring graph, calculating the distance metric between the target UUID vector and each first UUID vector to obtain a plurality of first similarities;
[0166] In the IP vector ring graph, calculating the distance metric between the target IP address vector and each first IP address vector to obtain a plurality of second similarities;
[0167] When multiple first similarities are exactly the same, determining that the UUID carried in the login request is consistent with the UUID of each historical user account;
[0168] According to a preset IP tolerance, a plurality of weighting factors of the second similarity are set, wherein the preset IP tolerance is to allow IP changes within the same network range;
[0169] According to the weighting factor, multiple second similarities are weighted and averaged to obtain a comprehensive similarity;
[0170] When the comprehensive similarity is greater than a preset threshold, it is determined that the IP address carried in the login request is consistent with the IP address of each historical user account;
[0171] The calculation formula of the first similarity or the second similarity is:
[0172]
[0173] in, is the target UUID vector or target IP address vector, is each first UUID vector or each first IP address vector, the first similarity or the second similarity is the straight-line distance between two points in the multidimensional space, and the smaller the distance, the more similar the vectors are.
[0174] In an embodiment of the present application, on the one hand, by establishing a first mapping relationship between device ID and UUID, one device ID is bound to one UUID, and the UUID is randomly generated using a universal unique identifier algorithm, so that each device has a unique device ID, thereby ensuring that the device identification code generated by each device is unique globally; on the other hand, the first mapping relationship is stored on the client, so that when the browser version, graphics card, GPU and other information of the device changes, the device ID remains unchanged, thereby ensuring that the device identification code generated by each device is highly stable, and at the same time, through the pre-stored second mapping relationship between the device ID and the user account, it can be accurately determined whether the target user account has a login abnormality, thereby improving the security of the account data.
[0175] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program for identifying abnormal logins of an account can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium of the program for identifying abnormal logins of an account can be a disk, an optical disk, a read-only storage memory, or a random access storage memory, etc.
[0176] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for identifying abnormal login of an account, characterized in that: Applied to the server, the method includes: Receive a login request sent by a client, the login request carrying a first mapping relationship between a device ID and a UUID, an IP address, and a target user account, the first mapping relationship being stored in the client, and the UUID being randomly generated using a universal unique identifier algorithm; According to the device ID, obtain the corresponding historical user account from a pre-stored second mapping relationship between the device ID and the user account; or according to the user account, obtain the corresponding historical device ID from the second mapping relationship; According to the historical user account or historical device ID, determine whether the target user account has login abnormality; wherein, Judging whether the target user account has a login abnormality according to the historical user account includes: Counting the number of historical user accounts; In the case where there are multiple historical user accounts, determining the historical user accounts as multiple user accounts associated with the device ID; According to each historical user account, obtain the corresponding UUID and IP address from the pre-established third mapping relationship between the user account and the UUID and IP address; Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account; If yes, determine that the login device corresponding to the device ID logs in to multiple user accounts, and mark the target user account carried in the login request as abnormally logged in; If not, determine that the device ID carried in the login request is associated with multiple login devices, and mark the target user account as having no login anomaly; wherein, Judging whether the target user account has a login abnormality according to the historical device ID includes: Counting the number of historical device IDs; In the case where there are multiple historical device IDs, determining the historical devices as multiple device IDs associated with the user account; According to each historical device ID, obtaining the UUID and IP address of each historical device ID from a pre-established fourth mapping relationship between the device ID and the UUID and IP address; Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account; If yes, determine that the target user account carried in the login request logs in on the same login device, and mark that there is no login anomaly with the target user account; If not, it is determined that the target user account carried in the login request is logged in on multiple login devices, and the target user account carried in the login request is marked as abnormally logged in; wherein, The determining, based on the historical user account or the historical device ID, whether the target user account has a login abnormality includes: When the number of the historical user accounts is one, it is confirmed that the device ID carried in the login request is unique; or, when the number of the historical device ID is one, it is determined that the target user account carried in the login request logs in on the same login device; When the device ID carried in the login request is unique or the target user account carried in the login request logs in on the same login device, it is determined that there is no abnormal login for the user account.
2. The method according to claim 1, characterized in that The method further comprises: Storing a second mapping relationship between the device ID carried in the login request and the user account; Storing a third mapping relationship between the target user account and the UUID and IP address carried in the login request; A fourth mapping relationship between the device ID carried in the login request and the UUID and IP address is stored.
3. The method according to claim 1 or 2, characterized in that: The determining whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account includes: Vectorize the UUID and IP address carried in the login request to obtain a target UUID vector and a target IP address vector; Vectorize the UUID and IP address of each historical user account to obtain each first UUID vector and each first IP address vector; The target UUID vector is used as a first central vector, and each of the first UUID vectors is used as an edge vector of the first central vector for association, so as to obtain a UUID vector ring graph; The target IP address vector is used as a second central vector, and each of the first IP address vectors is used as an edge vector of the second central vector for association, so as to obtain an IP vector ring graph; According to the UUID vector ring graph and the IP vector ring graph, determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account.
4. The method according to claim 3, characterized in that The determining, according to the UUID vector ring graph and the IP vector ring graph, whether the UUID and the IP address carried in the login request are consistent with the UUID and the IP address of each historical user account includes: In the UUID vector ring graph, calculating the distance metric between the target UUID vector and each of the first UUID vectors to obtain a plurality of first similarities; In the IP vector ring graph, calculating the distance metric between the target IP address vector and each of the first IP address vectors to obtain a plurality of second similarities; When the multiple first similarities are exactly the same, determining that the UUID carried in the login request is consistent with the UUID of each historical user account; According to a preset IP tolerance, weighting factors of the plurality of second similarities are set, wherein the preset IP tolerance is to allow IP changes within the same network range; According to the weighting factor, weighted summing and averaging the plurality of second similarities is performed to obtain a comprehensive similarity; When the comprehensive similarity is greater than a preset threshold, it is determined that the IP address carried in the login request is consistent with the IP address of each historical user account; wherein, The calculation formula of the first similarity or the second similarity is: in, is the target UUID vector or target IP address vector, For each first UUID vector or each first IP address vector, the first similarity or the second similarity is the straight-line distance between two points in the multidimensional space, and the smaller the distance, the more similar the vectors are.
5. A method for identifying abnormal login of an account, characterized in that: Applied to a client, the method comprises: In response to a login instruction for a target user account, create a device ID and a UUID of a target device for logging into the target user account, wherein the UUID is randomly generated using a universal unique identifier algorithm; Storing a first mapping relationship between the device ID and the UUID; When there is no historical device ID in the target device, a login request including the first mapping relationship, IP address and target user account is generated and sent to the server, so that the server determines whether the target user account has a login abnormality based on an abnormal login identification method for an account as described in claim 1.
6. The method according to claim 5, characterized in that Create the device ID and UUID of the target device for logging into the target user account, including: Collect browser information from the browser userAgent and information about the operating system running the browser, system resolution, color resolution, aspect ratio, time zone, and local storage support information to obtain multi-dimensional data; Draw a picture using Canvas fingerprint technology and generate a first base64 code, encrypt the first base64 code using MD5 to generate a canvas ID; Draw a picture using WebGL fingerprint technology and generate a second base64 code, encrypt the second base64 code using MD5, generate a webgl ID, and capture information of a graphics card and a GPU device graphics processing unit; Generate a font ID by checking a font list supported by the system and performing MD5 encryption, so as to distinguish devices by utilizing the font library difference on the client; Obtain the client audio related information and perform MD5 encryption to generate an audio ID; Obtain the client camera related information, perform MD5 encryption, and generate a camera fingerprint; The multi-dimensional data, canvas ID, webgl ID, font ID, audio ID and camera fingerprint are comprehensively encrypted to obtain the device ID of the target device that logs in the target user account; A universal unique identifier algorithm is used to randomly generate a UUID at the current moment as the UUID of the target device for logging into the target user account.
7. An abnormal login identification system for an account, characterized in that: The system includes a client and a server; The client is used to create a device ID and a UUID of a target device for logging into the target user account in response to a login instruction for the target user account, wherein the UUID is randomly generated using a universal unique identifier algorithm; and store a first mapping relationship between the device ID and the UUID; If the target device does not have a historical device ID, generate a login request including the first mapping relationship, the IP address and the target user account and send it to the server; The server receives a login request sent by a client, the login request carries a first mapping relationship between a device ID and a UUID, an IP address, and a user account; obtains a corresponding historical user account from a pre-stored second mapping relationship between a device ID and a user account according to the device ID; or obtains a corresponding historical device ID from the second mapping relationship according to the user account; determines whether the target user account has a login abnormality according to the historical user account or the historical device ID; wherein, Judging whether the target user account has a login abnormality according to the historical user account includes: Counting the number of historical user accounts; In the case where there are multiple historical user accounts, determining the historical user accounts as multiple user accounts associated with the device ID; According to each historical user account, obtain the corresponding UUID and IP address from the pre-established third mapping relationship between the user account and the UUID and IP address; Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account; If yes, determine that the login device corresponding to the device ID logs in to multiple user accounts, and mark the target user account carried in the login request as abnormally logged in; If not, determine that the device ID carried in the login request is associated with multiple login devices, and mark the target user account as having no login anomaly; wherein, Judging whether the target user account has a login abnormality according to the historical device ID includes: Counting the number of historical device IDs; In the case where there are multiple historical device IDs, determining the historical devices as multiple device IDs associated with the user account; According to each historical device ID, obtaining the UUID and IP address of each historical device ID from a pre-established fourth mapping relationship between the device ID and the UUID and IP address; Determine whether the UUID and IP address carried in the login request are consistent with the UUID and IP address of each historical user account; If yes, determine that the target user account carried in the login request logs in on the same login device, and mark that there is no login anomaly with the target user account; If not, it is determined that the target user account carried in the login request is logged in on multiple login devices, and the target user account carried in the login request is marked as abnormally logged in; wherein, The determining, based on the historical user account or the historical device ID, whether the target user account has a login abnormality includes: When the number of the historical user accounts is one, it is confirmed that the device ID carried in the login request is unique; or, when the number of the historical device ID is one, it is determined that the target user account carried in the login request logs in on the same login device; In the case that the device ID carried in the login request is unique or the target user account carried in the login request logs in on the same login device, it is determined that there is no abnormal login for the user account.
Citation Information
Patent Citations
Method and device for acquiring login information
CN111405322A
Model training and abnormal account recognition method and device
CN111639687A
