Equipment unique identifier generation method and device, computer equipment, readable storage medium and program product
By collecting and merging the data of the device mounted under the gateway, generating the unique identifier of the device, the problem of the device's unique identifier in the prior art is solved, and the stable unique identifier of the device is realized, and the precise advertising delivery and users are supported. statistics.
Patent Information
- Application Number
- CN202411603791.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the unique identifier of the device is prone to change, resulting in its non-uniqueness and it is difficult to effectively analyze and optimize advertising activities in modern digital advertising.
By collecting data of the gateway hanging device at the active time, a first information table is generated, recording information with the same identifier field is merged, feature vectors are obtained, and merging is carried out according to the similarity of the feature vectors, and the unique identifier of the device is finally obtained.
It realizes the stability and uniqueness of the device's unique identifier, avoids the inuniqueness problem caused by identifier changes, and can more accurately locate target users, help operators and advertisers achieve accurate advertising delivery and user statistics.
Smart Images

Figure CN119449763A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating a unique device identifier. Background Art
[0002] Device identifiers can be used as advertising identifiers and play an important role in modern digital advertising, helping advertisers effectively analyze and optimize their advertising campaigns.
[0003] The mobile device identifier, Android operating system unique identifier, or device media access control address can be used as the unique identifier of the device. However, the mobile device identifier will change over time, resulting in the unique identifier of the device not being unique; or, the unique identifier of the Android operating system will change with flashing or restoring factory settings, resulting in the unique identifier of the device not being unique; or, the device media access control (Media Access Control, mac) address will also change due to the generation of random media access control addresses, resulting in the unique identifier of the device not being unique. In the traditional solution for determining the unique identifier of a device, the unique identifier of the device is likely to change, and uniqueness is difficult to guarantee. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for generating a unique device identifier in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for generating a unique device identifier, comprising:
[0006] A first information table is obtained according to data collected from the downstream device of the gateway during the active time; the first information table includes multiple first record information, each of which includes device information of the gateway at the corresponding active time, device configuration information of the downstream device and device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields;
[0007] If any two pieces of first record information in the first information table have at least one identical identifier field, then the two pieces of first record information are merged to obtain a second information table;
[0008] Obtaining a feature vector corresponding to each second record information in the second information table;
[0009] According to the similarity between the feature vectors, each second record information in the second information table is merged to obtain a third information table;
[0010] According to each piece of third record information in the third information table, a device fingerprint of the downstream device corresponding to each piece of third record information is obtained to obtain a unique identifier of the downstream device.
[0011] In one embodiment, the merging of any two pieces of first record information includes:
[0012] According to the active dates corresponding to the two pieces of first record information, respectively set priorities for the two pieces of first record information; the newer the active date corresponding to the first record information, the higher the priority corresponding to the first record information;
[0013] Filling the non-empty identifier field of the first record information of the low priority into the first record information of the high priority;
[0014] If any two pieces of first record information have different non-null values in the same identifier field, the non-null value of the first record information with a higher priority is retained.
[0015] In one embodiment, obtaining the feature vector corresponding to each second record information in the second information table includes:
[0016] Convert the device configuration information of the downstream device in each second record information from a non-numeric form to a numeric form;
[0017] For any second record information, obtaining a device configuration feature vector component according to the device configuration information in numerical form in the any second record information;
[0018] According to the device information of the gateway in any of the second record information, a gateway feature vector component is obtained; according to the device identifier information of the downstream device in any of the second record information, a device identifier feature vector component is obtained;
[0019] A feature vector corresponding to any one of the second record information is obtained according to the device configuration feature vector component, the gateway feature vector component and the device identifier feature vector component.
[0020] In one embodiment, before merging the second record information in the second information table according to the similarity between the feature vectors to obtain the third information table, the method further includes:
[0021] Obtaining the weight corresponding to each device configuration feature vector component in the second record information;
[0022] For any two pieces of second record information, obtain the device configuration similarity between the device configuration feature vector components according to the multiplication value of the weights corresponding to the device configuration feature vector components corresponding to the any two pieces of second record information and the absolute difference between the device configuration feature vector components corresponding to the any two pieces of second record information;
[0023] Obtaining the gateway similarity between the gateway feature vector components according to the absolute difference between the gateway feature vector components corresponding to any two pieces of second record information;
[0024] Obtaining the device identifier similarity between the device identifier feature vector components according to the absolute difference between the device identifier feature vector components corresponding to any two pieces of second record information;
[0025] The similarity between the feature vectors corresponding to any two pieces of second record information is obtained according to the device configuration similarity, the gateway similarity and the device identifier similarity.
[0026] In one embodiment, the second record information in the second information table is merged according to the similarity between the feature vectors to obtain a third information table, including:
[0027] According to the similarity between each feature vector, multiple rounds of merging operations are performed;
[0028] Among them, the steps of each round of merging operation are as follows: obtain the feature vectors of the previous round, and according to the similarity between the feature vectors of the previous round, select the second record information of the previous round corresponding to the two feature vectors of the previous round with the highest similarity for merging to obtain the second information table of this round; according to each second record information of this round in the second information table of this round, obtain the feature vector of this round corresponding to each second record information of this round; when the similarity between two feature vectors of this round is not lower than the set threshold, enter the next round of merging operation according to the feature vectors of this round; when the similarity between any two feature vectors of this round is lower than the set threshold, obtain the third information table.
[0029] In one embodiment, obtaining, according to each third record information in the third information table, a device fingerprint of a downstream device corresponding to each third record information to obtain a unique identifier of the downstream device includes:
[0030] For any third record information, concatenate all identifier fields to obtain a concatenation result;
[0031] Perform hash processing on the splicing result to obtain a device fingerprint of the downstream device corresponding to any third record information;
[0032] The device fingerprint of the downstream device is used as the unique identifier of the downstream device.
[0033] In a second aspect, the present application also provides a device for generating a unique device identifier, including:
[0034] A first information table acquisition module is used to obtain a first information table according to data collected from the downstream device of the gateway during the active time; the first information table includes multiple first record information, each of which includes device information of the gateway at the corresponding active time, device configuration information of the downstream device and device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields;
[0035] A second information table acquisition module, configured to merge any two pieces of first record information in the first information table to obtain a second information table if the two pieces of first record information have at least one identical identifier field;
[0036] A feature vector acquisition module, used to acquire a feature vector corresponding to each second record information in the second information table;
[0037] A third information table acquisition module, used for merging the second record information in the second information table according to the similarity between the feature vectors to obtain a third information table;
[0038] The unique identifier acquisition module is used to obtain the device fingerprint of the downstream device according to each third record information in the third information table to obtain the unique identifier of the downstream device.
[0039] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the above method.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to execute the above method.
[0041] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and the computer program is executed by a processor to execute the above method.
[0042] The above-mentioned method, apparatus, computer device, computer-readable storage medium and computer program product for generating a unique device identifier obtain a first information table based on data collected from the downstream device of the gateway during active time; the first information table includes multiple first record information, each first record information includes the device information of the gateway at the corresponding active time, the device configuration information of the downstream device and the device identifier information of the downstream device; the device identifier information of the downstream device contains multiple identifier fields; if any two first record information in the first information table have at least one identical identifier field, any two first record information are merged to obtain a second information table; the feature vector corresponding to each second record information in the second information table is obtained; according to the similarity between each feature vector, each second record information in the second information table is merged to obtain a third information table; according to each third record information in the third information table, the device fingerprint of the downstream device corresponding to each third record information is obtained to obtain the unique identifier of the downstream device. This application generates a unique identifier for a downstream device based on similar features such as the device information of the gateway, the device configuration information of the downstream device, and the device identifier information of the downstream device; the device information of different gateways, the device configuration information of the downstream device, and the device identifier information of the downstream device obtained by the same downstream device can be merged to obtain a unique identifier for the downstream device; the unique identifier determined by this application can ensure uniqueness as much as possible, avoiding the situation where the mobile device identification is used as the device identifier and the device identifier is not unique; in addition, with the solution provided by this application, there is no need to generate unique identifiers for Android devices or iPhone operating system devices separately, and unique identifiers can be generated for all downstream devices in a unified manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. 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 creative work.
[0044] Figure 1 A diagram of an application environment of a method for generating a unique device identifier in an embodiment;
[0045] Figure 2 A schematic diagram of a flow chart of a method for generating a unique device identifier in an embodiment;
[0046] Figure 3 It is a schematic diagram of a process of obtaining a feature vector corresponding to any second record information in one embodiment;
[0047] Figure 4is a structural block diagram of a device for generating a unique identifier of a device in one embodiment;
[0048] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0050] The present application embodiment provides a method for generating a unique device identifier, which can be executed by a computer device, such as Figure 1 As shown, the computer device can obtain the data collected from the downstream device of the gateway during the active time, and then obtain the unique identifier of the downstream device. It can be understood that the computer device can be implemented by a server, a terminal, or an interactive system between a terminal and a server. In this embodiment, the method includes Figure 2 The steps shown are:
[0051] Step S201, obtain a first information table based on the data collected from the downstream devices of the gateway during the active time; the first information table includes multiple first record information, each first record information includes the device information of the gateway at the corresponding active time, the device configuration information of the downstream device and the device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields.
[0052] A gateway is a network device that has the function of connecting different network protocols, data formats or network architectures.
[0053] The devices connected to the gateway usually refer to various terminal devices connected to the gateway, which transmit and communicate data through the gateway. As an intermediary, the gateway is responsible for transmitting the data of the devices connected to the gateway to the upper network (such as the cloud platform) and receiving instructions to send to the devices connected to the gateway.
[0054] The time during which the gateway's downstream devices are in working condition and able to collect data and communicate within a specific period of time is called active time.
[0055] You can use the Tianyi smart gateway plug-in to set a regular expression for the gateway's downstream devices to collect user access information of the gateway's downstream devices during active time, and filter the traffic logs, gateway device data, and downstream device data contained in the user access information; according to the above filtering data results, integrate to obtain the first information table. The first information table includes multiple first record information, each of which includes the device information of the gateway at the corresponding active time, the device configuration information of the downstream device, and the device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields.
[0056] Specifically, a home gateway plug-in can be deployed to obtain the home topology structure and collect user access information of the terminal devices connected to the home gateway. According to the gateway device data in the user access information, the gateway media access control address (gateway mac) can be obtained as the device information of the gateway. The terminal cloud recognition technology can be used to extract the media access control address (downstream device mac), downstream device category, downstream device brand, downstream device model, downstream device operating system and downstream device operating system version of the downstream device from the traffic log of the downstream device in the user access information as the device configuration information of the downstream device. According to the downstream device data in the user access information, the identifier (Identifier for Advertisers, idfa) of the user device of the iPhone operating system (iPhone Operating System, IOS), the identifier (Identifier for Vendor, idfv) of the iPhone operating system identifier, the mobile device identifier (Open Anonymous Identifier, oaid), the international mobile equipment identity (International Mobile Equipment Identity, imei), the unique identifier (Android Identifier, Android ID), the international mobile subscriber identity (International Mobile Subscriber Identity, imsi), and the mobile equipment identity (Mobile Equipment Identity) can be obtained. Identifier, meid), as the device identifier information of the downstream device; the first information table can be obtained according to the device information of the gateway at the corresponding active time, the device configuration information of the downstream device and the device identifier information of the downstream device, as shown in Table 1.
[0057] Table 1 First information table
[0058]
[0059] Among them, the corresponding values of the iPhone operating system user device identifier (idfa), iPhone operating system application developer identifier (idfv), mobile device identifier (oaid), international mobile equipment identity code (imei), Android operating system unique identifier (AndroidID), international mobile subscriber identity code (imsi), and mobile device identification code (meid) are called identifier fields.
[0060] Step S202: If any two pieces of first record information in the first information table have at least one identical identifier field, any two pieces of first record information are merged to obtain a second information table.
[0061] After obtaining the first information table, the first information table is processed in a standardized data format as follows: the identity document (ID) of illegal devices in the first information table, such as 000000000000, is removed; the identifiers of the iPhone operating system user device (IDFA), the iPhone operating system identifier application developer identifier (IDFV), the mobile device identifier (OAI), the International Mobile Equipment Identity (IMEI), the Android operating system unique identifier (AndroidID), the International Mobile Subscriber Identity (IMSI), and the mobile device identification code (MEID) are converted into a unified format, and the formats of the downstream device brands and models are standardized.
[0062] After the first information table is processed in a standardized data format, it is determined whether any two first record information in the first information table have the same identifier field.
[0063] If any two first record information in the first information table have at least one identical identifier field, it indicates that the two first record information are likely to be from the same downstream device. In this case, the two first record information can be merged to obtain the second information table.
[0064] Step S203: Obtain a feature vector corresponding to each second record information in the second information table.
[0065] Each piece of second record information in the second information table may be processed into a separate feature vector to obtain a feature vector corresponding to each piece of second record information in the second information table.
[0066] Step S204: merging the second record information in the second information table according to the similarity between the feature vectors to obtain a third information table.
[0067] The similarity between the feature vectors can be obtained based on the similarity function; the second record information with a high probability of originating from the same downstream device can be determined based on the similarity between the feature vectors, so as to merge the second record information in the second information table to obtain the third information table.
[0068] Step S205: According to each third record information in the third information table, a device fingerprint of the hanging device corresponding to each third record information is obtained to obtain a unique identifier of the hanging device.
[0069] It can be determined that each piece of third record information in the third information table corresponds to a separate downstream device; based on each piece of third record information in the third information table, the device fingerprint of each downstream device corresponding to each piece of third record information can be obtained; and the device fingerprint of each downstream device is used as the unique identifier of each downstream device.
[0070] After obtaining the unique identifier of the downstream device, the unique identifier of the downstream device can be set as the unique advertisement identifier of the downstream device of the home gateway. The corresponding downstream device user can be directly associated with the unique advertisement identifier, which can eliminate the situation where different advertisers use different identifiers and cannot locate the specific downstream device of the home. It also eliminates the influence of random MAC on the positioning of the downstream device, solves the problem of non-unique advertising identifiers in the current market, and thus accurately locates the target user. It is helpful to help operators and advertisers locate user value and realize accurate advertising and user statistics. In addition, for the home gateway, it solves the problem of locating users caused by the inability to obtain the MAC of the downstream device under the routing mode router.
[0071] In the above-mentioned method for generating a unique device identifier, a unique identifier for the downstream device is generated based on similar features such as the device information of the gateway, the device configuration information of the downstream device and the device identifier information of the downstream device; the device information of different gateways, the device configuration information of the downstream device and the device identifier information of the downstream device obtained by the same downstream device can be merged to obtain a unique identifier for the downstream device; the unique identifier determined by the present application can ensure uniqueness as much as possible, avoiding the situation where the mobile device identification is used as the device identifier and the device identifier is not unique; in addition, with the solution provided by the present application, there is no need to generate unique identifiers for Android devices or iPhone operating system devices separately, and unique identifiers can be generated for all downstream devices in a unified manner.
[0072] In one of the embodiments, any two pieces of first record information are merged, and the specific steps are as follows: according to the active dates corresponding to any two pieces of first record information, the priorities of any two pieces of first record information are set respectively; the newer the active date corresponding to the first record information, the higher the priority corresponding to the first record information; the non-empty identifier field of the low-priority first record information is filled into the high-priority first record information; if any two pieces of first record information have different non-empty values on the same identifier field, the non-empty value of the high-priority first record information is retained.
[0073] Exemplarily, the active date corresponding to the first record information ① is May 6, 2024, and the active date corresponding to the first record information ② is April 1, 2024, then the priority of the first record information ① is set to high priority, and the priority of the first record information ② is set to low priority.
[0074] The identifier field of the mobile device identifier (oaid) of the first record information ① is a non-null value A, and the identifier field of the mobile device identifier (oaid) of the first record information ② is a non-null value B, and the non-null value B is different from the non-null value A, then for the mobile device identifier (oaid), the non-null value A of the first record information ① is retained as the identifier field.
[0075] In this embodiment, priorities are set for any two pieces of first record information according to their respective active dates; any two pieces of first record information are merged according to their respective priorities, and first record information that is likely to come from the same downstream device can be merged.
[0076] In one embodiment, the characteristic vector corresponding to each second record information in the second information table is obtained, and the specific steps are as follows: Figure 3 As shown: Step S301, convert the device configuration information of the downstream device in each second record information from non-numerical form to numerical form; Step S302, for any second record information, obtain the device configuration feature vector component according to the device configuration information in numerical form in any second record information; Step S303, obtain the gateway feature vector component according to the device information of the gateway in any second record information; Step S304, obtain the device identifier feature vector component according to the device identifier information of the downstream device in any second record information; Step S305, obtain the feature vector corresponding to any second record information according to the device configuration feature vector component, the gateway feature vector component and the device identifier feature vector component.
[0077] One-hot encoding is performed on the device configuration information of the downstream device in each piece of second record information, so that the device configuration information of the downstream device in each piece of second record information is converted from a non-numerical form to a numerical form.
[0078] The following takes obtaining the feature vector corresponding to the j-th second record information as an example to introduce specific steps for obtaining the feature vector corresponding to any second record information.
[0079] For the j-th second record information, according to the device configuration information in numerical form in the j-th second record information, the device configuration feature vector components K and L are obtained; according to the device information of the gateway in the j-th second record information, the gateway feature vector component M is obtained; according to the device identifier information of the downstream device in the j-th second record information, the device identifier feature vector components N and O are obtained; by integrating the device configuration feature vector component K, the gateway feature vector component L and the device identifier feature vector component M, the feature vector (K, L, M, N, O) corresponding to the j-th second record information can be obtained.
[0080] In this embodiment, for any second record information, based on the device configuration information in numerical form, the device information of the gateway, and the device identifier information of the downstream device in any second record information, the device configuration feature vector component, the gateway feature vector component, and the device identifier feature vector component are respectively obtained to quickly obtain the feature vector corresponding to any second record information.
[0081] In one of the embodiments, before merging the second record information in the second information table according to the similarity between the feature vectors to obtain the third information table, the method provided by the present application also includes: obtaining the weight corresponding to each device configuration feature vector component in the second record information; for any two second record information, obtaining the device configuration similarity between the device configuration feature vector components according to the multiplication value of the weight corresponding to the device configuration feature vector components corresponding to any two second record information and the absolute difference between the device configuration feature vector components corresponding to any two second record information; obtaining the gateway similarity between the gateway feature vector components according to the absolute difference between the gateway feature vector components corresponding to any two second record information; obtaining the device identifier similarity between the device identifier feature vector components according to the absolute difference between the device identifier feature vector components corresponding to any two second record information; and obtaining the similarity between the feature vectors corresponding to any two second record information according to the device configuration similarity, gateway similarity and device identifier similarity.
[0082] Taking obtaining the similarity between the feature vector corresponding to the p-th second record information and the feature vector corresponding to the q-th second record information as an example, the specific steps of obtaining the similarity between the feature vectors corresponding to any two pieces of second record information are introduced below.
[0083] The importance of different configuration features of the downstream device is different. Therefore, the weight corresponding to each device configuration feature vector component in the second record information can be obtained according to the importance of different configuration features. The weight corresponding to each device configuration feature vector component in the second record information can be obtained according to experiments. Specifically, the device configuration information of the downstream device may include the downstream device media access control address (downstream device mac), the downstream device category, the downstream device brand, the downstream device model, the downstream device operating system and the downstream device operating system version. The device configuration feature vector component includes the device mac feature vector component, the device category feature vector component, the device brand feature vector component, the device model feature vector component, the device operating system feature vector component and the device operating system version feature vector component. Because the device mac feature vector component will change over time and is different from other device configuration feature vector components, the weight of the device mac feature vector component here can be set to 1.
[0084] The weight corresponding to the device category feature vector component in the second record information can be obtained based on experiments. =0.35, weight corresponding to the device brand feature vector component =0.27, weight corresponding to the device model feature vector component =0.21, weight corresponding to the device operating system feature vector component =0.10, weight corresponding to the device operating system version feature vector component =0.07.
[0085] The device configuration similarity between the device configuration feature vector components corresponding to the p-th and q-th second record information can be obtained according to the sum of the product values of the weights corresponding to the device configuration feature vector components corresponding to the p-th and q-th second record information and the absolute difference between the device configuration feature vector components corresponding to the p-th and q-th second record information, as shown in formula (1).
[0086] (1)
[0087] In the formula, represents the device configuration similarity between the device configuration feature vector components corresponding to the p-th and q-th second record information, n represents the total number of device configuration feature vector components, represents the weight corresponding to the i-th device configuration feature vector component, represents the i-th device configuration feature vector component corresponding to the p-th second record information, Indicates the i-th device configuration feature vector component corresponding to the q-th second record information.
[0088] According to the sum of the absolute differences between the gateway feature vector components corresponding to the p-th and q-th second record information, the gateway similarity between the gateway feature vector components is obtained; according to the sum of the absolute differences between the device identifier feature vector components corresponding to the p-th and q-th second record information, the device identifier similarity between the device identifier feature vector components is obtained; the sum of the device configuration similarity, the gateway similarity and the device identifier similarity can be used as the similarity between the feature vectors corresponding to the p-th and q-th second record information.
[0089] In this embodiment, the device configuration similarity between the device configuration feature vector components is obtained based on the multiplication of the weights corresponding to the device configuration feature vector components corresponding to any two pieces of second record information and the absolute difference between the device configuration feature vector components corresponding to any two pieces of second record information; the similarity between the feature vectors corresponding to any two pieces of second record information is obtained based on the device configuration similarity, gateway similarity and device identifier similarity, so that the second record information with a high probability of originating from the same downstream device can be screened out more accurately, so as to merge similar downstream devices into the same downstream device.
[0090] In one of the embodiments, the second record information in the second information table is merged according to the similarity between the feature vectors to obtain the third information table, and the specific steps are as follows: multiple rounds of merging operations are performed according to the similarity between the feature vectors; wherein the steps of each round of merging operation are as follows: the feature vectors of the previous round are obtained, and according to the similarity between the feature vectors of the previous round, the second record information of the previous round corresponding to the two feature vectors of the previous round with the highest similarity are selected for merging to obtain the second information table of this round; according to the second record information of this round in the second information table of this round, the feature vector of this round corresponding to each second record information of this round is obtained; when the similarity between two feature vectors of this round is not lower than the set threshold, the next round of merging operation is entered according to the feature vectors of this round; when the similarity between any two feature vectors of this round is lower than the set threshold, the third information table is obtained.
[0091] The threshold T can be determined based on actual conditions.
[0092] According to the similarity between each feature vector, multiple rounds of merging operations are performed to obtain a third information table.
[0093] Among them, the steps of each round of merging operation are as follows: obtain the feature vectors of the previous round, and according to the similarity between the feature vectors of the previous round, select the second record information of the previous round corresponding to the two feature vectors of the previous round with the highest similarity to merge, so as to obtain the second information table of this round; according to each second record information of this round in the second information table of this round, obtain the feature vector of this round corresponding to each second record information of this round; when the similarity between two feature vectors of this round is not lower than the set threshold value T, enter the next round of merging operation according to the feature vectors of this round; when the similarity between any two feature vectors of this round is lower than the set threshold value T, obtain the third information table.
[0094] In this embodiment, multiple rounds of merging operations are performed according to the similarities between the feature vectors to obtain the third information table, so as to improve the accuracy that each third record information in the third information table corresponds to a separate downstream device.
[0095] In one of the embodiments, according to each third record information in the third information table, a device fingerprint of the downstream device corresponding to each third record information is obtained to obtain a unique identifier of the downstream device, and the specific steps are as follows: for any third record information, all identifier fields are spliced to obtain a splicing result; the splicing result is hashed to obtain the device fingerprint of the downstream device corresponding to any third record information; the device fingerprint of the downstream device is used as the unique identifier of the downstream device.
[0096] The following takes obtaining the unique identifier of the downstream device J as an example.
[0097] For the jth third record information, all the identifier fields of the third record information are concatenated (if there is no such identifier, the identifier field of this type is left blank), and the identifier fields of each type can be separated by a separator to obtain a concatenation result F, as shown in formula (2).
[0098] (2)
[0099] The concatenation result F is hashed to obtain the device fingerprint FE of the downstream device J corresponding to the j-th third record information, as shown in formula (3).
[0100] (3)
[0101] The device fingerprint FE of the downstream device J may be used as the unique identifier of the downstream device J.
[0102] In this embodiment, for each piece of third record information, a device fingerprint of the downstream device corresponding to each piece of third record information can be obtained; the device fingerprint of the downstream device is used as the unique identifier of the downstream device, thereby obtaining a unique identifier of each downstream device.
[0103] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0104] Based on the same inventive concept, the embodiment of the present application also provides a device for generating a unique device identifier for implementing the method for generating a unique device identifier involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for generating one or more unique device identifiers provided below can refer to the limitations of the method for generating a unique device identifier above, and will not be repeated here.
[0105] In an exemplary embodiment, Figure 4 As shown, a device for generating a unique device identifier is provided, wherein:
[0106] The first information table acquisition module 401 is used to obtain a first information table according to the data collected from the downstream device of the gateway during the active time; the first information table includes multiple first record information, each of which includes the device information of the gateway at the corresponding active time, the device configuration information of the downstream device and the device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields;
[0107] A second information table acquisition module 402, configured to merge any two first record information in the first information table to obtain a second information table if the two first record information have at least one identical identifier field;
[0108] A feature vector acquisition module 403 is used to acquire a feature vector corresponding to each second record information in the second information table;
[0109] A third information table acquisition module 404 is used to merge the second record information in the second information table according to the similarity between the feature vectors to obtain a third information table;
[0110] The unique identifier acquisition module 405 is used to obtain the device fingerprint of the downstream device corresponding to each third record information according to each third record information in the third information table, so as to obtain the unique identifier of the downstream device.
[0111] In one of the embodiments, the second information table acquisition module 402 is also used to: set priorities for any two first record information according to the active dates corresponding to each of the two first record information; the newer the active date corresponding to the first record information, the higher the priority corresponding to the first record information; fill the non-empty identifier field of the low-priority first record information into the high-priority first record information; if any two first record information have different non-empty values in the same identifier field, retain the non-empty value of the high-priority first record information.
[0112] In one embodiment, the feature vector acquisition module 403 is also used to: convert the device configuration information of the downstream device in each second record information from a non-numerical form to a numerical form; for any second record information, obtain a device configuration feature vector component based on the device configuration information in numerical form in any second record information; obtain a gateway feature vector component based on the device information of the gateway in any second record information; obtain a device identifier feature vector component based on the device identifier information of the downstream device in any second record information; obtain a feature vector corresponding to any second record information based on the device configuration feature vector component, the gateway feature vector component and the device identifier feature vector component.
[0113] In one of the embodiments, the device also includes a similarity acquisition module, which is used to: obtain the weight corresponding to each device configuration feature vector component in the second record information; for any two second record information, obtain the device configuration similarity between the device configuration feature vector components according to the multiplication value of the weight corresponding to the device configuration feature vector components corresponding to the any two second record information and the absolute difference between the device configuration feature vector components corresponding to the any two second record information; obtain the gateway similarity between the gateway feature vector components according to the absolute difference between the gateway feature vector components corresponding to the any two second record information; obtain the device identifier similarity between the device identifier feature vector components according to the absolute difference between the device identifier feature vector components corresponding to the any two second record information; obtain the similarity between the feature vectors corresponding to the any two second record information according to the device configuration similarity, the gateway similarity and the device identifier similarity.
[0114] In one embodiment, the third information table acquisition module 404 is also used to: perform multiple rounds of merging operations based on the similarity between each feature vector; wherein the steps of each round of merging operations are as follows: obtain the feature vectors of the previous round, and according to the similarity between the feature vectors of the previous round, select the second record information of the previous round corresponding to the two feature vectors of the previous round with the highest similarity for merging to obtain the second information table of this round; according to each second record information of this round in the second information table of this round, obtain the feature vector of this round corresponding to each second record information of this round; when the similarity between two feature vectors of this round is not lower than the set threshold, enter the next round of merging operation according to the feature vectors of this round; when the similarity between any two feature vectors of this round is lower than the set threshold, obtain the third information table.
[0115] In one of the embodiments, the unique identifier acquisition module 405 is also used to: for any third record information, concatenate all identifier fields to obtain a concatenation result; perform hash processing on the concatenation result to obtain a device fingerprint of a downstream device corresponding to any third record information; and use the device fingerprint of the downstream device as the unique identifier of the downstream device.
[0116] Each module in the device for generating the unique device identifier can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0117] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, 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 an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data of an embodiment of a method for generating a unique device identifier. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating a unique device identifier is implemented.
[0118] Those skilled in the art will understand that Figure 5 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 those shown in the figure, or combine certain components, or have a different arrangement of components.
[0119] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0120] 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.
[0121] 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.
[0122] 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.
[0123] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0124] The technical features of the above embodiments may 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 there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0125] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating a unique device identifier, characterized in that: The method comprises: A first information table is obtained according to data collected from the downstream device of the gateway during the active time; the first information table includes multiple first record information, each of which includes device information of the gateway at the corresponding active time, device configuration information of the downstream device and device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields; If any two pieces of first record information in the first information table have at least one identical identifier field, then the two pieces of first record information are merged to obtain a second information table; Obtaining a feature vector corresponding to each second record information in the second information table; According to the similarity between the feature vectors, each second record information in the second information table is merged to obtain a third information table; According to each piece of third record information in the third information table, a device fingerprint of the downstream device corresponding to each piece of third record information is obtained to obtain a unique identifier of the downstream device.
2. The method according to claim 1, characterized in that: The merging of any two pieces of first record information includes: According to the active dates corresponding to the two pieces of first record information, respectively set priorities for the two pieces of first record information; the newer the active date corresponding to the first record information, the higher the priority corresponding to the first record information; Filling the non-empty identifier field of the first record information of the low priority into the first record information of the high priority; If any two pieces of first record information have different non-null values in the same identifier field, the non-null value of the first record information with a higher priority is retained.
3. The method according to claim 1, characterized in that The obtaining of the feature vector corresponding to each second record information in the second information table includes: Convert the device configuration information of the downstream device in each second record information from a non-numeric form to a numeric form; For any second record information, obtaining a device configuration feature vector component according to the device configuration information in numerical form in the any second record information; According to the device information of the gateway in any of the second record information, a gateway feature vector component is obtained; according to the device identifier information of the downstream device in any of the second record information, a device identifier feature vector component is obtained; A feature vector corresponding to any one of the second record information is obtained according to the device configuration feature vector component, the gateway feature vector component and the device identifier feature vector component.
4. The method according to claim 1, characterized in that: Before merging the second record information in the second information table according to the similarity between the feature vectors to obtain the third information table, the method further includes: Obtaining the weight corresponding to each device configuration feature vector component in the second record information; For any two pieces of second record information, obtain the device configuration similarity between the device configuration feature vector components according to the multiplication value of the weights corresponding to the device configuration feature vector components corresponding to the any two pieces of second record information and the absolute difference between the device configuration feature vector components corresponding to the any two pieces of second record information; Obtaining the gateway similarity between the gateway feature vector components according to the absolute difference between the gateway feature vector components corresponding to any two pieces of second record information; Obtaining the device identifier similarity between the device identifier feature vector components according to the absolute difference between the device identifier feature vector components corresponding to any two pieces of second record information; The similarity between the feature vectors corresponding to any two pieces of second record information is obtained according to the device configuration similarity, the gateway similarity and the device identifier similarity.
5. The method according to claim 1, characterized in that The second record information in the second information table is merged according to the similarity between the feature vectors to obtain a third information table, including: According to the similarity between each feature vector, multiple rounds of merging operations are performed; Among them, the steps of each round of merging operation are as follows: obtain the feature vectors of the previous round, and according to the similarity between the feature vectors of the previous round, select the second record information of the previous round corresponding to the two feature vectors of the previous round with the highest similarity for merging to obtain the second information table of this round; according to each second record information of this round in the second information table of this round, obtain the feature vector of this round corresponding to each second record information of this round; when the similarity between two feature vectors of this round is not lower than the set threshold, enter the next round of merging operation according to the feature vectors of this round; when the similarity between any two feature vectors of this round is lower than the set threshold, obtain the third information table.
6. The method according to claim 1, characterized in that The obtaining, according to each third record information in the third information table, a device fingerprint of a downstream device corresponding to each third record information to obtain a unique identifier of the downstream device includes: For any third record information, concatenate all identifier fields to obtain a concatenation result; Perform hash processing on the splicing result to obtain a device fingerprint of the downstream device corresponding to any third record information; The device fingerprint of the downstream device is used as the unique identifier of the downstream device.
7. A device for generating a unique device identifier, characterized in that: The device comprises: A first information table acquisition module is used to obtain a first information table according to data collected from the downstream device of the gateway during the active time; the first information table includes multiple first record information, each of which includes device information of the gateway at the corresponding active time, device configuration information of the downstream device and device identifier information of the downstream device; the device identifier information of the downstream device includes multiple identifier fields; A second information table acquisition module, configured to merge any two pieces of first record information in the first information table to obtain a second information table if the two pieces of first record information have at least one identical identifier field; A feature vector acquisition module, used to acquire a feature vector corresponding to each second record information in the second information table; A third information table acquisition module, used for merging the second record information in the second information table according to the similarity between the feature vectors to obtain a third information table; The unique identifier acquisition module is used to obtain the device fingerprint of the downstream device corresponding to each third record information according to each third record information in the third information table, so as to obtain the unique identifier of the downstream device.
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 6 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 6 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 6 are implemented.