A method for third-party SDK to identify user's unique ID
By storing and matching device IDs and login methods in the YX.user data table, identifying the user's unique identity tag OneID solves the user identification problem and achieves accurate identification and intelligent content recommendation under different login methods or devices.
Patent Information
- Application Number
- CN202310312140.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-03-28
AI Technical Summary
Existing technology cannot effectively identify a user's unique identity when using different login methods or devices, resulting in confusing data records and poor intelligent content recommendations.
The method of identifying the user's unique ID through a third-party SDK uses the YX.user data table to store the device ID and login method, matches and returns the user's unique identity tag OneID, records user operation events, and performs data supplement and update based on the OneID to achieve Accurate identification of user identity.
It achieves effective identification when users use different login methods or devices, ensuring the accuracy of data records and the accuracy of intelligent content recommendations.
Smart Images

Figure CN116366329B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and more specifically to a method for a third-party SDK to identify a user's unique ID. Background Art
[0002] At present, on most websites or apps, users have different login IDs, log in on multiple terminals, or change devices at the same time. Therefore, how to identify unique users will be a key factor affecting intelligent content recommendation. In many third-party SDK data statistics products, it is impossible to effectively identify the unique ID of the user identity. In particular, when users use different login methods (for example: WeChat, mobile phone number, Apple ID), switch devices, or log in on multiple devices at the same time (for example: PC, Apple, Android), it is impossible to accurately identify the same user identity, resulting in confusion in data records, and the same user's operation behavior is scattered and recorded as multiple people.
[0003] Therefore, how to perform effective identity recognition when a user logs in using different login methods or devices to perform intelligent content recommendation is a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] In view of this, the present invention provides a method for a third-party SDK to identify a user's unique ID, which can perform effective identity recognition when the user logs in using different login methods or devices.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A method for a third-party SDK to identify a user's unique ID, comprising:
[0007] Enter the third-party SDK page. When the SDK is not logged in, the SDK obtains the device ID and reports the device ID to the server.
[0008] The server pre-stores the YX.user data table. If the device ID does not exist in the YX.user data table, a new record is inserted into the YX.user data table to record the device ID. If the device ID exists in the YX.user data table, no new record is inserted into the YX.user data table.
[0009] When the SDK is in the login state, the SDK reports the device ID and login method to the server at the same time;
[0010] The server matches and supplements the YX.user data table according to the device ID and login method, and returns the user's unique identity tag OneID to the SDK for local storage;
[0011] When operating the SDK, if you are not logged in, the server will use the device ID in the most recent data recorded in the YX.user data table as the basis and record the operation events under the device ID in the most recent data; if you are logged in, the server will use the OneID in the most recent data recorded in the YX.user data table as the basis and record the operation events under the OneID in the most recent data.
[0012] Furthermore, the YX.user data table includes: a user unique identity field, a device ID field, a login method field, a software ID field, and a login status field.
[0013] Furthermore, the login method field includes: a mobile phone account field, a WeChat account field, and an Apple account field.
[0014] Furthermore, the server updates or supplements the YX.user data table according to the device ID and login method, including:
[0015] When no login account is matched under the Login Method field, but the current device ID is matched under the Device ID field, it means that a new user is registering to log in to the old device. The server writes the current login account under the Login Method field in the corresponding Device ID row in the YX.user data table;
[0016] When the current login account is matched under the Login Method field, and the current device ID is matched under the Device ID field, it means that the old user is logging in and the device has not been changed. The server does not perform any operations on the YX.user data table;
[0017] When a login account already exists in the Login Method field, but the existing login account does not match the current login account, and the Device ID field matches the current device ID, it means that a new user is logging into an old device. The server inserts a new record in the YX.user data table, writes the current login account in the Login Method field of the new record, writes the new OneID in the User Unique Identity field, and keeps the other fields the same as the previous record;
[0018] When the current login account is matched under the Login Method field, and the device ID already exists under the Device ID field, but the existing device ID does not match the current device ID, it means that the old user has replaced the new device. The server will modify the existing device ID in the YX.user data table to the current device ID.
[0019] Furthermore, when operating the SDK, the SDK first checks whether the user's unique identity tag OneID is stored locally. If it exists, the OneID is reported to the server. If it does not exist, the device ID and login status are reported to the server.
[0020] The server records the operation events under different device IDs or OneIDs in the operation event table YX.Events_Log.
[0021] Furthermore, the operation event table YX.Events_Log includes: an identification field, an operation page field, a software ID field, and a login status field; wherein the identification field is a device ID or OneID.
[0022] Furthermore, the operation event table YX.Events_Log is used to record a series of operation events of the user on the SDK after identifying the user identity or device ID; the server determines the user's preferences based on the operation event table YX.Events_Log and pushes relevant content.
[0023] It can be seen from the above technical solution that compared with the prior art, the present invention discloses a method for a third-party SDK to identify a user's unique identity ID, which can be used for third-party SDK statistics of programs such as PC, Apple, and Android. When a user uses different login methods (for example, WeChat, mobile phone number, Apple ID), and switches devices, or logs in on multiple devices at the same time (for example, PC, Apple, and Android), the YX.user data table is updated and supplemented with data. The last piece of data is used as the basis to accurately identify the user's unique identity tag OneID. By effectively identifying the user when logging in using different login methods or devices, accurate intelligent content recommendations can be achieved.
[0024] At the same time, the method of the present invention is also applicable to simultaneously serving as unique ID statistics for multiple software third-party SDK user identities. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0026] Figure 1 A flowchart of the method for the third-party SDK to identify the unique ID of a user provided by the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] like Figure 1 As shown, the embodiment of the present invention discloses a method for a third-party SDK to identify a user's unique ID, including the following steps:
[0029] Enter the third-party SDK page. When the SDK is not logged in, the SDK obtains the device ID and reports the device ID to the server. The server pre-stores the YX.user data table. If the device ID does not exist in the YX.user data table, a new record is inserted into the YX.user data table to record the device ID. If the device ID exists in the YX.user data table, a new record is not inserted into the YX.user data table.
[0030] When the SDK is in the login state, the SDK reports the device ID and login method to the server at the same time. Specifically, the dis_id parameter can be used to report the device ID and login method to the server. The login method can be login with a mobile phone number, WeChat, or Apple account.
[0031] The server matches and supplements the YX.user data table according to the device ID and login method, and returns the user's unique identity tag OneID to the SDK for local storage;
[0032] When operating the SDK, if you are not logged in, the server will use the device ID in the most recent data recorded in the YX.user data table as the basis and record the operation events under the device ID in the most recent data; if you are logged in, the server will use the OneID in the most recent data recorded in the YX.user data table as the basis and record the operation events under the OneID in the most recent data.
[0033] After that, the server pushes relevant smart content based on the operation event under OneID in the most recent data.
[0034] The YX.user data table contains: user unique identity field, device ID field, login method field, software ID field and login status field. The login method field contains: mobile phone account field, WeChat account field and Apple account field.
[0035] Specifically, the server updates or supplements the YX.user data table according to the device ID and login method, including four situations:
[0036] 1. When no login account is matched under the Login Method field, but the current device ID is matched under the Device ID field, it means that a new user is registering to log in to the old device. The server writes the current login account under the Login Method field in the corresponding Device ID row in the YX.user data table;
[0037] Taking mobile phone account login as an example, the mobile phone account (Phone) field does not match the mobile phone number, and the device ID (DevID) (for example, D1) has a query result. The server writes the mobile phone number (for example, P1) in the corresponding device ID (for example, D1) row of the YX.user data table, indicating that it is a new user registration login, as shown in Table 1:
[0038] Table 1
[0039]
[0040] 2. When the current login account is matched under the Login Method field, and the current device ID is matched under the Device ID field, it means that the old user is logging in and the device has not been changed. The server does not perform any operations on the YX.user data table;
[0041] 3. When a login account already exists in the Login Method field, but the existing login account does not match the current login account, and the Device ID field matches the current device ID, it means that a new user is logging in to an old device. The server inserts a new record in the YX.user data table, writes the current login account in the Login Method field of the new record, and writes the new OneID in the User Unique Identity field. The other fields remain the same as the previous record.
[0042] Taking the mobile phone account as an example, if the queried user's mobile phone number (for example, P2) is not empty and is different, it means that a new user has registered and logged in to the old device. Then, a new record is inserted into the YX.user data table for the new user's mobile phone number (for example, P2) of the old device, and the OneID field automatically generates a new value. As shown in Table 2:
[0043] Table 2
[0044]
[0045] 4. When the current login account is matched under the Login Method field, and the device ID already exists under the Device ID field, but the existing device ID does not match the current device ID, it means that the old user has replaced the new device. The server will modify the existing device ID in the YX.user data table to the current device ID.
[0046] For example, if the query results in a match for the user's mobile phone number (such as P1), but there is no match for the DevID field (such as D2), it means that the old user has replaced the new device. In this case, modify the P1 data in the YX.user data table and change the DevID to the new device ID (such as D2), as shown in Table 3:
[0047] Table 3
[0048]
[0049] Similarly, if you log in with a WeChat or Apple account, you also need to first retrieve the WeChat or Apple account, then retrieve the device ID, and supplement the data in the YX.user data table.
[0050] In a specific embodiment, when operating the SDK, the SDK first checks whether the user's unique identity tag OneID is stored locally. If it exists, the OneID is reported to the server. If it does not exist, the device ID and login status are reported to the server.
[0051] The server records the operation events under different device IDs or OneIDs in the operation event table YX.Events_Log.
[0052] Since some apps do not require login, user operation events do not distinguish whether the user is logged in or not, as long as there is an operation, it will be recorded. For example, Toutiao, you can read news without logging in. If the user opens the app for the first time to browse the first page, it is equivalent to a new user. At this time, the server has not collected the device ID and has not generated OneID. Therefore, in this case, the locally stored dis_id has no value. If there is a value, it means that the server has calculated and confirmed the user's unique identity before, and will store OneID locally with dis_id. With this OneID, there is no need to recalculate, and the value can be directly reported to the server. The server will match other data based on this OneID.
[0053] At the same time, considering that a device with a recorded device ID and login mobile phone number is used by another person who has not logged in, since the person is not logged in, it is temporarily impossible to determine whether the device has changed users, so the non-logged in status is also reported and stored as a record.
[0054] When not logged in, you need to use the dis_id reporting parameter in the YX.user data table to query the DevID field or device ID, based on the most recent record, to determine the user's OneID as the distinctID field record value of the operation event table YX.Events_Log.
[0055] The operation event table YX.Events_Log is used to record a series of user operation events on the SDK after identifying the user identity or device ID; the server determines the user's preferences based on the operation event table YX.Events_Log and pushes relevant content.
[0056] The operation event table YX.Events_Log includes: an identification field, an operation page field, a software ID field, and a login status field; wherein the identification field is a device ID or OneID.
[0057] Table 4 is an example of the operation event table YX.Events_Log.
[0058] Table 4
[0059]
[0060] The purpose of the operation event table YX.Events_Log is to indicate the purpose after identifying the user's identity. It can be used as an application example to record the operation time after identifying the user's identity. When a user visits a page and needs to intelligently recommend content to the user, first confirm who the user is, and then recommend similar content based on the content visited by this person. Therefore, in the above two tables, the YX.user data table is used to identify the user's unique identity as OneID, and the YX.Events_Log data table is used to record the user's operation content and to judge the user's preferences. The distinctID should theoretically record OneID, and there will be no device ID. However, there may be extreme cases, in which the network is not connected and the recorded data is lost. For example: when the user opens the first page of the APP, it is not written into the YX.user table, but it is written into the YX.Events_Log table.
[0061] When retrieving the user device ID, the method of the present invention always uses the last piece of data to confirm the OneID, so the above steps can adapt to the record requirements of new device replacement and perform data cyclic replacement.
[0062] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0063] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for a third-party SDK to identify a user's unique ID, characterized in that: The following steps are involved: Enter the third-party SDK page. When the SDK is not logged in, the SDK obtains the device ID and reports the device ID to the server. The server pre-stores the YX.user data table. If the device ID does not exist in the YX.user data table, a new record is inserted into the YX.user data table to record the device ID. If the device ID exists in the YX.user data table, no new record is inserted into the YX.user data table. When the SDK is in the login state, the SDK reports the device ID and login method to the server at the same time; The server matches and supplements the YX.user data table according to the device ID and login method, and returns the user's unique identity tag OneID to the SDK for local storage; When operating the SDK, if you are not logged in, the server will record the operation event under the device ID in the most recent data recorded in the YX.user data table; If the user is logged in, the server will record the operation event under the OneID in the latest data recorded in the YX.user data table based on the OneID in the latest data; The server matches and supplements the YX.user data table according to the device ID and login method, including: When no login account is matched under the Login Method field, but the current device ID is matched under the Device ID field, it means that a new user is registering to log in to the old device. The server writes the current login account under the Login Method field in the corresponding Device ID row in the YX.user data table; When the current login account is matched under the Login Method field, and the current device ID is matched under the Device ID field, it means that the old user is logging in and the device has not been changed. The server does not perform any operations on the YX.user data table; When a login account already exists in the Login Method field, but the existing login account does not match the current login account, and the Device ID field matches the current device ID, it means that a new user is logging into an old device. The server inserts a new record in the YX.user data table, writes the current login account in the Login Method field of the new record, writes the new OneID in the User Unique Identity field, and keeps the other fields the same as the previous record; When the current login account is matched under the Login Method field, and the device ID already exists under the Device ID field, but the existing device ID does not match the current device ID, it means that the old user has replaced the new device. The server will modify the existing device ID in the YX.user data table to the current device ID.
2. The method for identifying a user's unique ID by a third-party SDK according to claim 1, characterized in that: The YX.user data table contains: user unique identity field, device ID field, login method field, software ID field and login status field.
3. The method for identifying a user's unique ID by a third-party SDK according to claim 2, characterized in that: The login method fields include: mobile phone account field, WeChat account field, and Apple account field.
4. The method for identifying a user's unique ID by a third-party SDK according to claim 1, characterized in that: When operating the SDK, the SDK first checks whether the user's unique identity tag OneID is stored locally. If it exists, it reports the OneID to the server. If it does not exist, it reports the device ID and login status to the server. The server records the operation events under different device IDs or OneIDs in the operation event table YX.Events_Log.
5. The method for identifying a user's unique ID by a third-party SDK according to claim 4, characterized in that: The operation event table YX.Events_Log includes: an identification field, an operation page field, a software ID field, and a login status field; wherein the identification field is a device ID or OneID.
6. The method for identifying a user's unique ID by a third-party SDK according to claim 4, characterized in that: The operation event table YX.Events_Log is used to record a series of user operation events on the SDK after identifying the user identity or device ID; the server determines the user's preferences based on the operation event table YX.Events_Log and pushes relevant content.
