Device unique identifier generation method, device, storage medium and program product

Through the collaborative work between the client and the server, a unique device identifier is generated and the data in the identification file is proofread, which solves the problem of inaccurate data caused by repeated device counting in traditional methods and realizes the unique collection of device information and the accuracy of data delivery.

CN120639741APending Publication Date: 2025-09-12SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510808196.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Traditional methods of generating unique device identifiers result in repeated statistics of the same user and the same device, leading to inaccurate device data statistics and inaccurate data delivery.

Method used

The client sends a request to obtain the device hardware identification to the server. If the hardware identification is not obtained, a request to obtain the device universal identification is sent. The server generates a unique device identification. After receiving the unique identification, the client proofreads the device identification in the identification file to ensure data accuracy.

Benefits of technology

It realizes the unique collection of device information, avoids the problem of inaccurate data statistics, and ensures the accuracy of device information and the precision of data delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639741A_ABST
    Figure CN120639741A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment unique identifier generation method, equipment, a storage medium and a program product. The method comprises the following steps: in response to an access request of a target website or an application program, sending an equipment hardware identifier acquisition request to a server to instruct the server to perform hardware identifier query according to the equipment hardware identifier acquisition request; under the condition that the equipment hardware identifier is not obtained, sending an equipment general identifier obtaining request to a server to instruct the server to obtain an equipment general identifier according to the equipment general identifier obtaining request, and generating an equipment unique identifier; under the condition that the equipment unique identifier is received, determining whether an identifier file containing the equipment identifier exists locally or not; and if yes, checking the unique identifier of the equipment according to the equipment identifier in the identifier file, and sending the data in the identifier file to the server after the checking is passed. By adopting the method, the equipment can be uniquely identified, and inaccurate equipment data statistics is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power equipment, and in particular to a method, device, storage medium, and program product for generating a unique device identifier. Background Art

[0002] To enable communication between power devices, a unique identifier is required to determine the device's location and identity. With the development of the power system, a large number of power devices need to be connected to the network and interconnected. In the power system, various power devices need to have a unique identifier to facilitate registration, management, and data exchange within the power system.

[0003] In traditional methods for generating unique device identifiers, when device A accesses a website using browser a on device B, an identifier M is generated because the webpage cannot access the device information of devices A and B. When device A accesses the website using browser b on device B, an identifier N is generated again. When device A opens an app on device B, an identifier O is generated again. This traditional method of generating unique device identifiers results in duplicate statistics for the same user and device, leading to inaccurate device data statistics and imprecise data delivery. Summary of the Invention

[0004] Based on this, it is necessary to provide a method for generating a unique device identifier, a computer device, a computer-readable storage medium, and a computer program product to address the above technical issues, which can uniquely identify the device and avoid inaccurate device data statistics.

[0005] In a first aspect, the present application provides a method for generating a unique device identifier, which is applied to a client and includes:

[0006] In response to an access request from a target website or application, sending a device hardware identification acquisition request to a server to instruct the server to perform a hardware identification query based on the device hardware identification acquisition request and return the query result;

[0007] If the received query result indicates that the device hardware identifier has not been obtained, sending a device universal identifier acquisition request to the server to instruct the server to obtain the device universal identifier according to the device universal identifier acquisition request, and instructing the server to generate a device unique identifier based on the device universal identifier;

[0008] Upon receiving the unique device identifier, determining whether there is an identifier file containing the device identifier locally;

[0009] If it exists, the device unique identifier is checked against the device identifier in the identification file, and after the check is passed, the data in the identification file is sent to the server.

[0010] In one embodiment, a device hardware identification acquisition request is sent to a server to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return a query result, including:

[0011] Sending an international mobile equipment identity acquisition request to the server to instruct the server to perform a hardware identification query according to the international mobile equipment identity acquisition request and return a first query result;

[0012] If the received first query result indicates that the international mobile equipment identity code has not been obtained, sending a media access control address acquisition request to the server to instruct the server to perform a hardware identification query according to the media access control address acquisition request and return a second query result;

[0013] When the received second query result indicates that the media access control address is not obtained, an application identification information acquisition request is sent to the server to instruct the server to perform a hardware identification query according to the application identification information acquisition request and return a third query result.

[0014] In one embodiment, the method for generating a unique device identifier further includes:

[0015] If the received first query result indicates that an international mobile equipment identity code has been obtained, use the international mobile equipment identity code as the unique identifier of the device;

[0016] In a case where the received second query result indicates that the media access control address is obtained, using the media access control address as the device unique identifier;

[0017] In a case where the received third query result indicates that the application identification information is obtained, the application identification information is used as the device unique identifier.

[0018] In one embodiment, the method for generating a unique device identifier further includes:

[0019] The data in the identification file is sent to the server to instruct the server to synchronize the data in the identification file to the target website or application.

[0020] In one embodiment, the method for generating a unique device identifier further includes:

[0021] When there is no identification file containing the device identification locally, obtain the browser identification information and the electronic device identification number; and send the browser identification information, the electronic device identification number and the device unique identification to the server.

[0022] In one embodiment, the method for generating a unique device identifier further includes:

[0023] Send an identification binding information acquisition request to the server to instruct the server to obtain the user registration information according to the identification binding information acquisition request, and determine the identification binding information based on the user registration information and the device unique identifier;

[0024] Receive the identity binding information sent by the server.

[0025] In a second aspect, the present application provides a method for generating a unique device identifier, which is applied to a server and includes:

[0026] Receive a device hardware identification acquisition request sent by a client, perform a hardware identification query based on the device hardware identification acquisition request, and return a query result; the query result is used to instruct the client to send a device general identification acquisition request to the server if the received query result indicates that the device hardware identification has not been acquired; the device hardware identification acquisition request is sent by the client in response to an access request from a target website or application;

[0027] Upon receiving a request to obtain a universal identifier, obtain the universal identifier of the device according to the request, generate a unique identifier for the device based on the universal identifier, and send the unique identifier to the client, instructing the client to determine whether an identification file containing the device identifier exists locally upon receiving the unique identifier, and instructing the client to verify the unique identifier of the device based on the device identifier in the identification file if such a file exists;

[0028] The data in the identification file is received and sent by the client after verification.

[0029] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the method for generating a unique device identifier as described in the first and second aspects.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating a unique device identifier as described in the first and second aspects.

[0031] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the method for generating a unique device identifier as described in the first and second aspects.

[0032] The above-mentioned method for generating a unique device identifier, computer device, computer-readable storage medium and computer program product, in response to an access request from a target website or application, sends a device hardware identifier acquisition request to the server to instruct the server to perform a hardware identifier query according to the device hardware identifier acquisition request and return the query result; when the received query result indicates that the device hardware identifier has not been obtained, sends a device general identifier acquisition request to the server to instruct the server to obtain the device general identifier according to the device general identifier acquisition request, and instructs the server to generate a device unique identifier based on the device general identifier. This method of generating a unique device identifier is beneficial for the target website or application to collect the uniqueness of device information and to avoid the problem of inaccurate data statistics; in addition, when a unique device identifier is received, the unique device identifier is proofread according to the device identifier in the identification file. After the proofreading is passed, the data in the identification file is sent to the server to synchronize the device information in the server and the client to ensure the accuracy of the device information. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A diagram illustrating an application environment of a method for generating a unique device identifier in one embodiment;

[0035] Figure 2 1 is a flow chart of a method for generating a unique device identifier in one embodiment;

[0036] Figure 3 A schematic diagram of the composition of a system for generating a unique device identifier in one embodiment;

[0037] Figure 4 A structural block diagram of a device for generating a unique identifier of a device in one embodiment;

[0038] Figure 5 is a structural block diagram of a device for generating a unique device identifier in another embodiment;

[0039] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0041] It should be noted that the terms "first", "second", etc. used in this application may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "including" and "having" used in this application and any variations thereof are intended to cover non-exclusive inclusions. The term "plurality" used in this application refers to two or more. The term "and / or" used in this application refers to one of the solutions or any combination of multiple solutions.

[0042] The method for generating a unique device identifier provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the client 102 communicates with the server 104 through the network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Taking the application of the method for generating a unique device identifier to the client 102 as an example, the client 102 responds to the access request of the target website or application, sends a device hardware identifier acquisition request to the server 104 to instruct the server 104 to perform a hardware identifier query according to the device hardware identifier acquisition request, and return the query result; if the received query result indicates that the device hardware identifier is not obtained, the client 102 sends a device universal identifier acquisition request to the server 104 to instruct the server 104 to obtain the device universal identifier according to the device universal identifier acquisition request, and instructs the server 104 to generate a device unique identifier based on the device universal identifier; if the device unique identifier is received, determine whether there is an identification file containing the device identifier locally; if it exists, proofread the device unique identifier according to the device identifier in the identification file, and after the proofreading is passed, send the data in the identification file to the server 104. Client 102 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart car devices, and projectors. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Head-mounted devices may include virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. Server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.

[0043] In an exemplary embodiment, Figure 2 As shown, a method for generating a unique device identifier is provided, and the method is applied to Figure 1 Taking the client 102 in the example as an example, the following steps are included from step 202 to step 208. Among them:

[0044] Step 202: In response to the access request of the target website or application, a device hardware identification acquisition request is sent to the server to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return the query result.

[0045] The client refers to the software entity on the user's electronic device, and the target website or application runs on the client. The access request refers to the request generated when the user accesses the target website or opens the application on the client.

[0046] A device hardware identification acquisition request is a request generated by a client to obtain a device hardware identification. A device hardware identification refers to an identifier related to the device's hardware information, such as an International Mobile Equipment Identity (IMEI), a Media Access Control (MAC) address, or application identification information. In response to a request from a target website or application, the client sends a device hardware identification acquisition request to the server.

[0047] The device hardware identification acquisition request contains the user's authorization information. The target website or application cannot directly obtain the hardware information such as the device hardware identification of the client's electronic device. Therefore, the embodiment of the present application proposes that the client sends a device hardware identification acquisition request to the server to obtain the device hardware identification that matches the device hardware identification acquisition request. If the server determines whether the device hardware identification acquisition request has the hardware identification acquisition permission based on the authorization information, if the authorization information indicates that it has the acquisition permission, the server will query the device hardware identification that matches the client, generate a query result based on the device hardware identification, and send it to the client.

[0048] The query result indicates whether the device hardware identifier is obtained. If the query result contains the device hardware identifier, the query result indicates that the device hardware identifier is obtained. If the query result does not contain the device hardware identifier, the query result indicates that the device hardware identifier is not obtained.

[0049] Step 204: If the received query result indicates that the device hardware identifier is not obtained, a device universal identifier acquisition request is sent to the server to instruct the server to obtain the device universal identifier according to the device universal identifier acquisition request, and to instruct the server to generate a device unique identifier based on the device universal identifier.

[0050] The universal identifier acquisition request is a request for obtaining a device's universally unique identifier. If the client receives a query result indicating that the device's hardware identifier has not been obtained, it sends the device universal identifier acquisition request to the server. Upon receiving the universal identifier acquisition request, the server searches for a universally unique identifier that matches the universal identifier acquisition request.

[0051] The server may send the universal unique identification code to the client as the unique identification of the device, and may also encrypt the universal unique identification code and use the encrypted universal unique identification code as the unique identification of the device.

[0052] Step 206: upon receiving the unique device identifier, determine whether there is an identifier file containing the device identifier locally.

[0053] The identification file refers to a file locally on the electronic device that stores information such as the device identifier, browser identifier, and electronic device identification number. Upon receiving the device's unique identifier, the client determines whether the identification file exists locally. If so, it determines whether the field containing the device identifier in the identification file is empty. If it is empty, it indicates that no identification file containing the device identifier exists locally. If it is not empty, it indicates that a local identification file containing the device identifier exists locally.

[0054] Step 208: If the device unique identifier exists, check the unique identifier of the device according to the device identifier in the identification file, and after the check is passed, send the data in the identification file to the server.

[0055] If the client determines that a local identification file containing the device identifier exists, it will verify the device's unique identifier against the device identifier in the identification file to determine the accuracy of the device's unique identifier obtained from the server. The verification method primarily compares the device identifier in the identification file with the device's unique identifier. If the two match, the verification is considered passed; if they do not match, the verification is considered failed.

[0056] After verification, the client sends the data in the identification file to the server to synchronize the data between the server and the client. The data in the identification file sent to the server may include the device's unique identifier, browser identification information, electronic device identification number, and user information such as the customer's mobile terminal number and user account number.

[0057] In the above-mentioned method for generating a unique device identifier, in response to an access request from a target website or application, a device hardware identifier acquisition request is sent to the server to instruct the server to perform a hardware identifier query according to the device hardware identifier acquisition request and return the query result; when the received query result indicates that the device hardware identifier has not been obtained, a device general identifier acquisition request is sent to the server to instruct the server to obtain the device general identifier according to the device general identifier acquisition request, and to instruct the server to generate a unique device identifier based on the device general identifier. This method for generating a unique device identifier is beneficial for the target website or application to collect the uniqueness of device information and to avoid the problem of inaccurate data statistics; in addition, when a unique device identifier is received, the unique device identifier is proofread according to the device identifier in the identification file. After the proofreading is passed, the data in the identification file is sent to the server to ensure the consistency of the data in the server and the client and to ensure the accuracy of the device information.

[0058] In an exemplary embodiment, a device hardware identification acquisition request is sent to a server to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return a query result, including: sending an international mobile equipment identity code acquisition request to the server to instruct the server to perform a hardware identification query according to the international mobile equipment identity code acquisition request and return a first query result; when the received first query result indicates that the international mobile equipment identity code has not been obtained, sending a media access control address acquisition request to the server to instruct the server to perform a hardware identification query according to the media access control address acquisition request and return a second query result; when the received second query result indicates that the media access control address has not been obtained, sending an application identification information acquisition request to the server to instruct the server to perform a hardware identification query according to the application identification information acquisition request and return a third query result.

[0059] Among them, the International Mobile Equipment Identity acquisition request is used to obtain the International Mobile Equipment Identity. The Media Access Control address acquisition request is used to obtain the Media Access Control address. The application identification information acquisition request is used to obtain application identification information. The permission levels corresponding to the International Mobile Equipment Identity, Media Access Control address, and application identification information decrease in sequence, and the stability decreases in sequence. Therefore, the client first requests the International Mobile Equipment Identity from the server. If the International Mobile Equipment Identity is not obtained, it requests the Media Access Control address from the server. If the Media Access Control address is not obtained, it requests the application identification information from the server, and returns the corresponding query results respectively.

[0060] In some embodiments, if the server determines whether the international mobile equipment identity code acquisition request has the international mobile equipment identity code acquisition authority based on the authorization information, if the authorization information indicates that it has the acquisition authority, the server will query the international mobile equipment identity code that matches the client, generate a first query result based on the international mobile equipment identity code, and send it to the client.

[0061] The first query result is used to indicate whether the IMEI code is obtained. If the query result contains the IMEI code, the query result indicates that the IMEI code is obtained. If the query result does not contain the IMEI code, the query result indicates that the IMEI code is not obtained.

[0062] Similarly, the server may return a second query result in response to the media access control address acquisition request, and may return a third query request in response to the application identification information acquisition request.

[0063] In this embodiment, the international mobile equipment identity code, the media access control address, and the application identification information acquisition request are sent to the server in sequence, so as to acquire the device unique identifier that matches the client.

[0064] In an exemplary embodiment, the method for generating a device unique identifier also includes: when the first query result received indicates that an international mobile equipment identity code has been obtained, using the international mobile equipment identity code as the device unique identifier; when the second query result received indicates that a media access control address has been obtained, using the media access control address as the device unique identifier; when the third query result received indicates that application identification information has been obtained, using the application identification information as the device unique identifier.

[0065] When the client receives the first query result indicating that an IMEI code has been obtained, the client uses the IMEI code in the first query result as the device's unique identifier. In some embodiments, the server may encrypt the IMEI code and return the encrypted IMEI code. The client decrypts the encrypted IMEI code and uses the decrypted IMEI code as the device's unique identifier.

[0066] Similarly, when the client receives a second query result indicating that a media access control address has been obtained, the client uses the media access control address in the second query result as the device's unique identifier. In some embodiments, the server may encrypt the media access control address and return the encrypted media access control address. The client decrypts the encrypted media access control address and uses the decrypted media access control address as the device's unique identifier.

[0067] If the client receives the third query result indicating that the application identification information has been obtained, it uses the application identification information in the second query result as the device's unique identifier. In some embodiments, the server may encrypt the application identification information and return the encrypted application identification information. The client decrypts the encrypted application identification information and uses the decrypted application identification information as the device's unique identifier.

[0068] In this embodiment, based on each query result received, when the query result indicates that corresponding identification information is obtained, the obtained identification information is used as the device unique identifier, which is conducive to obtaining the device unique identifier that matches the user's authorization authority.

[0069] In an exemplary embodiment, the method for generating a unique device identifier further includes: sending the data in the identifier file to a server to instruct the server to synchronize the data in the identifier file to a target website or application.

[0070] Among them, after the client sends the data in the identification file to the server, the server synchronously sends the data in the identification file to the target website or application. In this way, the target website or application can have the data in the identification file, which can avoid the process of repeatedly generating a unique device identifier.

[0071] In some embodiments, the client may send the data in the identification file to the server regularly or periodically. At the same time, the server synchronizes the data in the latest received identification file to the target website or application to update possible changed data.

[0072] When performing device statistics based on the device's unique identifier, it can avoid problems such as inaccurate data statistics and inaccurate data delivery.

[0073] In this embodiment, after the data in the identification file is sent to the server, the server synchronizes the data in the identification file to the target website or application to ensure that the target website or application has the data in the identification file, thereby avoiding the process of repeatedly generating a unique device identifier.

[0074] In an exemplary embodiment, the method for generating a device unique identifier further includes: obtaining browser identification information and an electronic device identification number when no identification file containing the device identifier exists locally; and sending the browser identification information, the electronic device identification number, and the device unique identifier to a server.

[0075] The browser identification information is the browser's fingerprint, used to distinguish different browsers. The electronic device identification number refers to the software-level representation of the device. For example, it may be a local identifier stored by the browser. If the client does not have an identification file containing the device's identification locally, it will send the browser identification information, the electronic device identification number, and the device's unique identifier to the server, allowing the server to obtain information such as the device's unique identifier even without the identification file.

[0076] In some embodiments, the server will send the received browser identification information, electronic device identification number, and device unique identifier to the target website or application to ensure data consistency. For example, a user's browsing history, shopping cart, and other data on different devices can be synchronized by associating the device identifier with the account.

[0077] In this embodiment, by sending the browser identification information, the electronic device identification number and the device unique identification to the server when there is no identification file containing the device identification locally, it is beneficial to the consistency of data in the client and the server.

[0078] In an exemplary embodiment, the method for generating a unique device identifier also includes: sending an identifier binding information acquisition request to a server to instruct the server to obtain user registration information according to the identifier binding information acquisition request, and determining the identifier binding information based on the user registration information and the unique device identifier; and receiving the identifier binding information sent by the server.

[0079] The identification binding information acquisition request is used to obtain identification binding information, and the identification binding information is used to represent the binding relationship between the user registration information and the device unique identifier.

[0080] The client sends an identification binding information acquisition request to the server, and the server obtains the user registration information according to the identification binding information acquisition request. The user registration information refers to the information registered by the user in the target website or application.

[0081] The client receives the identification binding information sent by the server and stores it locally for subsequent identity authentication or data association.

[0082] In this embodiment, by sending an identification binding information acquisition request to the server, the identification binding information is determined to establish an association between the user registration information and the device unique identification. In this way, when the client subsequently accesses the target website or application, it can determine the legitimacy of the user identity based on the identification binding information, which is beneficial to the accuracy of data statistics when performing device statistics across devices.

[0083] In an exemplary embodiment, a method for generating a device unique identifier is provided, which is applied to a server, and the method includes: receiving a device hardware identifier acquisition request sent by a client, performing a hardware identifier query based on the device hardware identifier acquisition request, and returning a query result; the query result is used to instruct the client to send a device general identifier acquisition request to the server when the received query result indicates that the device hardware identifier has not been obtained; the device hardware identifier acquisition request is sent by the client in response to an access request from a target website or application; when a general identifier acquisition request is received, a device general identifier is obtained according to the device general identifier acquisition request, a device unique identifier is generated based on the device general identifier, and the device unique identifier is sent to the client to instruct the client to determine whether an identification file containing the device identifier exists locally when the device unique identifier is received, and to instruct the client to proofread the device unique identifier based on the device identifier in the identification file if such an identification file exists; and receiving data in the identification file sent by the client after the proofreading is passed.

[0084] The method for generating a unique device identifier comprises receiving a device hardware identifier acquisition request sent by a client, performing a hardware identifier query according to the device hardware identifier acquisition request, and returning a query result; the query result is used to instruct the client to send a device universal identifier acquisition request to the server when the received query result indicates that the device hardware identifier has not been acquired; the device hardware identifier acquisition request is sent by the client in response to an access request from a target website or application; when the universal identifier acquisition request is received, the device universal identifier is acquired according to the device universal identifier acquisition request, a device unique identifier is generated according to the device universal identifier, and the device unique identifier is sent to the client to instruct the client to determine whether an identification file containing the device identifier exists locally when the device unique identifier is received, and instruct the client to verify the device unique identifier according to the device identifier in the identification file if the identification file exists; and receiving the data in the identification file sent by the client after the verification is passed. The above scheme is conducive to the target website or application collecting the uniqueness of device information and is conducive to avoiding the problem of inaccurate data statistics; in addition, when the device unique identifier is received, the device unique identifier is verified according to the device identifier in the identification file, and the data in the identification file sent by the client after the verification is passed is received to synchronize the device information in the server and the client to ensure the accuracy of the device information.

[0085] To illustrate the method and effect of generating a unique device identifier in this solution in detail, the following is a detailed example:

[0086] The method for generating a unique device identifier proposed in the embodiment of the present application is applied to a system for generating a unique device identifier. Figure 3 The following diagram illustrates the components of a system for generating a unique device identifier in some embodiments. The system includes a client and a server. The client includes a first identification information acquisition module and a second identification information acquisition module, while the server includes a unique identification information generation module. The first identification information acquisition module is used by the client to obtain the device hardware identifier, the first identification information client acquisition module is used to obtain the device's universal identifier, and the unique identification information generation module is used by the server to generate a unique representation of the device.

[0087] In response to an access request from a target website or application, the client sends a device hardware identification acquisition request to the server; the server performs a hardware identification query based on the device hardware identification acquisition request and returns the query result; if the query result received indicates that the device hardware identification has not been obtained, the client sends a device general identification acquisition request to the server; the server obtains the device general identification based on the device general identification acquisition request and generates a device unique identification based on the device general identification; if the client receives the device unique identification, it determines whether there is an identification file containing the device identification locally, and if so, proofreads the device unique identification based on the device identification in the identification file, and after the proofreading is passed, sends the data in the identification file to the server.

[0088] In one embodiment, a device hardware identification acquisition request is sent to a server, and the server performs a hardware identification query based on the device hardware identification acquisition request and returns a query result, including: a client sends an international mobile equipment identity code acquisition request to the server, and the server performs a hardware identification query based on the international mobile equipment identity code acquisition request and returns a first query result; when the client receives a first query result indicating that the international mobile equipment identity code has not been acquired, the client sends a media access control address acquisition request to the server, and the server performs a hardware identification query based on the media access control address acquisition request and returns a second query result; when the client receives a second query result indicating that the media access control address has not been acquired, the client sends an application identification information acquisition request to the server, and the server performs a hardware identification query based on the application identification information acquisition request and returns a third query result.

[0089] In one embodiment, the method for generating a device unique identifier also includes: when the first query result received indicates that the international mobile equipment identity code is obtained, the client uses the international mobile equipment identity code as the device unique identifier; when the second query result received indicates that the media access control address is obtained, the media access control address is used as the device unique identifier; when the third query result received indicates that the application identification information is obtained, the application identification information is used as the device unique identifier.

[0090] In one embodiment, the method for generating a unique device identifier further includes: the client sending the data in the identifier file to the server, and the server synchronizing the data in the identifier file to the target website or application.

[0091] In one embodiment, the method for generating a device unique identifier also includes: when the client does not have an identification file containing the device identifier locally, obtaining browser identification information and an electronic device identification number; and sending the browser identification information, the electronic device identification number and the device unique identifier to the server.

[0092] In one embodiment, the method for generating a unique device identifier also includes: the client sends an identifier binding information acquisition request to the server, the server obtains user registration information based on the identifier binding information acquisition request, and determines the identifier binding information based on the user registration information and the unique device identifier; and receives the identifier binding information sent by the server.

[0093] The above-mentioned method for generating a unique device identifier is to send a device hardware identifier acquisition request to the server in response to an access request from a target website or application, so as to instruct the server to perform a hardware identifier query according to the device hardware identifier acquisition request and return the query result; if the received query result indicates that the device hardware identifier has not been obtained, send a device universal identifier acquisition request to the server, so as to instruct the server to obtain the device universal identifier according to the device universal identifier acquisition request, and instruct the server to generate a device unique identifier based on the device universal identifier. This method of generating a device unique identifier is conducive to the uniqueness of the device information collected by the target website or application, and is conducive to avoiding the problem of inaccurate data statistics; in addition, when the device unique identifier is received, the device unique identifier is proofread according to the device identifier in the identification file. After the proofreading is passed, the data in the identification file is sent to the server to synchronize the device information in the server and the client to ensure the accuracy of the device information. In addition, this method can ensure the uniqueness of the electronic device information collected by the target website and application, thereby improving the accuracy of data delivery. It can quickly and effectively generate a device unique identifier in the case of system upgrades, so as to accurately manage the device according to the device unique identifier and avoid information leakage caused by device loss.

[0094] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps. It is understandable that the various steps in different embodiments can be freely combined as needed, and the various non-contradictory schemes formed by the combination all fall within the scope of protection of this application.

[0095] Based on the same inventive concept, the embodiments of the present application also provide a device unique identifier generation apparatus for implementing the aforementioned device unique identifier generation method. The implementation solution provided by this apparatus is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of the embodiments of the device unique identifier generation apparatus provided below can be found in the above-mentioned limitations of the device unique identifier generation method, and will not be repeated here.

[0096] In an exemplary embodiment, Figure 4 As shown, a device 400 for generating a unique device identifier is provided, which is applied to a client and includes: a query module 420, a generation module 440, a determination module 460, and a proofreading module 450, wherein:

[0097] The query module 420 is used to send a device hardware identification acquisition request to the server in response to an access request from a target website or application, to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return a query result.

[0098] The generation module 440 is used to send a device universal identification acquisition request to the server when the received query result indicates that the device hardware identification has not been obtained, to instruct the server to obtain the device universal identification according to the device universal identification acquisition request, and to instruct the server to generate a device unique identification based on the device universal identification.

[0099] The determination module 460 is configured to determine whether there is an identification file containing the device identification locally when the device unique identification is received.

[0100] The proofreading module 450 is used to proofread the device unique identifier according to the device identifier in the identification file if it exists, and send the data in the identification file to the server after the proofreading is passed.

[0101] The above-mentioned device unique identification generating device sends a device hardware identification acquisition request to the server in response to the access request of the target website or application, so as to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return the query result; when the received query result indicates that the device hardware identification has not been obtained, it sends a device general identification acquisition request to the server to instruct the server to obtain the device general identification according to the device general identification acquisition request, and instructs the server to generate a device unique identification based on the device general identification. This method of generating a device unique identification is conducive to the uniqueness of the device information collected by the target website or application, and is conducive to avoiding the problem of inaccurate data statistics; in addition, when the device unique identification is received, the device unique identification is proofread according to the device identification in the identification file. After the proofreading is passed, the data in the identification file is sent to the server to synchronize the device information in the server and the client to ensure the accuracy of the device information.

[0102] In one embodiment, a device hardware identification acquisition request is sent to the server to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return the query result. The query module 420 is also used to: send an international mobile equipment identity code acquisition request to the server to instruct the server to perform a hardware identification query according to the international mobile equipment identity code acquisition request and return a first query result; if the received first query result indicates that the international mobile equipment identity code has not been obtained, send a media access control address acquisition request to the server to instruct the server to perform a hardware identification query according to the media access control address acquisition request and return a second query result; if the received second query result indicates that the media access control address has not been obtained, send an application identification information acquisition request to the server to instruct the server to perform a hardware identification query according to the application identification information acquisition request and return a third query result.

[0103] In one embodiment, the query module 420 is further used to: when the first query result received indicates that the international mobile equipment identity code is obtained, use the international mobile equipment identity code as the device unique identifier; when the second query result received indicates that the media access control address is obtained, use the media access control address as the device unique identifier; when the third query result received indicates that the application identification information is obtained, use the application identification information as the device unique identifier.

[0104] In one embodiment, the device unique identifier generating apparatus 400 further includes a synchronization module, which is configured to send the data in the identification file to a server to instruct the server to synchronize the data in the identification file to a target website or application.

[0105] In one embodiment, the device unique identifier generation device 400 also includes an information sending module, which is used to: obtain browser identification information and electronic device identification number when there is no identification file containing the device identification locally; and send the browser identification information, electronic device identification number and device unique identifier to the server.

[0106] In one embodiment, the device unique identifier generation device 400 also includes a binding module, which is used to: send an identification binding information acquisition request to the server to instruct the server to obtain user registration information according to the identification binding information acquisition request, and determine the identification binding information based on the user registration information and the device unique identifier; and receive the identification binding information sent by the server.

[0107] In an exemplary embodiment, Figure 5 As shown, a device 500 for generating a unique device identifier is provided, which is applied to a server and includes: a first receiving module 520, a processing module 540, and a second receiving module 560, wherein:

[0108] The first receiving module 520 is configured to receive a device hardware identification acquisition request sent by a client, perform a hardware identification query based on the device hardware identification acquisition request, and return a query result; the query result is used to instruct the client to send a device general identification acquisition request to the server if the received query result indicates that the device hardware identification has not been acquired; the device hardware identification acquisition request is sent by the client in response to an access request from a target website or application;

[0109] Processing module 540 is configured to, upon receiving a request to obtain a universal identifier, obtain the device universal identifier according to the request, generate a device unique identifier based on the device universal identifier, and send the device unique identifier to the client, instructing the client to determine whether an identification file containing the device identifier exists locally upon receiving the device unique identifier, and, if so, to verify the device unique identifier against the device identifier in the identification file.

[0110] The second receiving module 560 is configured to receive the data in the identification file sent by the client after the data has been proofread.

[0111] The above-mentioned device unique identifier generation device receives a device hardware identifier acquisition request sent by a client, performs a hardware identifier query according to the device hardware identifier acquisition request, and returns a query result; the query result is used to instruct the client to send a device universal identifier acquisition request to the server when the received query result indicates that the device hardware identifier has not been obtained; the device hardware identifier acquisition request is sent by the client in response to an access request from a target website or application; when a universal identifier acquisition request is received, the device universal identifier is obtained according to the device universal identifier acquisition request, a device unique identifier is generated based on the device universal identifier, and the device unique identifier is sent to the client to instruct the client to determine whether an identification file containing the device identifier exists locally when the device unique identifier is received, and instruct the client to proofread the device unique identifier according to the device identifier in the identification file if it exists; and receive the data in the identification file sent by the client after the proofreading is passed. This method of generating a device unique identifier is beneficial for the target website or application to collect the uniqueness of device information and to avoid the problem of inaccurate data statistics; in addition, after the device unique identifier is proofread, the device information in the server and client is synchronized to ensure the accuracy of the device information.

[0112] Each module in the device unique identifier generation apparatus described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a memory in a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0113] In an exemplary embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external clients via wired or wireless means, and the wireless means can be implemented via Wi-Fi, a mobile cellular network, near-field communication (NFC), or other technologies. When executed by the processor, the computer program implements a method for generating a unique device identifier. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0114] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0115] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0116] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0117] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0118] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0119] Those skilled in the art will 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. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0120] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not produce any contradiction, it should be considered to be within the scope of this application.

[0121] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for generating a unique device identifier, characterized in that: Applied to a client, the method includes: In response to an access request from a target website or application, sending a device hardware identification acquisition request to a server to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return a query result; If the received query result indicates that the device hardware identifier is not obtained, sending a device universal identifier acquisition request to the server to instruct the server to obtain the device universal identifier according to the device universal identifier acquisition request, and instructing the server to generate a device unique identifier based on the device universal identifier; Upon receiving the unique identifier of the device, determining whether there is an identification file containing the unique identifier of the device locally; If it exists, the device unique identifier is checked according to the device identifier in the identification file, and after the check is passed, the data in the identification file is sent to the server.

2. The method according to claim 1, characterized in that The sending of a device hardware identification acquisition request to the server to instruct the server to perform a hardware identification query according to the device hardware identification acquisition request and return a query result includes: Sending an International Mobile Equipment Identity acquisition request to a server to instruct the server to perform a hardware identification query according to the International Mobile Equipment Identity acquisition request and return a first query result; If the received first query result indicates that the International Mobile Equipment Identity code has not been obtained, sending a media access control address acquisition request to the server to instruct the server to perform a hardware identification query according to the media access control address acquisition request and return a second query result; When the received second query result indicates that the media access control address is not obtained, an application identification information acquisition request is sent to the server to instruct the server to perform a hardware identification query according to the application identification information acquisition request and return a third query result.

3. The method according to claim 2, characterized in that The method further comprises: If the received first query result indicates that an International Mobile Equipment Identity code has been obtained, use the International Mobile Equipment Identity code as a unique identifier of the device; In a case where the received second query result indicates that a media access control address is obtained, using the media access control address as a unique device identifier; In a case where the received third query result indicates that the application identification information is obtained, the application identification information is used as the device unique identifier.

4. The method according to claim 1, wherein The method further comprises: The data in the identification file is sent to the server to instruct the server to synchronize the data in the identification file to the target website or the application.

5. The method according to claim 1, wherein The method further comprises: In the case that the identification file containing the unique identification of the device does not exist locally, the browser identification information and the electronic device identification number are obtained; and the browser identification information, the electronic device identification number and the unique identification of the device are sent to the server.

6. The method according to claim 1, characterized in that The method further comprises: Sending an identification binding information acquisition request to a server to instruct the server to acquire user registration information according to the identification binding information acquisition request, and determining the identification binding information according to the user registration information and the device unique identifier; Receive the identification binding information sent by the server.

7. A method for generating a unique device identifier, characterized in that: Applied to a server, the method includes: receiving a device hardware identification acquisition request sent by a client, performing a hardware identification query according to the device hardware identification acquisition request, and returning a query result; the query result is used to instruct the client to send a device general identification acquisition request to the server if the received query result indicates that the device hardware identification has not been acquired; the device hardware identification acquisition request is sent by the client in response to an access request from a target website or application; Upon receiving the universal identifier acquisition request, acquiring the device universal identifier according to the device universal identifier acquisition request, generating a device unique identifier based on the device universal identifier, and sending the device unique identifier to the client, instructing the client to determine whether an identification file containing the device unique identifier exists locally upon receiving the device unique identifier, and instructing the client to verify the device unique identifier based on the device identifier in the identification file if such a file exists locally; Receive the data in the identification file sent by the client after proofreading.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.