CN108881513B - Method, device, equipment and storage medium for generating equipment code - Google Patents

Method, device, equipment and storage medium for generating equipment code Download PDF

Info

Publication number
CN108881513B
CN108881513B CN201810697876.4A CN201810697876A CN108881513B CN 108881513 B CN108881513 B CN 108881513B CN 201810697876 A CN201810697876 A CN 201810697876A CN 108881513 B CN108881513 B CN 108881513B
Authority
CN
China
Prior art keywords
equipment
code
historical
current
device code
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
CN201810697876.4A
Other languages
Chinese (zh)
Other versions
CN108881513A (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.)
Shenzhen Dingsheng Computer Technology Co ltd
Original Assignee
Shenzhen Dingsheng Computer 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 Shenzhen Dingsheng Computer Technology Co ltd filed Critical Shenzhen Dingsheng Computer Technology Co ltd
Priority to CN201810697876.4A priority Critical patent/CN108881513B/en
Publication of CN108881513A publication Critical patent/CN108881513A/en
Application granted granted Critical
Publication of CN108881513B publication Critical patent/CN108881513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames

Abstract

The embodiment of the invention provides a method, a device, equipment and a readable storage medium for generating equipment codes, wherein the method comprises the steps of obtaining an instruction of an APP (application) of mobile equipment for requesting to execute the equipment codes, and searching a current equipment code and at least one historical equipment code corresponding to the mobile equipment according to the instruction of the APP for requesting to execute the equipment codes; performing similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value; and sending the execution equipment code to the APP of the mobile equipment for storage. The embodiment of the invention can obtain stable equipment codes to realize the operation of the equipment APP, effectively prevent the number stealing behavior of the equipment APP and avoid the clustering behavior on the equipment APP from being dispersed.

Description

Method, device, equipment and storage medium for generating equipment code
Technical Field
The present invention relates to computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a device code.
Background
Currently, for an Android system, a background server collects International Mobile Equipment Identity (IMEI) or Android Identity authentication code Android id of each Mobile device as a device code; for the IOS system, the background server collects the Advertisement Identifier (IDFA) and the supplier Identifier (IDFV).
However, both the IMEI, android id, IDFA and IDFV have instability, and in practical applications, for example, the characteristic information of the device, such as resolution, hard disk size, memory size, device name, brand and the like, is tampered maliciously by a person, and at this time, the IMEI changes; for example, when the system is upgraded or the operating system is restored, or even factory settings are restored, the android id and the IDFA will change; for example, when the mobile device offloads the provider APP, the IDFV is reset upon reloading the provider APP. The above-mentioned enumerated situations all result in that one device can be recognized as two devices, which will affect the security of the mobile device used by the user, such as stealing account information of the mobile device, and dispersing clustering behaviors of multi-account login, multi-account authorization, multi-account transaction and the like of the same device on the same device. Clustering behavior on the devices is scattered.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for generating a device code, which can obtain a stable device code to implement an operation on a device APP, and avoid a clustering behavior on the device APP from being dispersed.
In a first aspect, an embodiment of the present invention provides a method for generating device codes, where the method includes:
acquiring a PP (propene Polymer) request execution device code instruction of the mobile device;
according to the instruction of the APP for requesting the execution of the equipment codes, searching a current equipment code and at least one historical equipment code corresponding to the mobile equipment;
performing similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value;
and sending the execution equipment code to the APP of the mobile equipment for storage.
In a second aspect, an embodiment of the present invention further provides an apparatus for generating a device code, where the apparatus includes:
the instruction acquisition module is used for acquiring an APP request of the mobile equipment code to execute an instruction of the equipment code;
the device code searching module is used for searching a current device code and at least one historical device code corresponding to the mobile device code according to the instruction of executing the device code of the APP request;
and the equipment code storage module is used for sending the execution equipment code to the APP of the mobile equipment for storage.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the method for generating device code according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for generating device code according to any one of the embodiments of the present invention.
The embodiment of the invention provides a method, a device, equipment and a readable storage medium for generating equipment codes, wherein the method comprises the steps of obtaining an instruction of an APP (application) of mobile equipment for requesting to execute the equipment codes, and searching a current equipment code and at least one historical equipment code corresponding to the mobile equipment according to the instruction of the APP for requesting to execute the equipment codes; performing similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value; and sending the execution equipment code to the APP of the mobile equipment for storage. The embodiment of the invention can obtain stable equipment codes to realize the operation of the equipment APP, effectively prevent the number stealing behavior of the equipment APP and avoid the clustering behavior on the equipment APP from being dispersed.
Drawings
Fig. 1 is a flowchart of a method for generating device codes according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for generating device codes according to a second embodiment of the present invention;
fig. 3 is a flowchart of a method for generating device codes according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for generating device codes according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some but not all of the relevant aspects of the present invention are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for generating a device code according to an embodiment of the present invention, where this embodiment may be applied to a situation where a background server generates a stable device code and sends the stable device code to a mobile device APP when the mobile device updates the device code. The method of the embodiment specifically comprises the following steps:
step 110, obtaining an instruction of the application software APP of the mobile device requesting to execute the device code.
When application software APP of the mobile device detects that no execution device code of operation corresponding to the APP exists in a local storage corresponding to the APP, an instruction of the APP requesting the execution device code is obtained.
In the mobile device, in order to ensure the use safety of the APP, when the relevant operation of the APP is executed, the device code in the APP local storage needs to be called. However, when the mobile device is upgraded/restored with an operating system, factory settings are restored, or malicious tampering is performed, the device code may be changed. When the device code of the APP in the mobile device changes each time, the device code of the APP stored locally is deleted adaptively, so that the APP stored locally is free from the device code. For example, when an APP on a mobile device such as a mobile phone, for example, "pay pal", is updated when the mobile phone updates an operating system, a device code of the mobile phone is updated, but the device code in the "pay pal" is adaptively deleted in the updating process, when someone maliciously tampers with device information characteristics (such as resolution, hard disk size, memory size, device name, brand, and the like) of the mobile phone at this time, the generated updated device code will maliciously operate the "pay pal" of the user, and a clustering behavior such as stealing the account number of the user "pay pal" to perform multi-account login, multi-account number authorization, multi-account number transaction, and the like on the user "pay pal" occurs, which seriously affects the use security of the "pay pal". Therefore, when the APP detects that there is no device code in the local storage, it needs to apply for a new device code from the server, for example, apply for the device code from the anti-fraud fingerprint service in the server.
Step 120, according to the instruction of the APP requesting the execution device code, searching a current device code and at least one historical device code corresponding to the mobile device.
The historical device code is stored in a database corresponding to the server, the current device code can be acquired through an APP, for example, an Android system acquires the current device code such as IMEI or Android Id, an IOS system acquires the current device code such as IDFA or IDFV, and uploads the current device code acquired by the APP to the database corresponding to the server.
And step 130, performing similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value.
The current device code and at least one historical device code can be vectorized, and the similarity of each historical device code relative to the current device code is calculated according to cosine similarity, Euclidean distance, Pearson correlation coefficient and other methods. Illustratively, such as android, android is a 64-bit hexadecimal number randomly generated by a system when a device is started for the first time, and android is reset when the device is booted with wipe data or factory settings are restored, so that a current value and a historical value of android are collected in a database of a server, and the similarity between the historical value and the current value is calculated through a cosine similarity algorithm.
For the selection of the current device code or the historical device code, the selection can be performed in two ways:
for example, if the number of the found historical device codes is one, similarity calculation is performed on the current device code and the historical device codes, and a metric value of the similarity calculation is used as a calculation result;
if the metric value is greater than or equal to the set threshold value, taking the historical device code as the execution device code;
and if the metric value is smaller than the set threshold value, taking the current equipment code as an execution equipment code.
Exemplarily, if the number of the found historical device codes is at least two, similarity calculation is performed on the current device code and the at least two historical device codes respectively, and at least two metric values of the similarity calculation are used as calculation results;
if the maximum metric value in the metric values is larger than or equal to the set threshold value, taking the historical equipment code corresponding to the maximum metric value as an execution equipment code;
and if the maximum metric value is smaller than the set threshold value, taking the current equipment code as an execution equipment code.
The corresponding historical device code and the current device code of which the metric values are greater than the set threshold belong to the same device, and the corresponding historical device code and the current device code of which the metric values are less than the set threshold belong to different devices.
It is understood that the determination of the set threshold may be based on human setting, or may be based on correlation statistics to determine the set threshold that meets the actual condition. The threshold is set to have the ability to ensure that the historical device code and the current device code in the device belong to the same device.
And step 140, sending the execution device code to the APP of the mobile device for storage.
Wherein, can understand that, when the server detects that the mobile device is dispersed to different devices, can give the user the APP risk suggestion on the mobile device or the mobile device that uses, let the user further decide whether to continue to carry out the relevant operation of APP to guarantee user APP safety in utilization.
The embodiment of the invention provides a method for generating equipment codes, which comprises the steps of obtaining an instruction of an APP (application) request execution equipment code of mobile equipment, and searching a current equipment code and at least one historical equipment code corresponding to the mobile equipment according to the instruction of the APP request execution equipment code; performing similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value; and sending the execution equipment code to the APP of the mobile equipment for storage. The embodiment of the invention can realize stable operation of the equipment code on the equipment APP, effectively prevent the number stealing behavior of the equipment APP and avoid the clustering behavior on the equipment APP from being dispersed.
Example two
Fig. 2 is a flowchart of a method for generating device codes according to an embodiment of the present invention, where this embodiment is further optimized based on the foregoing embodiment, and in this embodiment, similarity calculation is performed on the current device code and the historical device code, specifically: acquiring at least two pieces of equipment feature information of each mobile equipment, wherein the equipment feature information comprises: resolution, hard disk size, memory size, equipment name, equipment model, equipment brand, equipment mac address, operating system version and network system; determining the weight of each piece of equipment characteristic information according to a preset rule; and calculating the similarity between the current equipment code and the historical equipment code according to the equipment characteristic information and the weight of the equipment characteristic information.
Accordingly, as shown in fig. 2, the method comprises the steps of:
step 210, obtaining an instruction of the application software APP of the mobile device requesting to execute the device code.
Step 220, according to the instruction of the APP requesting the execution device code, searching a current device code and at least one historical device code corresponding to the mobile device.
Step 230, at least two pieces of device feature information of each mobile device are obtained.
Wherein the device characteristic information includes: resolution, hard disk size, memory size, device name, device model, device brand, device mac address, operating system version, and network type.
Illustratively, the device characteristic information corresponding to the current device code is acquired through the APP and uploaded to the server, and the historical device code and the device characteristic information corresponding to the historical device code are stored in a corresponding database in the server. It can be understood that the more device characteristic information corresponding to the current device code and the historical device code, respectively, is acquired, the more stable the similarity calculation is.
And 240, determining the weight of each piece of equipment characteristic information according to a preset rule.
Wherein, the preset rule comprises:
determining classification information and the number of classification information corresponding to each piece of equipment characteristic information according to each piece of equipment characteristic information;
counting the number of users of the mobile equipment corresponding to the classification information, and determining that the number of the users is the number of the classification information corresponding to 1;
when classification information with the user number of 1 exists, taking the ratio of the number of the classification information with the user number of 1 in the number of all classification information as the initial weight of each piece of equipment feature information;
when the classification information with the number of users being 1 does not exist, taking the reciprocal of the number of the classification information as the initial weight of the equipment feature information;
the ratio of the initial weight of each piece of equipment characteristic information to the sum of the initial weights of each piece of equipment characteristic information is used as the weight of each piece of equipment characteristic information.
The classification information corresponding to the device feature information is, for example, a device brand if the device feature information is "device brand", and there are many device brands in the mobile device, such as "OPPO", "hua shi", "millet", and the like, and these specific device names are the classification information. In all the mobile devices of the server, the classification information corresponding to all the device feature information and the number of classification information may be counted.
For example, determining the weight of each piece of device feature information according to a preset rule may be illustrated by using the following example:
three pieces of device brand, device model and resolution of all mobile devices (such as mobile phones and tablet computers) in the server are counted, three pieces of classification information corresponding to the device brand are 'OPPO', 'Huacheng' and 'millet', two pieces of classification information corresponding to the device model are 'BLN-AL 10' and 'MCE 16', and two pieces of classification information corresponding to the resolution are '720 x 1280' and '1080 x 1920'; assuming that the numbers of users corresponding to "OPPO", "hua" and "millet" are 1, 1 and 3, respectively, the initial weight corresponding to "equipment brand" is (1+1)/(1+1+3) ═ 2/5; assuming that the numbers of users corresponding to "BLN-AL 10" and "MCE 16" are 1 and 3, respectively, the initial weight corresponding to "device model" is 1/4; assuming that the numbers of users are 3 and 6 for "720 x 1280" and "1080 x 1920", respectively, the initial weight corresponding to "resolution" is 1/2. Then the weight of "equipment brand" is 2/5 divided by (2/5+1/4+1/2), which equals 8/23, the weight of "equipment model" is 5/23, and the weight of "resolution" is 10/23.
The method for calculating the weight of the feature information of the equipment is based on the statistics of the feature information of all the mobile equipment in the server, so that the calculated weight is closer to reality.
And step 250, calculating the similarity between the current equipment code and the historical equipment code according to the characteristic information of each equipment and the weight of the characteristic information of each equipment.
The current device code has corresponding device feature information, and the historical device code also has corresponding device feature information, for example, the current device code or the historical device code is "d 812be93caaab 696", and the corresponding device feature information is: the device model number is R11s, the brand name is oppo, the memory size is 2G, and the disk size is 126G.
And taking the device characteristic information and the weight of the device information as factors for measuring the similarity between the current device code and the historical device code. For example, each piece of device feature information may be vectorized, the vectorized device feature information and the weight thereof may be input into a similarity model, and similarity matching may be performed, so as to obtain a metric of similarity of a historical device code with respect to a current device code.
And step 260, taking one of the current devices as an execution device code according to the relationship between the calculation result and the set threshold value.
And step 270, sending the execution device code to the APP of the mobile device for storage.
According to the embodiment of the invention, the device characteristic information and the weight of the device characteristic information are used as similarity measurement factors of the current device code and the historical device code, and the characteristic information of all devices is counted in the server through statistical analysis to obtain the device characteristic information weight which accords with the statistical reality, so that the device characteristic information weight is prevented from being manually set, and the result of similarity calculation is more accordant with the statistical reality.
EXAMPLE III
Fig. 3 is a flowchart of a method for generating device codes according to an embodiment of the present invention, where this embodiment is further optimized based on the above embodiment, and in this embodiment, before taking one of the current device code or the historical device code as an executing device code according to a relationship between the result of the calculation and a set threshold, the method further includes: counting the number of the current equipment codes and the historical equipment codes belonging to the same mobile equipment when different thresholds are set in each mobile equipment, and taking the ratio of the number of the same equipment to the number of all the mobile equipment as the rate of the same mobile equipment; establishing a functional relation graph between the threshold value and the same mobile equipment rate, and establishing a longitudinal parting line of a first threshold value and a second threshold value in the functional relation graph; and the longitudinal dividing line of the first threshold and the second threshold divides the functional relation graph into three regions, and when the three regions meet set distribution conditions, the second threshold is determined to be a set threshold.
Accordingly, as shown in fig. 3, the method comprises the steps of:
step 310, obtaining an instruction of the application software APP of the mobile device requesting to execute the device code.
Step 320, according to the instruction of the APP requesting the execution device code, searching a current device code and at least one historical device code corresponding to the mobile device.
Step 330, counting the number of the current device code and the historical device code belonging to the same mobile device when different thresholds are set in each mobile device, and taking the ratio of the number of the same device to the number of all the mobile devices as the rate of the same mobile device.
The server stores the current device code and the historical device code of each mobile device, and can collect the current device code and the historical device code of each mobile device within a period of time, for example, the mobile device of the APP of the 'payment treasured' opened within 3 months can be collected.
The similarity of the historical device code of each mobile device with respect to the current device code may be calculated according to the similarity calculation method in the above embodiment, and the number of the mobile devices into which each mobile device is dispersed may be determined according to different set thresholds. For example, the mobile device a has 3 historical device codes, and the similarity metric values with respect to the current device code are 45, 55, and 65, respectively, and if the threshold is 40, the mobile device a is 1 device, if the threshold is 50, the mobile device a is dispersed into 2 devices, if the threshold is 60, the mobile device a is dispersed into 3 devices, and if the threshold is 40, the mobile device a is the same device.
Step 340, establishing a functional relation graph between the threshold value and the same mobile equipment rate, and establishing a longitudinal parting line of the first threshold value and the second threshold value in the functional relation graph.
Based on the mass data of the server, a functional relation graph of the same equipment rate corresponding to each threshold value can be established. The first threshold value can be determined according to expert experience, and in order to ensure the same equipment rate of the mobile equipment and the safety of the user of the mobile equipment, the first threshold value is generally set to be 50, and the second threshold value is larger than the first threshold value, namely, in the functional relation graph, the longitudinal dividing line of the second threshold value is on the right side of the dividing line of the first threshold value.
And 350, dividing the functional relation graph into three regions by the longitudinal dividing lines of the first threshold and the second threshold, and determining the second threshold as a set threshold when the three regions meet set distribution conditions.
The distribution condition can be established based on statistical analysis, the first threshold segmentation line and the second threshold segmentation line traverse the functional relationship graph, and the area of three areas segmented by the functional relationship graph is calculated, so that the condition that the two side areas are large and the middle area is small is met, and the second threshold can be determined to be the set threshold. If the above distribution condition does not occur during the calculation, it is possible that the second threshold value is set unreasonably and/or the weight of the device characteristic information is set unreasonably.
And 360, performing similarity calculation on the current equipment code of the mobile equipment and at least one historical equipment code, and taking one of the current equipment as an execution equipment code according to the relation between the calculation result and a set threshold value.
Step 370, sending the execution device code to the APP of the mobile device for storage.
Compared with the prior art in which the set threshold is usually set manually, the method for determining the set threshold provided by the embodiment of the invention is more consistent with the statistical reality. And the execution equipment code determined based on the set value is more accurate, so that the number stealing behavior of the equipment APP is effectively prevented, and the clustering behavior on the equipment APP can be prevented from being dispersed.
Example four
Fig. 4 is a schematic structural diagram of an apparatus for generating a device code according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes an instruction obtaining module 410, a device code searching module 420, an execution device code determining module 430, and a device code storing module 440, where:
an instruction obtaining module 410, configured to obtain an instruction that an application software APP of the mobile device requests to execute a device code;
a device code searching module 420, configured to search, according to the instruction for executing the device code requested by the APP, a current device code and at least one historical device code corresponding to the mobile device code;
an executing device code determining module 430, configured to perform similarity calculation on the current device code and at least one historical device code, and use one of the current device code and the historical device code as an executing device code according to a relationship between a calculation result and a set threshold;
a device code storage module 440, configured to send the execution device code to the APP of the mobile device for storage.
According to the device for generating the equipment code, provided by the embodiment of the invention, the current equipment code and at least one historical equipment code corresponding to the mobile equipment are searched by acquiring the instruction of requesting the execution of the equipment code by the APP of the mobile equipment and according to the instruction of requesting the execution of the equipment code by the APP; performing similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value; and sending the execution equipment code to the APP of the mobile equipment for storage. The embodiment of the invention can realize stable operation of the equipment code on the equipment APP, effectively prevent the number stealing behavior of the equipment APP and avoid the clustering behavior on the equipment APP from being dispersed.
On the basis of the foregoing embodiments, the instruction obtaining module is specifically configured to:
when application software APP of mobile equipment detects that no execution equipment code of operation corresponding to the APP exists in a local storage corresponding to the APP, acquiring an instruction of the APP requesting the execution equipment code.
On the basis of the foregoing embodiments, the executing device code determining module further includes: a similarity operator module, the similarity operator module specifically configured to:
acquiring at least two pieces of equipment characteristic information of each piece of mobile equipment; wherein the device characteristic information includes: resolution, hard disk size, memory size, equipment name, equipment model, equipment brand, equipment mac address, operating system version and network system;
determining the weight of each piece of equipment characteristic information according to a preset rule;
and calculating the similarity between the current equipment code and the historical equipment code according to the equipment characteristic information and the weight of the equipment characteristic information.
Further, the preset rule includes:
determining classification information and the number of classification information corresponding to each piece of equipment characteristic information according to each piece of equipment characteristic information;
counting the number of users of the mobile equipment corresponding to the classification information, and determining that the number of the users is the number of the classification information corresponding to 1;
when classification information with the user number of 1 exists, taking the ratio of the number of the classification information with the user number of 1 in the number of all classification information as the initial weight of each piece of equipment feature information;
when the classification information with the number of users being 1 does not exist, taking the reciprocal of the number of the classification information as the initial weight of the equipment feature information;
the ratio of the initial weight of each piece of equipment characteristic information to the sum of the initial weights of each piece of equipment characteristic information is used as the weight of each piece of equipment characteristic information.
On the basis of the foregoing embodiments, the executing device code determining module further includes: a set threshold determination submodule, the set threshold determination submodule being specifically configured to:
counting the number of the current equipment codes and the number of the historical equipment codes belonging to the same mobile equipment when different thresholds are set in each mobile equipment before one of the current equipment codes or the historical equipment codes is taken as an execution equipment code according to the relationship between the calculation result and the set threshold, and taking the ratio of the number of the same equipment to the number of all the mobile equipment as the rate of the same mobile equipment;
establishing a functional relation graph between the threshold value and the same mobile equipment rate, and establishing a longitudinal parting line of a first threshold value and a second threshold value in the functional relation graph;
and the longitudinal dividing line of the first threshold and the second threshold divides the functional relation graph into three regions, and when the three regions meet set distribution conditions, the second threshold is determined to be a set threshold.
On the basis of the foregoing embodiments, the execution device code determination module is specifically configured to:
if the number of the found historical device codes is one, similarity calculation is carried out on the current device code and the historical device codes, and a metric value of the similarity calculation is used as a calculation result;
if the metric value is greater than or equal to the set threshold value, taking the historical device code as the execution device code;
and if the metric value is smaller than the set threshold value, taking the current equipment code as an execution equipment code.
On the basis of the foregoing embodiments, the execution device code determining module is further specifically configured to:
if the number of the searched historical device codes is at least two, similarity calculation is respectively carried out on the current device code and the at least two historical device codes, and at least two metric values of the similarity calculation are used as calculation results;
if the maximum metric value in the metric values is larger than or equal to the set threshold value, taking the historical equipment code corresponding to the maximum metric value as an execution equipment code;
and if the maximum metric value is smaller than the set threshold value, taking the current equipment code as an execution equipment code.
The device for generating the device code, provided by the embodiment of the invention, can execute the method for generating the device code, provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention, as shown in fig. 5, the apparatus includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of processors 50 in the device may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the apparatus/may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 5.
The memory 51 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the theme update method in the embodiment of the present invention (for example, the instruction obtaining module 410, the device code searching module 420, the execution device code determining module 430, and the device code storing module 440 in the device for generating device codes). The processor 50 executes various functional applications of the device/terminal/server and data processing by executing software programs, instructions and modules stored in the memory 51, that is, implements the theme update method described above.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to the device/terminal/server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the device/terminal/server. The output device 53 may include a display device such as a display screen.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a search method, the method including:
acquiring an instruction of an application software APP of the mobile equipment for requesting to execute an equipment code;
according to the instruction of the APP for requesting the execution of the equipment codes, searching a current equipment code and at least one historical equipment code corresponding to the mobile equipment;
carrying out similarity calculation on the current equipment code and at least one historical equipment code; according to the relation between the calculation result and a set threshold value, taking one of the current equipment code or the historical equipment code as an execution equipment code;
and sending the execution equipment code to the APP of the mobile equipment for storage.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the search method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the apparatus for generating device code, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method of device code generation, comprising:
acquiring an instruction of an application software APP of the mobile equipment for requesting to execute an equipment code;
according to the instruction of the APP for requesting the execution of the equipment codes, searching a current equipment code and at least one historical equipment code corresponding to the mobile equipment;
carrying out similarity calculation on the current equipment code and at least one historical equipment code; according to the relation between the calculation result and a set threshold value, taking one of the current equipment code or the historical equipment code as an execution equipment code;
sending the execution equipment code to the APP of the mobile equipment for storage;
before one of the current device code or the historical device code is taken as an executing device code according to the relationship between the calculation result and the set threshold, the method further comprises the following steps:
counting the number of the current equipment codes and the historical equipment codes belonging to the same mobile equipment when different thresholds are set in each mobile equipment, and taking the ratio of the number of the same equipment to the number of all the mobile equipment as the rate of the same mobile equipment;
establishing a functional relation graph between the threshold value and the same mobile equipment rate, and establishing a longitudinal parting line of a first threshold value and a second threshold value in the functional relation graph;
and the longitudinal dividing line of the first threshold and the second threshold divides the functional relation graph into three regions, and when the three regions meet set distribution conditions, the second threshold is determined to be a set threshold.
2. The method of claim 1, wherein obtaining the instruction of the APP of the mobile terminal requesting to execute the device code comprises:
when application software APP of mobile equipment detects that no execution equipment code of operation corresponding to the APP exists in a local storage corresponding to the APP, acquiring an instruction of the APP requesting the execution equipment code.
3. The method of claim 1, wherein performing similarity calculation between the current device code and the historical device code comprises:
acquiring at least two pieces of equipment characteristic information of each piece of mobile equipment;
wherein the device characteristic information includes: resolution, hard disk size, memory size, equipment name, equipment model, equipment brand, equipment mac address, operating system version and network system;
determining the weight of each piece of equipment characteristic information according to a preset rule;
and calculating the similarity between the current equipment code and the historical equipment code according to the equipment characteristic information and the weight of the equipment characteristic information.
4. The method of claim 3, wherein the preset rules comprise:
determining classification information and the number of classification information corresponding to each piece of equipment characteristic information according to each piece of equipment characteristic information;
counting the number of users of the mobile equipment corresponding to the classification information, and determining that the number of the users is the number of the classification information corresponding to 1;
when classification information with the user number of 1 exists, taking the ratio of the number of the classification information with the user number of 1 in the number of all classification information as the initial weight of each piece of equipment feature information;
when the classification information with the number of users being 1 does not exist, taking the reciprocal of the number of the classification information as the initial weight of the equipment feature information;
the ratio of the initial weight of each piece of equipment characteristic information to the sum of the initial weights of each piece of equipment characteristic information is used as the weight of each piece of equipment characteristic information.
5. The method of claim 1, wherein performing similarity calculation between the current device code and at least one historical device code, and using one of the current device code and the historical device code as an executing device code according to a relationship between a result of the calculation and a set threshold comprises:
if the number of the found historical device codes is one, similarity calculation is carried out on the current device code and the historical device codes, and a metric value of the similarity calculation is used as a calculation result;
if the metric value is greater than or equal to the set threshold value, taking the historical device code as the execution device code;
and if the metric value is smaller than the set threshold value, taking the current equipment code as an execution equipment code.
6. The method of claim 1, wherein the similarity calculation is performed between the current device code and at least one historical device code, and one of the current device code and the historical device code is used as an executing device code according to a relationship between a result of the calculation and a set threshold, further comprising:
if the number of the searched historical device codes is at least two, similarity calculation is respectively carried out on the current device code and the at least two historical device codes, and at least two metric values of the similarity calculation are used as calculation results;
if the maximum metric value in the metric values is larger than or equal to the set threshold value, taking the historical equipment code corresponding to the maximum metric value as an execution equipment code;
and if the maximum metric value is smaller than the set threshold value, taking the current equipment code as an execution equipment code.
7. An apparatus for device code generation, comprising;
the instruction acquisition module is used for acquiring an instruction of an application software APP of the mobile equipment for requesting to execute equipment codes;
the device code searching module is used for searching a current device code and at least one historical device code corresponding to the mobile device code according to the instruction of executing the device code of the APP request;
the execution equipment code determining module is used for carrying out similarity calculation on the current equipment code and at least one historical equipment code, and taking one of the current equipment code or the historical equipment code as an execution equipment code according to the relation between the calculation result and a set threshold value;
the device code storage module is used for sending the execution device code to the APP of the mobile device for storage;
the executing device code determining module further includes: a set threshold determination submodule, the set threshold determination submodule being specifically configured to:
counting the number of the current equipment codes and the number of the historical equipment codes belonging to the same mobile equipment when different thresholds are set in each mobile equipment before one of the current equipment codes or the historical equipment codes is taken as an execution equipment code according to the relationship between the calculation result and the set threshold, and taking the ratio of the number of the same equipment to the number of all the mobile equipment as the rate of the same mobile equipment;
establishing a functional relation graph between the threshold value and the same mobile equipment rate, and establishing a longitudinal parting line of a first threshold value and a second threshold value in the functional relation graph;
and the longitudinal dividing line of the first threshold and the second threshold divides the functional relation graph into three regions, and when the three regions meet set distribution conditions, the second threshold is determined to be a set threshold.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of device code generation as claimed in any one of claims 1 to 6 when executing the program.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of device code generation according to any one of claims 1 to 6.
CN201810697876.4A 2018-06-29 2018-06-29 Method, device, equipment and storage medium for generating equipment code Active CN108881513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810697876.4A CN108881513B (en) 2018-06-29 2018-06-29 Method, device, equipment and storage medium for generating equipment code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810697876.4A CN108881513B (en) 2018-06-29 2018-06-29 Method, device, equipment and storage medium for generating equipment code

Publications (2)

Publication Number Publication Date
CN108881513A CN108881513A (en) 2018-11-23
CN108881513B true CN108881513B (en) 2021-07-27

Family

ID=64297292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810697876.4A Active CN108881513B (en) 2018-06-29 2018-06-29 Method, device, equipment and storage medium for generating equipment code

Country Status (1)

Country Link
CN (1) CN108881513B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995576A (en) * 2019-02-13 2019-07-09 平安科技(深圳)有限公司 Recognition methods, device and the storage medium of equipment for surfing the net, computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187237A (en) * 2015-08-12 2015-12-23 百度在线网络技术(北京)有限公司 Method and device for searching associated user identifications
CN106453437A (en) * 2016-12-22 2017-02-22 中国银联股份有限公司 Equipment identification code acquisition method and device
CN107908666A (en) * 2017-10-23 2018-04-13 北京京东尚科信息技术有限公司 A kind of method and apparatus of identification equipment mark

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9805099B2 (en) * 2014-10-30 2017-10-31 The Johns Hopkins University Apparatus and method for efficient identification of code similarity

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187237A (en) * 2015-08-12 2015-12-23 百度在线网络技术(北京)有限公司 Method and device for searching associated user identifications
CN106453437A (en) * 2016-12-22 2017-02-22 中国银联股份有限公司 Equipment identification code acquisition method and device
CN107908666A (en) * 2017-10-23 2018-04-13 北京京东尚科信息技术有限公司 A kind of method and apparatus of identification equipment mark

Also Published As

Publication number Publication date
CN108881513A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN110517097B (en) Method, device, equipment and storage medium for identifying abnormal users
CN111428881A (en) Recognition model training method, device, equipment and readable storage medium
US10621326B2 (en) Identity authentication method, server, and storage medium
CN109495467B (en) Method and device for updating interception rule and computer readable storage medium
CN106650350B (en) Identity authentication method and system
CN107657156B (en) User identity authentication method and device based on user operation habit and touch area
EP3719729A1 (en) Location information processing method and apparatus
CN108521405B (en) Risk control method and device and storage medium
CN110737881B (en) Fingerprint verification method and device for intelligent equipment
CN110516471B (en) Product promotion method based on information security and related equipment
CN111343048B (en) Pressure testing method and device, computer device and storage medium
CN109547426B (en) Service response method and server
CN103488922A (en) Method and equipment for providing verification code
WO2019148815A1 (en) Method and apparatus for identity authentication, server and computer readable medium
WO2020025056A1 (en) Method, device, system, and mobile terminal for security authorization
CN108881513B (en) Method, device, equipment and storage medium for generating equipment code
CN111541692B (en) Identity verification method, system, device and equipment
CN114268487A (en) Authority control method and device based on industrial identification node
CN106817296B (en) Information recommendation test method and device and electronic equipment
CN113656497A (en) Data verification method and device based on block chain
CN113779536A (en) User access method, system, electronic device and medium
CN109040056B (en) User verification method based on server
CN111414191A (en) Gray scale publishing method and device for small program
CN111970269B (en) Server access behavior identification method and device and server
CN112685706A (en) Request authentication method and related equipment

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