CN116049911B - Method, device, equipment and computer storage medium for generating equipment identifier - Google Patents

Method, device, equipment and computer storage medium for generating equipment identifier Download PDF

Info

Publication number
CN116049911B
CN116049911B CN202310341281.6A CN202310341281A CN116049911B CN 116049911 B CN116049911 B CN 116049911B CN 202310341281 A CN202310341281 A CN 202310341281A CN 116049911 B CN116049911 B CN 116049911B
Authority
CN
China
Prior art keywords
parameter information
equipment
identifier
kernel user
electronic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310341281.6A
Other languages
Chinese (zh)
Other versions
CN116049911A (en
Inventor
吴文军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Smk Network Technology Co ltd
Original Assignee
Shanghai Smk Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Smk Network Technology Co ltd filed Critical Shanghai Smk Network Technology Co ltd
Priority to CN202310341281.6A priority Critical patent/CN116049911B/en
Publication of CN116049911A publication Critical patent/CN116049911A/en
Application granted granted Critical
Publication of CN116049911B publication Critical patent/CN116049911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment and a computer storage medium for generating equipment identification, wherein the method comprises the following steps: under the condition that a system application installed on the electronic equipment is started, acquiring first equipment parameter information of the electronic equipment from a local cache of the electronic equipment and acquiring second equipment parameter information of the electronic equipment from a server side; under the condition that the unique equipment identifier of the electronic equipment is not included in the first equipment parameter information, a query request carrying the second equipment parameter information is sent to the server side, so that under the condition that the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information does not exist in the database of the server side, the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information is generated according to the kernel user identifier corresponding to the system application in the second equipment parameter information. According to the method and the device, the global uniqueness of the unique identifier of the device can be guaranteed.

Description

Method, device, equipment and computer storage medium for generating equipment identifier
Technical Field
The application belongs to the technical field of equipment identification, and particularly relates to a method, a device, equipment and a computer storage medium for generating equipment identification.
Background
With the increase of electronic devices, in order to uniquely identify each electronic device, a unique identifier needs to be set in a device system to distinguish each electronic device, and the existing device identifiers in the market are also various, such as a imei, mac, serialno, androidid, oaid universal fingerprint identifier.
Because of more equipment manufacturers, the identifier generation rules of different equipment manufacturers are different, and the system application versions are also various, so that the equipment identifiers cannot cover all the equipment, for example, only the imei and mac identifiers are arranged on the first system version, and only the serialno identifiers are arranged on the second system version. Therefore, most of the existing mobile terminal data can only generate unique identifications in a fingerprint identification combination mode, but the fingerprint identifications are easy to be directly modified by software, so that the global uniqueness of the equipment identifications cannot be guaranteed.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a computer storage medium for generating equipment identification, which can ensure the global uniqueness of the equipment identification.
In a first aspect, an embodiment of the present application provides a method for generating a device identifier, where the method includes:
under the condition that a system application installed on the electronic equipment is started, respectively acquiring first equipment parameter information of the electronic equipment from a local cache of the electronic equipment and acquiring second equipment parameter information of the electronic equipment from a server, wherein the first equipment parameter information and the second equipment parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic equipment;
under the condition that the first equipment parameter information does not comprise the equipment unique identifier of the electronic equipment, sending a query request carrying second equipment parameter information to the server side so that the server side queries whether an equipment identifier matched with a kernel user identifier corresponding to the system application in the second equipment parameter information exists in a database of the server side according to the query request;
and under the condition that the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information does not exist in the server database, generating the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information according to the kernel user identifier corresponding to the system application in the second device parameter information.
In some implementations of the first aspect, the method further includes: in case that the first device parameter information and the second device parameter information each comprise a device unique identification,
comparing whether kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are the same or not;
and under the condition that kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are different, sending an updating request carrying the equipment unique identifier and the second equipment parameter information to the server so that the server can update the equipment parameter information corresponding to the equipment unique identifier in the server database according to the second equipment parameter information.
In a second aspect, an embodiment of the present application provides a method for generating a device identifier, where the method is applied to a server, and the method includes:
receiving a query request carrying second equipment parameter information sent by electronic equipment; the query request is sent by the electronic device under the condition that a system application installed on the electronic device is started and the first device parameter information does not comprise a device unique identifier, the first device parameter information and the second device parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic device, the first device parameter information is the device parameter information of the electronic device stored in a local cache of the electronic device, and the second device parameter information is the device parameter information of the electronic device stored in the server;
According to the query request, querying whether a device identifier matched with a kernel user identifier corresponding to the system application in the second device parameter information exists in the server database;
and under the condition that the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information does not exist in the server database, generating the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information according to the kernel user identifier corresponding to the system application in the second device parameter information.
In some implementations of the second aspect, the method further includes: in case that the first device parameter information and the second device parameter information each comprise a device unique identification,
receiving an updating request which is sent by the electronic equipment and carries the equipment unique identifier and the second equipment parameter information under the condition that kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are different;
and updating the equipment parameter information corresponding to the equipment unique identifier in the server database according to the second equipment parameter information.
In some implementations of the second aspect, according to the query request, querying whether a device identifier that matches a kernel user identifier corresponding to a system application in the second device parameter information exists in the server database includes:
And inquiring whether the same number of the kernel user identifiers corresponding to the system application in the second equipment parameter information exists in the server database according to the inquiry request, wherein the number of the equipment identifiers is larger than the preset number.
In some implementations of the second aspect, the method further includes: in the case that there is a device identification in the server database that matches the kernel user identification corresponding to the system application in the second device parameter information,
and returning the device identifier which is inquired from the server database and is matched with the kernel user identifier corresponding to the system application in the second device parameter information to the electronic device.
In some implementations of the second aspect, after generating, according to the kernel user identifier corresponding to the system application in the second device parameter information, a device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information, the method further includes:
and storing the device identifier which is generated by the server and is matched with the kernel user identifier corresponding to the system application in the second device parameter information and the second device parameter information in a server database in a correlated manner.
In a third aspect, an embodiment of the present application provides a device identifier generating apparatus, where the device includes:
The system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for respectively acquiring first equipment parameter information of the electronic equipment from a local cache of the electronic equipment and acquiring second equipment parameter information of the electronic equipment from a server under the condition that a system application installed on the electronic equipment is started, and the first equipment parameter information and the second equipment parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic equipment;
the sending module is used for sending a query request carrying the second equipment parameter information to the server under the condition that the first equipment parameter information does not comprise the equipment unique identifier of the electronic equipment, so that the server queries whether the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information exists in the database of the server according to the query request;
the generating module is used for generating the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information according to the kernel user identifier corresponding to the system application in the second equipment parameter information under the condition that the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information does not exist in the server database.
In a fourth aspect, an embodiment of the present application provides a device for generating a device identifier, where the device is applied to a server, and the device includes:
the receiving module is used for receiving a query request carrying second equipment parameter information sent by the electronic equipment; the query request is sent by the electronic device under the condition that a system application installed on the electronic device is started and the first device parameter information does not comprise a device unique identifier, the first device parameter information and the second device parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic device, the first device parameter information is the device parameter information of the electronic device stored in a local cache of the electronic device, and the second device parameter information is the device parameter information of the electronic device stored in the server;
the query module is used for querying whether a device identifier matched with a kernel user identifier corresponding to the system application in the second device parameter information exists in the server database according to the query request;
the generating module is used for generating the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information according to the kernel user identifier corresponding to the system application in the second equipment parameter information under the condition that the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information does not exist in the server database.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions;
the processor when executing the computer program instructions implements the method for generating a device identifier according to any one of the first aspect and the second aspect.
In a fourth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method for generating a device identifier according to any one of the first and second aspects.
In a fifth aspect, embodiments of the present application provide a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the method for generating a device identifier according to any one of the first and second aspects.
In the case of starting a system application installed on an electronic device, acquiring first device parameter information of the electronic device from a local cache of the electronic device and acquiring second device parameter information of the electronic device from a server, wherein the first device parameter information and the second device parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic device; under the condition that the first equipment parameter information does not comprise the equipment unique identifier, a query request carrying second equipment parameter information is sent to the server side, so that the server side generates the equipment identifier matched with the kernel user identifier corresponding to the system application in the second equipment parameter information according to the kernel user identifier corresponding to the system application in the second equipment parameter information under the condition that the server side is queried that the equipment identifier matched with the second equipment parameter information does not exist in the database of the server side. According to the embodiment of the application, each electronic device comprises a plurality of system applications, and according to the generation rule of the kernel user identification, the kernel user identification corresponding to each system application is unique. Therefore, the device identification is generated in a mode of no longer relying on fingerprint identification combination, but the device unique identification is generated based on the kernel user identification corresponding to the system application, so that the global uniqueness of the device unique identification is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
Fig. 1 is a flow chart of a method for generating a device identifier according to an embodiment of the present application;
fig. 2 is a flowchart of another method for generating a device identifier according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a device identifier generating apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of another device identifier generating apparatus provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The unique identifiers of the electronic devices in the existing market are various, because the device manufacturers are more, the identifier generation rules of different device manufacturers are different, the system application versions are various, and the information security related policy is limited, for example, the unique fingerprint identifiers of the general devices such as imei, mac, serialno, androidid, oaid cannot be obtained to cover all the devices, so that the unique identifiers can only be generated by the mode of combining the fingerprint identifiers ID (identity) of the mobile terminal data in most of the enterprises in the prior art, the global uniqueness of the device identifiers cannot be ensured, the unique fingerprint identifiers of the general devices are easily directly modified by software, and the problem of device identifier collision is also easy to exist.
In order to solve the problems in the prior art, the embodiment of the application provides a method, a device, equipment and a computer storage medium for generating equipment identifiers. The method for generating the device identifier provided in the embodiment of the present application is first described below.
Fig. 1 shows a flowchart of a method for generating a device identifier according to an embodiment of the present application. As shown in fig. 1, the method specifically includes the following steps:
s101, under the condition that a system application installed on an electronic device is started, the electronic device respectively acquires first device parameter information of the electronic device from a local cache of the electronic device and acquires second device parameter information of the electronic device from a server, wherein the first device parameter information and the second device parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic device;
s102, under the condition that the first equipment parameter information does not comprise the equipment unique identifier of the electronic equipment, the electronic equipment sends a query request carrying second equipment parameter information to a server;
s103, the server side inquires whether a device identifier matched with a kernel user identifier corresponding to the system application in the second device parameter information exists in a database of the server side according to the inquiry request;
S104, returning the device identifier which is inquired from the server-side database and is matched with the kernel user identifier corresponding to the system application in the second device parameter information to the electronic device under the condition that the device identifier which is matched with the kernel user identifier corresponding to the system application in the second device parameter information exists in the server-side database;
s105, under the condition that the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information does not exist in the server database, generating the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information according to the kernel user identifier corresponding to the system application in the second device parameter information;
s106, the device identification which is generated by the server and is matched with the kernel user identification corresponding to the system application in the second device parameter information is associated and stored in a server database.
Thus, according to the method for generating the device identifier in the embodiment of the application, under the condition that the system application installed on the electronic device is started, the first device parameter information of the electronic device is obtained from the local cache of the electronic device, the second device parameter information of the electronic device is obtained from the server, and under the condition that the first device parameter information does not include the unique device identifier, a query request carrying the second device parameter information is sent to the server, so that the server generates the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information according to the kernel user identifier corresponding to the system application in the second device parameter information under the condition that the server does not have the device identifier matched with the second device parameter information in the database. Because each electronic device comprises a plurality of system applications, according to the generation rule of the kernel user identification, the kernel user identification corresponding to each system application is unique. Therefore, the device identification is generated in a mode of no longer relying on fingerprint identification combination, but the device unique identification is generated based on the kernel user identification corresponding to the system application, so that the global uniqueness of the device unique identification is ensured.
In some embodiments, in S101, first device parameter information of the electronic device is obtained from a local cache of the electronic device, and second device parameter information of the electronic device is obtained from a server through a system call interface API. The first device parameter information and the second device parameter information may include a device vendor, a device model, a system application package name, and a kernel user identifier (User Identification, UID) of the electronic device, where the system application package name refers to a unique identifier of a system application program on the electronic device, and the kernel user identifier UID refers to a kernel user ID allocated by an operating system of the electronic device for each system application.
In some embodiments, in S102, the first device parameter information obtained from the local cache may or may not include a device unique identifier of the electronic device. As an example, in the case that the first device parameter information does not include the device unique identifier of the electronic device, the electronic device needs to send a query request carrying the second device parameter information to the server, so that the server queries, according to the query request, whether the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information exists in the database of the server.
The electronic device may upload the second device parameter information "device vendor+device model+system application package name+kernel user identifier" of the electronic device currently acquired from the server to the server through the interface "receive query device unique identifier request" of the server in a query request manner.
In some embodiments, in S103, after receiving the query request sent by the electronic device, the server queries, according to the second device parameter information carried in the query request, whether a device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information exists in the server database.
As an example, if the same number of kernel user identifiers corresponding to the system applications in the second device parameter information exists in the query server database, the number of device identifiers is greater than a preset number, and the preset number may be set to 95% of the number of the electronic device system applications. After the electronic equipment leaves the factory for the first time, the system service scans all system application installation packages, generates a UID for each system application, scans a system catalog file and generates the UID in an incremental mode. However, on different electronic devices, each link in the system application, the scanning environment, the execution time and the increment time has a difference and a variable, and the UIDs generated for the same system application on different devices of the same model are different due to the generation mode.
For example, if m identical applications exist in the system application list of two electronic devices of the same manufacturer and the same model, m different kernel user identifications exist correspondingly, and the number of kernel user identification permutation and combination is a factorial of m, as shown in the following formula (1), the probability P that the kernel user identifications are identical is extracted from the factorial of m:
Figure SMS_1
where P represents the probability that the kernel user identity is the same extracted from the factorization of m,
Figure SMS_2
representing the number of kernel user identification permutations and combinations.
According to the above formula (1), a system schematic of the probability P that the number m of system applications is the same as the kernel user identifier is obtained as shown in the following table 1:
table 1 System application number and kernel user identification same probability relation schematic table
Figure SMS_3
As can be seen from Table 1, when the number of system applications m is greater than or equal to 10, the probability of extracting the same kernel user identifier from the factorization of m is extremely small, and by statistics, the average number of system applications on an android mobile phone is 275 by way of example, and by combining the formula (1), the probability of extracting the same kernel user identifier is extremely small. Thus, the uniqueness of the combination of the device manufacturer, the device model, the system application package name and the kernel user identification can be ensured.
In general, the number of average system applications on an electronic device such as an android mobile phone is 275, and considering the uncertainty that newly added or deleted system applications may exist after a large version of the electronic device system is upgraded and random collision, when a server side queries, the number of matched system application package names and kernel user identifiers can be properly reduced, that is, 95% of the number of the electronic device system applications can be considered as a preset number, so that the matching rate of unique identifiers of devices querying the electronic device can be improved.
In some embodiments, in S104, if there are device identifiers in the server database that match kernel user identifiers corresponding to system applications in the second device parameter information, that is, if there are more than 95% device identifiers in the server database that are the same number of kernel user identifiers corresponding to system applications in the second device parameter information, the device identifier is returned to the electronic device as a device unique identifier of the electronic device.
In some embodiments, in S105, in the case where there is no device identifier in the server database that matches a kernel user identifier corresponding to a system application in the second device parameter information, for example, if there is no device identifier in the server database that is greater than 95% of the same number of kernel user identifiers corresponding to the system application in the second device parameter information, a snowflake algorithm or a distributed application may be used to generate, according to the kernel user identifier corresponding to the system application in the second device parameter information, a device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information.
In some embodiments, in S106, after the server generates the device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information, the generated device identifier and the second device parameter information are bound, stored in a server database in an associated manner, and the device identifier is returned to the electronic device.
Therefore, 95% of the number of the electronic equipment system applications is used as a query matching condition, the unique identification of the global equipment of the bound data is matched for the electronic equipment, the problem that the system application addition and deletion and the uncertainty of random collision of the equipment identification exist in the upgrading of the electronic equipment system applications is fully considered, the unique identification of the electronic equipment is generated based on the uniqueness generated by the kernel user identification and the system application list, and therefore the global uniqueness of the equipment identification is guaranteed.
Fig. 2 is a schematic flow chart of another method for generating a device identifier according to an embodiment of the present application. As shown in fig. 2, the method specifically includes the following steps:
s201, under the condition that a system application installed on the electronic equipment is started, the electronic equipment respectively acquires first equipment parameter information of the electronic equipment from a local cache of the electronic equipment and acquires second equipment parameter information of the electronic equipment from a server, wherein the first equipment parameter information and the second equipment parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic equipment;
S202, comparing whether kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are the same or not under the condition that the first equipment parameter information and the second equipment parameter information both comprise equipment unique identifiers;
s203, under the condition that kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are different, the electronic equipment sends an update request carrying an equipment unique identifier and the second equipment parameter information to a server;
s204, the server updates the device parameter information corresponding to the device unique identifier in the server database according to the second device parameter information.
Therefore, according to the method for generating the device identifier, under the condition that the first device parameter information and the second device parameter information both comprise the device unique identifier, whether the kernel user identifiers corresponding to the system applications in the electronic device in the first device parameter information and the second device parameter information are the same or not is compared, and under the condition that the kernel user identifiers are not the same, the electronic device sends an update request carrying the device unique identifier and the second device parameter information to the server, so that the device parameter information corresponding to the device unique identifier in the server database is updated. Therefore, the consistency of the local cache of the electronic equipment and the identification information of the server equipment can be ensured.
In some embodiments, in S201, the first device parameter information is device parameter information of the electronic device stored in a local cache of the electronic device, and the second device parameter information is device parameter information of the electronic device stored at the server.
In some embodiments, in S202, under the condition that the first device parameter information and the second device parameter information both include the device unique identifier, whether the kernel user identifier corresponding to the system application in the electronic device in the first device parameter information and the second device parameter information is the same is compared, that is, whether the first device parameter information in the local cache, "device manufacturer+device model+system application package name+kernel user identifier" and the second device parameter information in the server "device manufacturer+device model+system application package name+kernel user identifier" are changed is compared, and if no change occurs, other processing is not performed, and the current device unique identifier can ensure the global uniqueness of the device identifier.
In some embodiments, in S203, under the condition that kernel user identifiers corresponding to system applications in the electronic devices in the first device parameter information and the second device parameter information are different, an update request carrying a device unique identifier and second device parameter information, namely, a device manufacturer, a device model, a system application package name and a kernel user identifier, is uploaded to the server through an update request interface provided by the server and used for receiving information modification corresponding to the unique identifier, so that the server updates the device parameter information corresponding to the device unique identifier in the server database according to the second device parameter information.
In some embodiments, in S204, after receiving an update request sent by an electronic device, the server updates device parameter information corresponding to the device unique identifier in the server database according to second device parameter information carried in the update request, so as to ensure consistency between the local cache of the electronic device and the device identifier information in the server.
Therefore, the stability and the uniqueness of the system application package name and the kernel user identifier are utilized, the equipment global unique identifier is generated without depending on the hardware fingerprint identifier and through a flexible screening rule of a server side, the equipment identifier parameter information of the equipment unique identifier is updated in real time, and the stability and the global uniqueness of the equipment identifier are ensured while the consistency of the local cache of the electronic equipment and the equipment identifier information in the server side is ensured.
It should be noted that, the application scenario described in the embodiment of the present application is for more clearly describing the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. As a person skilled in the art can know, with the appearance of a new application scenario, the technical solution provided in the embodiment of the present application is applicable to similar technical problems.
Based on the same inventive concept, the present application provides a device identifier generating apparatus, which is specifically described in detail with reference to fig. 3.
Fig. 3 illustrates a device identifier generating apparatus provided in an embodiment of the present application, as shown in fig. 3, the device identifier generating apparatus 300 may include:
the obtaining module 301 is configured to obtain, when a system application installed on an electronic device is started, first device parameter information of the electronic device from a local cache of the electronic device, and second device parameter information of the electronic device from a server, where the first device parameter information and the second device parameter information each include at least a kernel user identifier corresponding to the system application in the electronic device;
the sending module 302 is configured to send, when the first device parameter information does not include the device unique identifier of the electronic device, a query request carrying second device parameter information to the server, so that the server queries whether a device identifier matched with a kernel user identifier corresponding to a system application in the second device parameter information exists in a database of the server according to the query request;
and the generating module 303 is configured to generate, according to the kernel user identifier corresponding to the system application in the second device parameter information, a device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information, when the device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information does not exist in the server database.
Therefore, according to the device for generating the device identifier provided by the embodiment of the application, under the condition that the system application installed on the electronic device is started, the first device parameter information of the electronic device is acquired from the local cache of the electronic device, the second device parameter information of the electronic device is acquired from the server, and under the condition that the unique device identifier is not included in the first device parameter information, a query request carrying the second device parameter information is sent to the server, so that the server generates the device identifier matched with the kernel user identifier corresponding to the system application in the second device parameter information according to the kernel user identifier corresponding to the system application in the second device parameter information under the condition that the server does not have the device identifier matched with the second device parameter information in the database. Because each electronic device comprises a plurality of system applications, according to the generation rule of the kernel user identification, the kernel user identification corresponding to each system application is unique. Therefore, the device identification is generated in a mode of no longer relying on fingerprint identification combination, but the device unique identification is generated based on the kernel user identification corresponding to the system application, so that the global uniqueness of the device unique identification is ensured.
In some embodiments, in a case where the first device parameter information and the second device parameter information each include a device unique identifier, the generating apparatus 300 of the device identifier may further include the following modules:
the comparison module is used for comparing whether the kernel user identifiers corresponding to the system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are the same.
In some embodiments, the sending module 302 is further configured to send, to the server, an update request carrying the device unique identifier and the second device parameter information when the kernel user identifiers corresponding to the system applications in the electronic device in the first device parameter information and the second device parameter information are different, so that the server updates the device parameter information corresponding to the device unique identifier in the server database according to the second device parameter information.
Based on the same inventive concept, the present application further provides a device identifier generating apparatus, which is applied to a server, and specifically described in detail with reference to fig. 4.
Fig. 4 illustrates another device identifier generating apparatus provided in an embodiment of the present application, as shown in fig. 4, the device identifier generating apparatus 400 may include:
A receiving module 401, configured to receive a query request carrying second device parameter information sent by an electronic device; the query request is sent by the electronic device under the condition that a system application installed on the electronic device is started and the first device parameter information does not comprise a device unique identifier, the first device parameter information and the second device parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic device, the first device parameter information is the device parameter information of the electronic device stored in a local cache of the electronic device, and the second device parameter information is the device parameter information of the electronic device stored in the server;
the query module 402 is configured to query, according to the query request, whether a device identifier that matches a kernel user identifier corresponding to a system application in the second device parameter information exists in the server database;
and the generating module 403 is configured to generate, according to the kernel user identifier corresponding to the system application in the second device parameter information, a device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information, when the device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information does not exist in the server database.
Therefore, according to the device for generating the device identifier provided by the embodiment of the application, under the condition that the first device parameter information and the second device parameter information both comprise the device unique identifier, whether the kernel user identifiers corresponding to the system applications in the electronic device in the first device parameter information and the second device parameter information are the same or not is compared, and under the condition that the kernel user identifiers are not the same, the electronic device sends an update request carrying the device unique identifier and the second device parameter information to the server, so that the device parameter information corresponding to the device unique identifier in the server database is updated. Therefore, the consistency of the local cache of the electronic equipment and the identification information of the server equipment can be ensured.
In some embodiments, where the first device parameter information and the second device parameter information each include a device unique identification,
the receiving module 401 is further configured to receive an update request carrying a device unique identifier and second device parameter information, where the update request is sent by the electronic device when kernel user identifiers corresponding to system applications in the electronic device in the first device parameter information and the second device parameter information are different.
In some embodiments, the apparatus 400 for generating a device identifier may further include the following modules:
And the updating module is used for updating the equipment parameter information corresponding to the equipment unique identifier in the server database according to the second equipment parameter information.
In some embodiments, the query module 402 is specifically configured to query, according to the query request, whether the server database has device identifiers with the same number of kernel user identifiers corresponding to the system applications in the second device parameter information greater than a preset number.
In some embodiments, the apparatus 400 for generating a device identifier may further include the following modules:
and the return module is used for returning the device identifier which is inquired from the server database and is matched with the kernel user identifier corresponding to the system application in the second device parameter information to the electronic device.
In some embodiments, the apparatus 400 for generating a device identifier may further include the following modules:
and the storage module is used for storing the equipment identifier which is generated by the server and is matched with the kernel user identifier corresponding to the system application in the second equipment parameter information and the second equipment parameter information in a server database in an associated manner.
Each module in the device identifier generating apparatus shown in fig. 3 and fig. 4 has a function of implementing the device identifier generating method shown in fig. 1 and fig. 2, and achieves a corresponding technical effect, and for brevity description, will not be repeated here.
Fig. 5 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
The electronic device 500 may include a processor 501 and a memory 502 storing computer program instructions.
In particular, the processor 501 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 502 may include removable or non-removable (or fixed) media, where appropriate. Memory 502 may be internal or external to electronic device 500, where appropriate. In a particular embodiment, the memory 502 is a non-volatile solid state memory.
Memory 502 may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory 502 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to the method of generating a device identity according to the first and second aspects of the present application.
The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement the method for generating a device identifier according to any of the above embodiments.
In one example, electronic device 500 may also include communication interface 503 and bus 504. As shown in fig. 5, the processor 501, the memory 502, and the communication interface 503 are connected to each other via the bus 504 and perform communication with each other.
The communication interface 503 is mainly used to implement communication between each module, apparatus, unit and/or device in the embodiments of the present application.
Bus 504 includes hardware, software, or both, coupling the components of electronic device 500 to one another. By way of example, and not limitation, bus 504 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 504 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
The electronic device 500 may implement the method for generating a device identifier described in connection with fig. 1 and fig. 2 and the apparatus for generating a device identifier described in connection with fig. 3 and fig. 4.
In addition, in combination with the method for generating the device identifier in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method of generating a device identifier of any of the above embodiments.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (10)

1. A method for generating a device identifier, comprising:
under the condition that a system application installed on electronic equipment is started, acquiring first equipment parameter information of the electronic equipment from a local cache of the electronic equipment and acquiring second equipment parameter information of the electronic equipment from a server, wherein the first equipment parameter information and the second equipment parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic equipment;
under the condition that the first equipment parameter information does not comprise the equipment unique identifier of the electronic equipment, sending a query request carrying the second equipment parameter information to the server side, so that the server side queries whether the same number of the kernel user identifiers corresponding to the system application in the second equipment parameter information exists in a database of the server side according to the query request, and the number of the equipment identifiers is larger than the preset number;
Under the condition that the same number of kernel user identifiers corresponding to the system applications in the second equipment parameter information does not exist in the server database, and the number of the same number of the kernel user identifiers is larger than the preset number, generating equipment identifiers matched with the kernel user identifiers corresponding to the system applications in the second equipment parameter information according to the kernel user identifiers corresponding to the system applications in the second equipment parameter information;
and receiving the equipment identifiers, wherein the equipment identifiers are equipment identifiers with the same number of kernel user identifiers corresponding to the system application in the second equipment parameter information being larger than the preset number, and are equipment unique identifiers of the electronic equipment.
2. The method according to claim 1, wherein the method further comprises: in case that the first device parameter information and the second device parameter information each comprise the device unique identity,
comparing whether kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are the same or not;
and under the condition that kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are different, sending an updating request carrying the equipment unique identifier and the second equipment parameter information to the server so that the server updates the equipment parameter information corresponding to the equipment unique identifier in the server database according to the second equipment parameter information.
3. A method for generating a device identifier, which is applied to a server, the method comprising:
receiving a query request carrying second equipment parameter information sent by electronic equipment; the query request is sent by the electronic device under the condition that a system application installed on the electronic device is started and a unique device identifier is not included in first device parameter information, the first device parameter information and the second device parameter information at least include kernel user identifiers corresponding to the system application in the electronic device, the first device parameter information is device parameter information of the electronic device stored in a local cache of the electronic device, and the second device parameter information is device parameter information of the electronic device stored in the server;
according to the query request, querying whether a device identifier matched with a kernel user identifier corresponding to the system application in the second device parameter information exists in a server database;
under the condition that the same number of kernel user identifiers corresponding to the system applications in the second equipment parameter information does not exist in the server database, and the number of the same number of the kernel user identifiers is larger than the preset number, generating equipment identifiers matched with the kernel user identifiers corresponding to the system applications in the second equipment parameter information according to the kernel user identifiers corresponding to the system applications in the second equipment parameter information;
According to the query request, querying whether a device identifier matched with a kernel user identifier corresponding to the system application in the second device parameter information exists in a server database, including:
and inquiring whether the server database contains equipment identifiers with the same number larger than the preset number of the kernel user identifiers corresponding to the system application in the second equipment parameter information according to the inquiry request.
4. A method according to claim 3, characterized in that the method further comprises: in case that the first device parameter information and the second device parameter information each comprise the device unique identity,
receiving an update request carrying the equipment unique identifier and the second equipment parameter information, which is sent by the electronic equipment under the condition that kernel user identifiers corresponding to system applications in the electronic equipment in the first equipment parameter information and the second equipment parameter information are different;
and updating the equipment parameter information corresponding to the equipment unique identifier in the server database according to the second equipment parameter information.
5. A method according to claim 3, characterized in that the method further comprises: in the case that there is a device identification in the server database that matches a kernel user identification corresponding to the system application in the second device parameter information,
And returning the device identifier which is inquired from the server database and is matched with the kernel user identifier corresponding to the system application in the second device parameter information to the electronic device.
6. The method of claim 3, wherein after generating the device identifier that matches the kernel user identifier corresponding to the system application in the second device parameter information according to the kernel user identifier corresponding to the system application in the second device parameter information, the method further comprises:
and storing the equipment identifier which is generated by the server and is matched with the kernel user identifier corresponding to the system application in the second equipment parameter information and the second equipment parameter information in the server database in a correlated way.
7. A device identifier generating apparatus, comprising:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for respectively acquiring first equipment parameter information of the electronic equipment from a local cache of the electronic equipment and acquiring second equipment parameter information of the electronic equipment from a server under the condition that a system application installed on the electronic equipment is started, and the first equipment parameter information and the second equipment parameter information at least comprise kernel user identifiers corresponding to the system application in the electronic equipment;
The sending module is used for sending a query request carrying the second equipment parameter information to the server side under the condition that the equipment unique identifier of the electronic equipment is not included in the first equipment parameter information, so that the server side queries whether the same number of the equipment identifiers which are larger than the preset number and correspond to the system application in the second equipment parameter information exist in a database of the server side according to the query request;
the generating module is used for generating equipment identifiers matched with the kernel user identifiers corresponding to the system applications in the second equipment parameter information according to the kernel user identifiers corresponding to the system applications in the second equipment parameter information when the same number of the kernel user identifiers corresponding to the system applications in the second equipment parameter information is not larger than the preset number of the equipment identifiers;
the sending module is further configured to receive the device identifier, where the device identifier is a device identifier with the same number of kernel user identifiers corresponding to the system application in the second device parameter information being greater than a preset number, and is a device unique identifier of the electronic device.
8. A device for generating a device identifier, which is applied to a server, the device comprising:
the receiving module is used for receiving a query request carrying second equipment parameter information sent by the electronic equipment; the query request is sent by the electronic device under the condition that a system application installed on the electronic device is started and a unique device identifier is not included in first device parameter information, the first device parameter information and the second device parameter information at least include kernel user identifiers corresponding to the system application in the electronic device, the first device parameter information is device parameter information of the electronic device stored in a local cache of the electronic device, and the second device parameter information is device parameter information of the electronic device stored in the server;
the query module is used for querying whether a device identifier matched with a kernel user identifier corresponding to the system application in the second device parameter information exists in a server database according to the query request;
the generating module is used for generating equipment identifiers matched with the kernel user identifiers corresponding to the system applications in the second equipment parameter information according to the kernel user identifiers corresponding to the system applications in the second equipment parameter information when the same number of the kernel user identifiers corresponding to the system applications in the second equipment parameter information is not larger than the preset number of the equipment identifiers;
The query module is specifically configured to:
and inquiring whether the server database contains equipment identifiers with the same number larger than the preset number of the kernel user identifiers corresponding to the system application in the second equipment parameter information according to the inquiry request.
9. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a method for generating a device identifier as claimed in any one of claims 1-6.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement a method of generating a device identification according to any of claims 1-6.
CN202310341281.6A 2023-04-03 2023-04-03 Method, device, equipment and computer storage medium for generating equipment identifier Active CN116049911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310341281.6A CN116049911B (en) 2023-04-03 2023-04-03 Method, device, equipment and computer storage medium for generating equipment identifier

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310341281.6A CN116049911B (en) 2023-04-03 2023-04-03 Method, device, equipment and computer storage medium for generating equipment identifier

Publications (2)

Publication Number Publication Date
CN116049911A CN116049911A (en) 2023-05-02
CN116049911B true CN116049911B (en) 2023-06-30

Family

ID=86116851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310341281.6A Active CN116049911B (en) 2023-04-03 2023-04-03 Method, device, equipment and computer storage medium for generating equipment identifier

Country Status (1)

Country Link
CN (1) CN116049911B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021197033A1 (en) * 2020-04-02 2021-10-07 支付宝(杭州)信息技术有限公司 Information processing method, apparatus and device, and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632213B (en) * 2017-03-20 2021-12-31 腾讯科技(北京)有限公司 Equipment information processing method and device
CN107766738A (en) * 2017-09-12 2018-03-06 阿里巴巴集团控股有限公司 A kind of binding method of smart machine, device and system, communication system
CN109543462B (en) * 2018-11-15 2020-12-04 深圳乐信软件技术有限公司 Equipment identification determination method, device, server and storage medium
CN112784318A (en) * 2019-11-07 2021-05-11 北京京东尚科信息技术有限公司 Method, device and storage medium for generating unique identification code of equipment
CN113326498B (en) * 2020-02-28 2023-11-17 华为技术有限公司 Authority multiplexing method, resource access method based on authority multiplexing and related equipment
CN114222288B (en) * 2021-11-30 2024-04-30 中国建设银行股份有限公司 Equipment identifier generation method, equipment identifier verification method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021197033A1 (en) * 2020-04-02 2021-10-07 支付宝(杭州)信息技术有限公司 Information processing method, apparatus and device, and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
U盘唯一性标识信息的构建与识别方法;李俊艳;高杨;刘婷婷;陈营端;白竹川;贺光维;;电子技术应用(03);全文 *

Also Published As

Publication number Publication date
CN116049911A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN109951289B (en) Identification method, device, equipment and readable storage medium
CN110856126B (en) Information reporting and receiving method, terminal equipment and storage medium
US20220167172A1 (en) Information verification method and related device
CN111143371A (en) Data query method, device, equipment, system and medium
CN113691486B (en) Method, device, equipment and storage medium for modifying message
CN109640316B (en) Target user terminal identification method, device, equipment and storage medium
CN105389177A (en) Software version confirmation method, device and system
CN110543324B (en) Plug-in increment updating method and device for application program
CN107066303B (en) Firmware comparison method and device
CN109656592B (en) Card management method, device, terminal and computer readable storage medium
CN111475190A (en) Information updating method and device, electronic equipment and readable storage medium
CN116049911B (en) Method, device, equipment and computer storage medium for generating equipment identifier
CN109842482B (en) Information synchronization method, system and terminal equipment
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN102685220A (en) Method and system for data interaction based on WEB page
CN111182536A (en) SIM card state detection method, device, network equipment and storage medium
CN113055254B (en) Address configuration method, device, access server and storage medium
CN106462845B (en) Configuration method of non-contact front end and terminal
CN112887958A (en) Data storage method, storage medium and terminal equipment
CN113296687A (en) Data processing method, device, computing equipment and medium
CN112966312A (en) Data storage method, device, equipment and storage medium
CN114710450B (en) Flow control method, device, equipment and computer storage medium
CN112995900B (en) SIM card distribution method, device, server and computer readable storage medium
CN115065965B (en) Information display method, information storage device, user identification card and user identification equipment
CN112738207B (en) Keyword data transmission method and device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant