CN108460271B - Terminal identification method and device - Google Patents

Terminal identification method and device Download PDF

Info

Publication number
CN108460271B
CN108460271B CN201611131744.2A CN201611131744A CN108460271B CN 108460271 B CN108460271 B CN 108460271B CN 201611131744 A CN201611131744 A CN 201611131744A CN 108460271 B CN108460271 B CN 108460271B
Authority
CN
China
Prior art keywords
terminal
identification
serial port
imei
storage position
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
CN201611131744.2A
Other languages
Chinese (zh)
Other versions
CN108460271A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611131744.2A priority Critical patent/CN108460271B/en
Publication of CN108460271A publication Critical patent/CN108460271A/en
Application granted granted Critical
Publication of CN108460271B publication Critical patent/CN108460271B/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/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Power Engineering (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a terminal identification method and device. Wherein, the method comprises the following steps: acquiring terminal equipment category information of a terminal to be identified, which is connected with identification equipment; searching identification storage position indicating information matched with the terminal according to the terminal equipment category information, wherein the identification storage position indicating information is used for indicating the storage position of a terminal identification matched with the terminal in the terminal; and acquiring the terminal identification mark of the terminal from the storage position indicated by the searched mark storage position indication information so that the identification equipment identifies the terminal through the terminal identification mark. The invention solves the technical problem of low terminal identification accuracy rate when the terminal cannot be normally started in the prior art.

Description

Terminal identification method and device
Technical Field
The invention relates to the field of computers, in particular to a terminal identification method and device.
Background
At present, many terminal users often cannot update and upgrade an operating system and application software operated by a terminal in time for various reasons, so that various problems occur in the use process of the terminal due to the fact that firmware and software are not synchronously adapted in the operation process of the terminal; in addition, many end users also desire to be able to replace or customize the operating system used. In view of these needs, various flash tools and third-party customized Read-Only memories (ROMs) have come into existence.
However, in the process of flashing a terminal based on a Personal Computer (PC), a third-party application installed on the terminal is often required to be used, that is, data interaction is performed with the third-party application installed on the terminal, so that a terminal identification mark corresponding to the terminal can be obtained to identify the terminal to be processed. However, in the above process, once the terminal cannot be normally powered on, the PC cannot acquire the terminal identification of the terminal, so that the to-be-processed terminal cannot be correctly identified. That is to say, when the terminal cannot be normally started, it cannot be guaranteed that the terminal identification identifier of the terminal is successfully acquired, and therefore the problem that the terminal cannot be accurately identified is caused.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a terminal identification method and a terminal identification device, which at least solve the technical problem of low terminal identification accuracy rate when a terminal cannot be normally started in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a terminal identification method, including: acquiring terminal equipment category information of a terminal to be identified, which is connected with identification equipment; searching identification storage position indication information matched with the terminal according to the terminal equipment category information, wherein the identification storage position indication information is used for indicating the storage position of a terminal identification matched with the terminal in the terminal; and acquiring the terminal identification identifier of the terminal from the storage position indicated by the identifier storage position indication information, so that the identification device identifies the terminal through the terminal identification identifier.
According to another aspect of the embodiments of the present invention, there is also provided a terminal identification apparatus, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the terminal equipment category information of a terminal to be identified, which is connected with the identification equipment; a searching unit, configured to search, according to the terminal device category information, identifier storage location indication information that matches the terminal, where the identifier storage location indication information is used to indicate a storage location of a terminal identification identifier that matches the terminal in the terminal; and an identification unit, configured to acquire the terminal identification identifier of the terminal from the storage location indicated by the identifier storage location indication information, so that the identification device identifies the terminal through the terminal identification identifier.
In the embodiment of the invention, after the terminal equipment category information of the terminal to be identified is acquired, the identification storage position indication information for indicating the storage position of the terminal identification in the terminal is searched according to the terminal equipment category information, so that the terminal identification stored in the terminal is directly acquired by using the identification storage position indication information, and the terminal is identified by using the terminal identification, thereby overcoming the problem of reduced terminal identification accuracy caused by the fact that the terminal identification cannot be successfully acquired when the terminal is abnormal and cannot be normally started in the related technology, and realizing the effect of improving the terminal identification accuracy. In addition, under the condition that the terminal identification mark of the terminal is successfully acquired and the terminal is accurately identified, the effect of improving the repairing efficiency of the abnormal terminal is further realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic application environment diagram of an alternative terminal identification method according to an embodiment of the present invention;
fig. 2 is a flow chart of an alternative terminal identification method according to an embodiment of the present invention;
fig. 3 is a flow chart of another alternative terminal identification method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an alternative terminal identification device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an alternative terminal identification device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In the embodiment of the invention, the embodiment of the terminal identification method is provided. As an alternative implementation, the terminal identification method may be but is not limited to be applied in the application environment shown in fig. 1, where the identification device 102 may establish a connection with the terminal 106 to be identified through the network 104, and obtain the terminal device category information of the terminal 106 to be identified through the network 104; and then, searching for identifier storage location information matched with the terminal 106 according to the terminal device category information, wherein the identifier storage location information is used for indicating the storage location of the terminal identification identifier in the terminal 106. Further, the terminal identification of the terminal 106 is obtained according to the above identification storage location indication information, and the terminal 106 is identified by using the terminal identification. The number of the terminals to be identified may include, but is not limited to, one or more terminals. The above application scenario is only an example, and this is not limited in this embodiment.
In this embodiment, after the terminal device category information of the terminal to be identified is acquired, the identifier storage location indicating information for indicating the storage location of the terminal identification identifier in the terminal is searched according to the terminal device category information, so that the terminal identification identifier stored in the terminal is directly acquired by using the identifier storage location indicating information, and further, the terminal is identified by using the terminal identification identifier, thereby overcoming the problem that the terminal identification accuracy is reduced due to the fact that interaction cannot be performed through a third-party application client to acquire the terminal identification identifier when the terminal is abnormal and cannot be normally started in the related art. In addition, under the condition that the terminal identification mark of the terminal is successfully acquired and the terminal is accurately identified, the repairing efficiency of the abnormal terminal is further improved.
Optionally, in this embodiment, the terminal may include, but is not limited to, at least one of the following: mobile phones, tablet computers, notebook computers and other mobile hardware devices. The identification device may include, but is not limited to, at least one of: tablet computers, notebook computers, PCs, and the like. Optionally, in this embodiment, the network may include but is not limited to: wired networks such as wide area networks, metropolitan area networks, local area networks. The above is only an example, and this is not limited in this embodiment.
According to an embodiment of the present invention, there is provided a terminal identification method, as shown in fig. 2, the method including:
s202, acquiring the terminal equipment category information of the terminal to be identified connected with the identification equipment;
s204, searching identification storage position indicating information matched with the terminal according to the terminal equipment category information, wherein the identification storage position indicating information is used for indicating the storage position of a terminal identification matched with the terminal in the terminal;
s206, acquiring the terminal identification mark of the terminal from the storage position indicated by the searched mark storage position indication information, so that the identification device identifies the terminal through the terminal identification mark.
Alternatively, in this embodiment, the terminal identification method may be applied, but not limited to, to an identification device connected to a terminal to be identified, such as a process in which the identification device identifies the terminal in a flashing and repairing state, where the identification device may be a Personal Computer (PC). It should be noted that the flashing means that some languages, pictures, ring tones, software or operating systems originally existing in the terminal are changed or replaced by a certain method. The terminal which is abnormal and cannot be normally started is accurately identified by the acquired terminal identification mark, so that the terminal which is abnormal and cannot be normally started is rapidly repaired, and the effect of improving the repairing efficiency of the terminal is achieved. The terminal can run an Android operating system but is not limited to the Android operating system. The above is only an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the terminal device category information may include, but is not limited to: the device model of the terminal; the terminal identification may include, but is not limited to: international Mobile Equipment Identity (IMEI) for short.
Specifically, in this embodiment, after the terminal device category information of the terminal to be identified is acquired, the identifier storage location indicating information for indicating the storage location of the terminal identification identifier in the terminal is searched according to the terminal device category information, so that the terminal identification identifier stored in the terminal is directly acquired by using the identifier storage location indicating information, and further the terminal is identified by using the terminal identification identifier, thereby overcoming the problem that the terminal identification accuracy is reduced due to the fact that the terminal identification identifier cannot be successfully acquired when the terminal is abnormal and cannot be normally started in the related art, and achieving the effect of improving the terminal identification accuracy. In addition, under the condition that the terminal identification mark of the terminal is successfully acquired and the terminal is accurately identified, the repairing efficiency of the abnormal terminal is further improved.
It should be noted that, a common method in the related art is to temporarily generate or allocate a temporary identification to the terminal to identify the terminal, for example, a temporary usage Identifier, such as a Globally Unique Identifier (GUID), is generated or allocated to the terminal and written into the terminal, so that the purpose of identifying the terminal by using the temporary identification GUID is achieved. However, if the writing position of the temporary identifier is the terminal memory, the temporary identifier will be cleared after the flashing operation is performed; if the written position is the SD card, the mapping path of the temporary identification identifier cannot be found or read without permission due to the difference of the ROM, and the temporary identification identifier corresponding to the terminal cannot be successfully acquired to execute the identification process.
That is to say, in the related art, in a manner of identifying the terminal by the temporary identifier, when the terminal is abnormally unable to be powered on, it is unable to ensure that the temporary identifier can be successfully acquired, and thus the problem that the terminal cannot be accurately and quickly identified is caused. In addition, since the temporary identifier is not universal, when the terminal is identified by using the temporary identifier, the interactive operation of the terminal cannot be accurately counted. For example, after the terminal is successfully booted, the terminal will carry the temporary identification GUID for identifying the terminal in the reported booted result, and the application client installed in the terminal will carry the IMEI code for identifying the terminal in the reported booted installation result, and report different identification for statistics, which will result in inconsistent statistical results, thereby resulting in a problem of low accuracy of the statistical results. In contrast, in the embodiment, the unique terminal identification IMEI code stored in the terminal is directly acquired according to the found identification storage location indication information, so that the success rate and the accuracy rate of acquiring the terminal identification are ensured, and the identification accuracy rate of the terminal is further improved.
Optionally, in this embodiment, the searching for the identifier storage location indication information matching the terminal identification identifier of the terminal according to the terminal device category information may include, but is not limited to: and searching the identification storage position indication information matched with the terminal equipment category information in the pre-stored mapping relation.
As an optional implementation manner, when the identifier storage location indicating information matched with the category information of the terminal device is found, but not limited to, the terminal identification identifier may be directly obtained according to the storage address indicated by the found identifier storage location indicating information, so as to quickly locate the terminal identification identifier, and further, quickly and accurately identify the terminal connected to the identification device.
As another optional implementation, when the storage location indication information of the terminal identification identifier matching with the terminal device category information is not found, the serial port identifier of the serial port of the target terminal for calling the terminal identification identifier of the terminal may be obtained by, but not limited to, traversing output data of each terminal serial port of the terminal.
Optionally, in this embodiment, the identifier storage location indication information may include, but is not limited to, at least one of the following: the terminal identification mark is in a database path stored in the terminal, and a serial port mark of a target terminal serial port used for calling the terminal identification mark in the terminal. The indication information of the identifier storage location may be used alone or in combination, which is not limited in this embodiment. That is to say, the at least one storage address indicated by the identification storage location indication information may be used to obtain the terminal identification, and as an optional implementation manner, the priority of the manner of using the database path stored in the terminal by the terminal identification is higher than the manner of using the serial port identification of the serial port of the target terminal used for calling the terminal identification in the terminal. The above is only an example, and this is not limited in this embodiment.
It should be noted that, before the terminal device category information of the terminal to be identified is obtained, the stored mapping relationship may be obtained by counting the terminal device category information of different terminal devices and the corresponding relationship between the storage locations of the terminal identification identifiers corresponding to the terminal device category information in the terminal device. That is, the mapping relationship between the terminal device category information and the corresponding identification storage location indication information is obtained through big data analysis adaptation. For example, the mapping relationship may be as shown in table 1:
TABLE1
Serial number Terminal device category information Identifying storage location information
1 A1 L1
2 A2 L2
3 B1 L3
That is, by analyzing and counting the storage locations of the terminal identification marks indicated by different types of terminal device class information (such as the device model of the terminal), the mark storage location indication information indicating the storage locations and the corresponding terminal device class information are stored in the background server in the form of key value pairs. For example, taking the first row in table1 as an example, through analysis and statistics, the terminal identification identifier IMEI code of the terminal indicated by the terminal equipment category information a1 can be obtained through the identifier storage location information L1, and therefore, the above contents are stored as shown in table1, so that in the case that the terminal equipment category information of the terminal to be identified is obtained next time as a1, the identifier storage location indication information L1 of the terminal can be searched in the mapping relationship by using a1, so as to obtain the terminal identification identifier of the terminal, such as IMEI-1, according to the indication of the identifier storage location indication information L1.
It should be noted that, in this embodiment, because the terminal synchronously writes part of the hardware information (including the IMEI code) of the terminal into the database of the terminal when the system is first powered on, the identification device connected to the terminal can directly obtain the terminal identification identifier IMEI for uniquely identifying the terminal according to the indicated database path in the database; in addition, since the baseband part of the terminal can be packaged into a serial device, the identification device connected with the terminal can also obtain the terminal identification IMEI for uniquely identifying the terminal from the terminal by communicating with the serial device.
Optionally, in this embodiment, the manner of obtaining the terminal device category information of the terminal to be identified may be, but is not limited to: 1) acquiring through an input device in the identification equipment, such as an input box of a display interface; 2) and directly reading the bottom data of the terminal. The above is only an example, and this is not limited in this embodiment.
Specifically, referring to the following example, as shown in fig. 3, the identification device obtains the terminal device category information of the connected terminal to be identified in step S302, and searches for the identifier storage location indication information matching the terminal identification identifier according to the terminal device category information in step S304. If the identification storage position indication information matched with the terminal device category information is found in step S306-1, wherein if the storage position indicated by the found identification storage position indication information is a database, step S308-1 is executed, and a terminal identification identifier is obtained according to the indicated database path; if the storage position indicated by the found identification storage position indication information is the serial port device, executing step S308-2, and acquiring a terminal identification according to the serial port identification of the indicated target terminal serial port; further, if the identification storage position indication information matched with the terminal device category information is not found in step S306-2, step S308-3 is executed, the output data of each terminal serial port of the terminal is traversed to obtain the serial port identification of the target terminal serial port for calling the terminal identification, and step S310 is executed to obtain the terminal identification according to the serial port identification of the target terminal serial port.
According to the embodiment provided by the application, after the terminal equipment category information of the terminal to be identified is acquired, the identification storage position indicating information used for indicating the storage position of the terminal identification mark in the terminal is searched according to the terminal equipment category information, so that the terminal identification mark stored in the terminal is directly acquired by utilizing the identification storage position indicating information, and the terminal is identified by utilizing the terminal identification mark, and the problem that the terminal identification accuracy is reduced due to the fact that the terminal identification mark cannot be successfully acquired when the terminal is abnormal and cannot be normally started in the related technology is solved.
As an optional scheme, searching for the identifier storage location indication information matched with the terminal according to the terminal device category information includes:
s1, searching the identification storage position indication information matched with the terminal device category information in the pre-stored mapping relation, wherein the identification storage position indication information comprises at least one of the following information: the terminal identification mark is stored in a database path of the terminal and a serial port mark of a target terminal serial port in the terminal, wherein the serial port mark is used for calling the terminal identification mark;
and S2, when the identification storage position indication information matched with the terminal equipment type information is found, acquiring the terminal identification according to the found identification storage position indication information.
Optionally, in this embodiment, as an optional implementation manner, the obtaining the terminal identification identifier of the terminal from the storage location indicated by the searched identifier storage location indication information includes:
s21, when the storage position indicated by the identification storage position indication information is found to be a database according to the terminal equipment type information, the database is pulled from the terminal for mapping storage;
and S22, acquiring the terminal identification mark from the database in mapping storage according to the database path indicated by the mark storage position indication information.
Optionally, in this embodiment, the database path may include, but is not limited to, the following:
1) a database name (settings _ db) for pulling the database from the terminal; if the equipment model is not configured or the value is null, the terminal of the equipment model is considered to be incapable of searching the IMEI by using the database;
2) a database table name (table _ name) for searching the database table from the database;
3) database table field name (field _ name) for finding the IMEI from the database table.
In this embodiment, the identification device connected to the terminal to be identified performs mapping storage by pulling the database into the identification device, so that the storage location of the terminal identification identifier of the terminal is quickly located in the identification device according to the indicated database path, and the success rate of obtaining the terminal identification identifier is ensured.
Specifically, the following example may be combined, and assuming that the identification device takes a PC as an example, the execution steps may be as follows:
suppose that the database name in the database path synchronously written into the terminal hardware by the terminal when the system is started is db1, the database name is table1, and the database field name is field 1. Further, assuming that the PC obtains the device model a1 of the terminal to be identified, a search request is sent to the background server according to the device model a1 of the terminal, if the returned identifier storage location indication information is a database path, for example, the identifier storage location indication information L1 includes the database path, the PC will pull the database in the terminal from the terminal to the PC after executing the adb command "adb pull db1 db 2", and name the database on the PC by db 2; further, by executing the sql statement "select field1 from table 1", the PC will obtain the terminal identification IMEI of the terminal from the database db2 pulled from the PC as indicated by the path information (database table name table1, database table field 1).
Optionally, in this embodiment, as another optional implementation manner, the obtaining of the terminal identification identifier of the terminal from the storage location indicated by the searched identifier storage location indication information includes:
and S21, when the storage position indicated by the identification storage position indication information is found to be a serial device according to the terminal device type information, communicating with a target terminal serial port to obtain a terminal identification of the terminal, wherein the identification storage position indication information is used for indicating the serial port identification of the target terminal serial port, and the target terminal serial port is used for calling the terminal identification.
Optionally, in this embodiment, the target terminal serial port may be but is not limited to: the serial interface on the terminal is mainly used for serial bitwise data transmission, wherein if the serial interface is not configured or is empty, the terminal identified by the terminal equipment type information (such as the terminal equipment model) is not considered to have a storage mapping relationship.
Specifically, the following example may be combined, and assuming that the identification device takes a PC as an example, the execution steps may be as follows:
the terminal is assumed to comprise a plurality of serial interfaces, wherein the serial port of the target terminal serial port for calling the terminal identification is serial _ port-1. Further, assuming that the PC obtains the device model B1 of the terminal to be identified, it sends a search request to the background server according to the device model B1 of the terminal, and if the returned identifier storage location indication information is a serial identifier (also called serial number), for example, the identifier storage location indication information L3 includes the serial number, for example, the serial number serial _ port-1, it may directly send an "ATI" command to the serial port of the target terminal identified by the serial number serial _ port-1, and may analyze and obtain the terminal identification identifier IMEI of the terminal.
According to the embodiment provided by the application, the terminal identification mark of the terminal can be flexibly and accurately positioned by using different means through the indication mode corresponding to different mark storage position indication information, so that the success rate of acquiring the terminal identification mark is ensured.
As an optional scheme, after searching for the identifier storage location indication information matched with the terminal device category information in the pre-stored mapping relationship, the method includes:
and S1, traversing output data of each terminal serial port of the terminal to obtain the serial port identification of the target terminal serial port for calling the terminal identification in the terminal when the identification storage position indication information matched with the terminal device category information is not found.
Optionally, in this embodiment, the output data of each serial port of the traversal terminal includes:
s1, repeating the following steps until the serial port identification of the target terminal serial port for calling the terminal identification is obtained:
s11, acquiring a current terminal serial port;
s12, redirecting output data of the current terminal serial port to output to a target file under a preset path;
s13, judging whether a terminal identification is obtained from the target file;
s14, when the terminal identification mark is obtained from the target file, the serial port mark of the current terminal serial port is used as the serial port mark of the target terminal serial port for calling the terminal identification mark;
and S15, when the terminal identification mark is not obtained from the target file, obtaining the next terminal serial port as the current terminal serial port.
The description is made with specific reference to the following examples: when the indication information of any identification storage position is not found, the PC executes an adb command 'adb shells ls/dev' and analyzes all serial port list information of the terminal; selecting a serial port (assuming that the serial port name is serial _ port-1), executing an adb command 'adb shell serial _ port1 >/sdcard/imei.txt', and redirecting output data of the serial port (assuming that the serial port name is serial _ port-1) to a target file _ 1; in addition, an adb command pipeline execution command ' adb shell echo-e ' ATI \ r \ n ' is restarted; and executing an adb command' adb shell cat/sdcard/IMEI. If the acquisition or the analysis fails, a serial port can be selected from the serial port list information again to execute the steps repeatedly until the identification of the target terminal serial port for calling the terminal identification of the terminal is acquired.
By the embodiment provided by the application, when the indication information of the identifier storage position is not acquired, the output data of the serial port of the terminal can be sequentially redirected to the target file under the preset path, so that whether the corresponding serial port is the target terminal serial port for calling the terminal identifier of the terminal is determined by judging whether the specified file comprises the terminal identifier.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode 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 is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is also provided a terminal identification apparatus for implementing the terminal identification method, as shown in fig. 4, the apparatus includes:
1) an obtaining unit 402, configured to obtain terminal device category information of a terminal to be identified, which is connected to an identification device;
2) a searching unit 404, configured to search, according to the terminal device category information, identifier storage location indication information matched with the terminal, where the identifier storage location indication information is used to indicate a storage location of a terminal identification identifier matched with the terminal in the terminal;
3) and an identifying unit 406, configured to obtain a terminal identification identifier of the terminal from the storage location indicated by the searched identifier storage location indication information, so that the identifying device identifies the terminal through the terminal identification identifier.
Alternatively, in this embodiment, the terminal identification apparatus may be, but not limited to, an identification device connected to a terminal to be identified, for example, a Personal Computer (PC) used in the process of identifying the terminal in the flashing and repairing state by the identification device. It should be noted that the flashing means that some languages, pictures, ring tones, software or operating systems originally existing in the terminal are changed or replaced by a certain method. The terminal which is abnormal and cannot be normally started is accurately identified by the acquired terminal identification mark, so that the terminal which is abnormal and cannot be normally started is rapidly repaired, and the effect of improving the repairing efficiency of the terminal is achieved. The terminal can run an Android operating system but is not limited to the Android operating system. The above is only an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the terminal device category information may include, but is not limited to: the device model of the terminal; the terminal identification may include, but is not limited to: international Mobile Equipment Identity (IMEI) for short.
Specifically, in this embodiment, after the terminal device category information of the terminal to be identified is acquired, the identifier storage location indicating information for indicating the storage location of the terminal identification identifier in the terminal is searched according to the terminal device category information, so that the terminal identification identifier stored in the terminal is directly acquired by using the identifier storage location indicating information, and further the terminal is identified by using the terminal identification identifier, thereby overcoming the problem that the terminal identification accuracy is reduced due to the fact that the terminal identification identifier cannot be successfully acquired when the terminal is abnormal and cannot be normally started in the related art, and achieving the effect of improving the terminal identification accuracy. In addition, under the condition that the terminal identification mark of the terminal is successfully acquired and the terminal is accurately identified, the repairing efficiency of the abnormal terminal is further improved.
It should be noted that, a common method in the related art is to temporarily generate or allocate a temporary identification to the terminal to identify the terminal, for example, a temporary usage Identifier, such as a Globally Unique Identifier (GUID), is generated or allocated to the terminal and written into the terminal, so that the purpose of identifying the terminal by using the temporary identification GUID is achieved. However, if the writing position of the temporary identifier is the terminal memory, the temporary identifier will be cleared after the flashing operation is performed; if the written position is the SD card, the mapping path of the temporary identification identifier cannot be found or read without permission due to the difference of the ROM, and the temporary identification identifier corresponding to the terminal cannot be successfully acquired to execute the identification process.
That is to say, in the related art, in a manner of identifying the terminal by the temporary identifier, when the terminal is abnormally unable to be powered on, it is unable to ensure that the temporary identifier can be successfully acquired, and thus the problem that the terminal cannot be accurately and quickly identified is caused. In addition, since the temporary identifier is not universal, when the terminal is identified by using the temporary identifier, the interactive operation of the terminal cannot be accurately counted. For example, after the terminal is successfully booted, the terminal will carry the temporary identification GUID for identifying the terminal in the reported booted result, and the application client installed in the terminal will carry the IMEI code for identifying the terminal in the reported booted installation result, and report different identification for statistics, which will result in inconsistent statistical results, thereby resulting in a problem of low accuracy of the statistical results. In contrast, in the embodiment, the unique terminal identification IMEI code stored in the terminal is directly acquired according to the found identification storage location indication information, so that the success rate and the accuracy rate of acquiring the terminal identification are ensured, and the identification accuracy rate of the terminal is further improved.
Optionally, in this embodiment, the searching for the identifier storage location indication information matching the terminal identification identifier of the terminal according to the terminal device category information may include, but is not limited to: and searching the identification storage position indication information matched with the terminal equipment category information in the pre-stored mapping relation.
As an optional implementation manner, when the identifier storage location indicating information matched with the category information of the terminal device is found, but not limited to, the terminal identification identifier may be directly obtained according to the storage address indicated by the found identifier storage location indicating information, so as to quickly locate the terminal identification identifier, and further, quickly and accurately identify the terminal connected to the identification device.
As another optional implementation, when the storage location indication information of the terminal identification identifier matching with the terminal device category information is not found, the serial port identifier of the serial port of the target terminal for calling the terminal identification identifier of the terminal may be obtained by, but not limited to, traversing output data of each terminal serial port of the terminal.
Optionally, in this embodiment, the identifier storage location indication information may include, but is not limited to, at least one of the following: the terminal identification mark is in a database path stored in the terminal, and a serial port mark of a target terminal serial port used for calling the terminal identification mark in the terminal. The indication information of the identifier storage location may be used alone or in combination, which is not limited in this embodiment. That is to say, the at least one storage address indicated by the identification storage location indication information may be used to obtain the terminal identification, and as an optional implementation manner, the priority of the manner of using the database path stored in the terminal by the terminal identification is higher than the manner of using the serial port identification of the serial port of the target terminal used for calling the terminal identification in the terminal. The above is only an example, and this is not limited in this embodiment.
It should be noted that, before the terminal device category information of the terminal to be identified is obtained, the stored mapping relationship may be obtained by counting the terminal device category information of different terminal devices and the corresponding relationship between the storage locations of the terminal identification identifiers corresponding to the terminal device category information in the terminal device. That is, the mapping relationship between the terminal device category information and the corresponding identification storage location indication information is obtained through big data analysis adaptation. For example, the mapping relationship may be as shown in table 2:
TABLE 2
Serial number Terminal device category information Identifying storage location information
1 A1 L1
2 A2 L2
3 B1 L3
That is, by analyzing and counting the storage locations of the terminal identification marks indicated by different types of terminal device class information (such as the device model of the terminal), the mark storage location indication information indicating the storage locations and the corresponding terminal device class information are stored in the background server in the form of key value pairs. For example, taking the first row in table 2 as an example, through analysis and statistics, the terminal identification identifier IMEI code of the terminal indicated by the terminal equipment category information a1 can be obtained through the identifier storage location information L1, and therefore, the above contents are stored as shown in table 2, so that in the case that the terminal equipment category information of the terminal to be identified is obtained next time as a1, the identifier storage location indication information L1 of the terminal can be searched in the mapping relationship by using a1, so as to obtain the terminal identification identifier of the terminal, such as IMEI-1, according to the indication of the identifier storage location indication information L1.
It should be noted that, in this embodiment, because the terminal synchronously writes part of the hardware information (including the IMEI code) of the terminal into the database of the terminal when the system is first powered on, the identification device connected to the terminal can directly obtain the terminal identification identifier IMEI for uniquely identifying the terminal according to the indicated database path in the database; in addition, since the baseband part of the terminal can be packaged into a serial device, the identification device connected with the terminal can also obtain the terminal identification IMEI for uniquely identifying the terminal from the terminal by communicating with the serial device.
Optionally, in this embodiment, the manner of obtaining the terminal device category information of the terminal to be identified may be, but is not limited to: 1) acquiring through an input device in the identification equipment, such as an input box of a display interface; 2) and directly reading the bottom data of the terminal. The above is only an example, and this is not limited in this embodiment.
Specifically, referring to the following example, as shown in fig. 3, the identification device obtains the terminal device category information of the connected terminal to be identified in step S302, and searches for the identifier storage location indication information matching the terminal identification identifier according to the terminal device category information in step S304. If the identification storage position indication information matched with the terminal device category information is found in step S306-1, wherein if the storage position indicated by the found identification storage position indication information is a database, step S308-1 is executed, and a terminal identification identifier is obtained according to the indicated database path; if the storage position indicated by the found identification storage position indication information is the serial port device, executing step S308-2, and acquiring a terminal identification according to the serial port identification of the indicated target terminal serial port; further, if the identification storage position indication information matched with the terminal device category information is not found in step S306-2, step S308-3 is executed, the output data of each terminal serial port of the terminal is traversed to obtain the serial port identification of the target terminal serial port for calling the terminal identification, and step S310 is executed to obtain the terminal identification according to the serial port identification of the target terminal serial port.
According to the embodiment provided by the application, after the terminal equipment category information of the terminal to be identified is acquired, the identification storage position indicating information used for indicating the storage position of the terminal identification mark in the terminal is searched according to the terminal equipment category information, so that the terminal identification mark stored in the terminal is directly acquired by utilizing the identification storage position indicating information, and the terminal is identified by utilizing the terminal identification mark, and the problem that the terminal identification accuracy is reduced due to the fact that the terminal identification mark cannot be successfully acquired when the terminal is abnormal and cannot be normally started in the related technology is solved.
As an alternative, the searching unit 404 includes:
1) the searching module is used for searching the identification storage position indicating information matched with the terminal equipment category information in the pre-stored mapping relation, wherein the identification storage position indicating information comprises at least one of the following information: the terminal identification mark is stored in a database path of the terminal and a serial port mark of a target terminal serial port in the terminal, wherein the serial port mark is used for calling the terminal identification mark;
2) and the first acquisition module is used for acquiring the terminal identification identifier according to the searched identifier storage position indication information when the identifier storage position indication information matched with the terminal equipment category information is searched.
Optionally, in this embodiment, the identifying unit 406 includes:
(1) the pulling module is used for pulling the database from the terminal for mapping storage when the storage position indicated by the identification storage position indication information is found to be the database according to the terminal equipment category information;
(2) and the second acquisition module is used for acquiring the terminal identification identifier from the database in mapping storage according to the database path indicated by the identifier storage position indication information.
Optionally, in this embodiment, the database path may include, but is not limited to, the following:
1) a database name (settings _ db) for pulling the database from the terminal; if the equipment model is not configured or the value is null, the terminal of the equipment model is considered to be incapable of searching the IMEI by using the database;
2) a database table name (table _ name) for searching the database table from the database;
3) database table field name (field _ name) for finding the IMEI from the database table.
In this embodiment, the identification device connected to the terminal to be identified performs mapping storage by pulling the database into the identification device, so that the storage location of the terminal identification identifier of the terminal is quickly located in the identification device according to the indicated database path, and the success rate of obtaining the terminal identification identifier is ensured.
Specifically, the following example may be combined, and assuming that the identification device takes a PC as an example, the execution steps may be as follows:
suppose that the database name in the database path synchronously written into the terminal hardware by the terminal when the system is started is db1, the database name is table1, and the database field name is field 1. Further, assuming that the PC obtains the device model a1 of the terminal to be identified, a search request is sent to the background server according to the device model a1 of the terminal, if the returned identifier storage location indication information is a database path, for example, the identifier storage location indication information L1 includes the database path, the PC will pull the database in the terminal from the terminal to the PC after executing the adb command "adb pull db1 db 2", and name the database on the PC by db 2; further, by executing the sql statement "select field1 from table 1", the PC will obtain the terminal identification IMEI of the terminal from the database db2 pulled from the PC as indicated by the path information (database table name table1, database table field 1).
Optionally, in this embodiment, the identifying unit 406 includes:
(1) and the communication module is used for communicating with a target terminal serial port to acquire a terminal identification identifier of the terminal when the storage position indicated by the identifier storage position indication information is found to be the serial port device according to the terminal device type information, wherein the identifier storage position indication information is used for indicating the serial port identifier of the target terminal serial port, and the target terminal serial port is used for calling the terminal identification identifier.
Optionally, in this embodiment, the target terminal serial port may be but is not limited to: the serial interface on the terminal is mainly used for serial bitwise data transmission, wherein if the serial interface is not configured or is empty, the terminal identified by the terminal equipment type information (such as the terminal equipment model) is not considered to have a storage mapping relationship.
Specifically, the following example may be combined, and assuming that the identification device takes a PC as an example, the execution steps may be as follows:
the terminal is assumed to comprise a plurality of serial interfaces, wherein the serial port of the target terminal serial port for calling the terminal identification is serial _ port-1. Further, assuming that the PC obtains the device model B1 of the terminal to be identified, it sends a search request to the background server according to the device model B1 of the terminal, and if the returned identifier storage location indication information is a serial identifier (also called serial number), for example, the identifier storage location indication information L3 includes the serial number, for example, the serial number serial _ port-1, it may directly send an "ATI" command to the serial port of the target terminal identified by the serial number serial _ port-1, and may analyze and obtain the terminal identification identifier IMEI of the terminal.
According to the embodiment provided by the application, the terminal identification mark of the terminal can be flexibly and accurately positioned by using different means through the indication mode corresponding to different mark storage position indication information, so that the success rate of acquiring the terminal identification mark is ensured.
As an alternative, the searching unit 404 includes:
1) and the traversing module is used for traversing output data of each terminal serial port of the terminal to acquire the serial port identification of the target terminal serial port for calling the terminal identification in the terminal after searching the identification storage position indication information matched with the terminal equipment type information in the pre-stored mapping relation and when not searching the identification storage position indication information matched with the terminal equipment type information.
Optionally, in this embodiment, the traversing module includes:
(1) the processing submodule is used for repeatedly executing the following steps until the serial port identification of the target terminal serial port for calling the terminal identification is obtained:
s1, acquiring a current terminal serial port;
s2, redirecting output data of the current terminal serial port to output to a target file under a preset path;
s3, judging whether a terminal identification is obtained from the target file;
s4, when the terminal identification mark is obtained from the target file, the serial port mark of the current terminal serial port is used as the serial port mark of the target terminal serial port for calling the terminal identification mark;
and S5, when the terminal identification mark is obtained from the target file, taking the serial port mark of the current terminal serial port as the serial port mark of the target terminal serial port for calling the terminal identification mark.
The description is made with specific reference to the following examples: when the indication information of any identification storage position is not found, the PC executes an adb command 'adb shells ls/dev' and analyzes all serial port list information of the terminal; selecting a serial port (assuming that the serial port name is serial _ port-1), executing an adb command 'adb shell serial _ port1 >/sdcard/imei.txt', and redirecting output data of the serial port (assuming that the serial port name is serial _ port-1) to a target file _ 1; in addition, an adb command pipeline execution command ' adb shell echo-e ' ATI \ r \ n ' is restarted; and executing an adb command' adb shell cat/sdcard/IMEI. If the acquisition or the analysis fails, a serial port can be selected from the serial port list information again to execute the steps repeatedly until the identification of the target terminal serial port for calling the terminal identification of the terminal is acquired.
By the embodiment provided by the application, when the indication information of the identifier storage position is not acquired, the output data of the serial port of the terminal can be sequentially redirected to the target file under the preset path, so that whether the corresponding serial port is the target terminal serial port for calling the terminal identifier of the terminal is determined by judging whether the specified file comprises the terminal identifier.
Example 3
The application environment of the embodiment of the present invention may refer to the application environment in embodiment 1, but is not described herein again. The embodiment of the invention provides an optional specific application example for implementing the terminal identification method.
As an optional embodiment, the terminal identification method may be but is not limited to be applied to an identification system, where the system includes 7 modules, which are an Android test Bridge (ADB) command module, a serial communication module, a network module, a data parsing module, an equipment information management module, a client module, and a server module.
1) An ADB command module, which is mainly used to call an ADB tool to communicate with a terminal (in this example, a mobile phone is taken as an example) to obtain information in the mobile phone. By the module, a database can be pulled from a mobile phone or the communication can be realized through a serial port.
2) And the serial port communication module is mainly used for communicating with the mobile phone by sending an AT command to the serial port so as to acquire information in the mobile phone. Through the module, the IMEI can be acquired from the mobile phone.
3) And the Sqlite operation module is mainly responsible for searching and acquiring path information of the IMEI from the database, such as database table identification and database table field identification.
4) The network module is mainly responsible for communication with a background, for example, relevant configuration values (such as a database path where an IMEI is located) of a mobile phone are acquired from the background through the model of the mobile phone equipment, and the position of the database and the serial port name are quickly located through the configuration; meanwhile, the information of the mobile phone can be stored in a background (such as the serial port name of the mobile phone) and used as the uniform configuration of the equipment with the same model.
The background configuration information and the usage can be as follows:
1. database name- -settings _ db
-for pulling a database from a handset
-if no configuration is present or the value is null, the mobile phone of this type is considered to be unable to use the database to look up the IMEI
2. Database table name-table _ name
-for looking up database tables from a database
3. Database table field name
For looking up IMEI from database tables
4. Serial port name-serial port
-for communicating with the handset via the serial port name
-if not configured or null, then the handset of that type is deemed not to have been adapted and needs to be looked up port by port
5) And the data analysis module is mainly used for providing a data analysis interface for the equipment information management module and the network module. Data acquired through the ADB tool, the serial port and the background can be better used after being analyzed and sorted through the module.
6) And the equipment information management module is mainly responsible for acquiring, storing and managing the equipment information and provides an interface for the upper layer module to call. The configuration information is acquired through the network module, the IMEI is preferentially acquired through the database path, and if the database path is not acquired, the IMEI is acquired through the serial port identifier (also called serial port number).
A. The method for acquiring the IMEI through the database comprises the following steps:
s1, assuming that the path from the network module to the database is db1, the table name is table1, and the field name is field 1;
s2, executing an adb command 'adb pull db1 db 2', and pulling the database from the mobile phone to the PC, wherein db2 is the full name of the file on the PC;
s3, the sql statement "select field1 from table 1" is executed by the sqlite module to obtain the IMEI from db 2.
B. The method for acquiring the IMEI through the serial port comprises the following steps:
s1, if there is a serial _ port in the configuration information returned by the network module, then directly sending an ATI command to the serial _ port through the serial communication module to obtain IMEI by analysis;
s2, if no serial _ port exists, executing an adb command 'adb shells ls/dev', and analyzing all serial list information;
s3, selecting a serial port (assuming that the serial port name is serial _ port1) and executing an adb command 'adb shell name _ port1 >/sdcard/imei.txt', and redirecting the output of the serial port to a file;
s4, restarting an adb command pipeline execution command ' adb shell echo-e ' ATI \ r \ n ';
s5, executing an adb command 'adb shell cat/sdcard/imei.txt' to acquire and analyze IMEI, and if acquisition or analysis fails, circulating the step CDE to try to acquire other serial ports;
6) and the client module searches and acquires the IMEI by calling the equipment information management module. And if the serial port name is acquired by trying to traverse the serial port, the serial port name available for trying is sent to the server side record through the network module.
7) And the server module is mainly responsible for communicating with the client and providing services. The client side can respond to the request of the client side, identify the model according to the mobile phone information in the request, and simultaneously send the configuration of the model to the client side; and meanwhile, the report of the client is received, and the serial port name is stored in the configuration corresponding to the mobile phone model.
Example 4
According to an embodiment of the present invention, there is also provided a terminal identification device for implementing the terminal identification method, as shown in fig. 5, the device includes:
1) a communication interface 502 configured to acquire terminal device category information of a terminal to be identified connected to the identification device;
2) a processor 504, connected to the communication interface 502, configured to search, according to the terminal device category information, identifier storage location indication information matched with the terminal, where the identifier storage location indication information is used to indicate a storage location of a terminal identification identifier matched with the terminal in the terminal; the terminal identification device is further configured to acquire a terminal identification identifier of the terminal from the storage location indicated by the searched identifier storage location indication information, so that the identification device identifies the terminal through the terminal identification identifier;
3) the memory 506, connected to the communication interface 502 and the processor 504, is configured to store the terminal device type information and/or the identification storage location indication information.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
Example 5
The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network devices in a network.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, acquiring the terminal equipment category information of the terminal to be identified connected with the identification equipment;
s2, searching identification storage position indication information matched with the terminal according to the terminal device category information, wherein the identification storage position indication information is used for indicating the storage position of the terminal identification matched with the terminal in the terminal;
and S3, acquiring the terminal identification mark of the terminal from the storage position indicated by the searched mark storage position indication information, so that the identification device identifies the terminal through the terminal identification mark.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, searching the identification storage position indication information matched with the terminal device category information in the pre-stored mapping relation, wherein the identification storage position indication information comprises at least one of the following information: the terminal identification mark is stored in a database path of the terminal and a serial port mark of a target terminal serial port in the terminal, wherein the serial port mark is used for calling the terminal identification mark;
and S2, when the identification storage position indication information matched with the terminal equipment type information is found, acquiring the terminal identification according to the found identification storage position indication information.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, the specific examples in this embodiment may refer to the examples described in embodiment 1 and embodiment 2, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A terminal identification method, comprising:
the method comprises the steps that in the process that identification equipment identifies a terminal to be identified in a flashing and repairing state, the type of the terminal equipment of the terminal to be identified, which is connected with the identification equipment, is obtained through an input frame of a display interface;
searching identification storage position indicating information matched with the equipment model of the terminal in a pre-stored mapping relation, wherein the identification storage position indicating information comprises at least one of the following information: a database path of an International Mobile Equipment Identity (IMEI) of the terminal stored in the terminal, and a serial port identifier of a target terminal serial port used for calling the IMEI in the terminal, wherein the identifier storage position indication information is used for indicating the storage position of the IMEI matched with the terminal in the terminal;
and acquiring the international IMEI according to the searched identification storage position indication information so as to enable the identification equipment to identify the terminal through the IMEI.
2. The method according to claim 1, wherein said obtaining an international mobile equipment identity IMEI according to the found indication information of the storage location of the identifier comprises:
when the storage position indicated by the identification storage position indication information is found to be a database according to the terminal equipment category information, pulling the database from the terminal for mapping storage;
and acquiring the IMEI from the database stored in a mapping manner according to the database path indicated by the identification storage position indication information.
3. The method of claim 2, wherein the database path comprises: database identification, database table field identification.
4. The method according to claim 1, wherein said obtaining an international mobile equipment identity IMEI according to the found indication information of the storage location of the identifier comprises:
and when the storage position indicated by the identification storage position indication information is found to be serial equipment according to the terminal equipment category information, communicating with a target terminal serial port to acquire the IMEI of the terminal, wherein the identification storage position indication information is used for indicating a serial port identification of the target terminal serial port, and the target terminal serial port is used for calling the IMEI.
5. The method according to claim 1, wherein after searching for the identifier storage location indication information matching the terminal device category information in the pre-stored mapping relationship, further comprising:
and traversing output data of each terminal serial port of the terminal to acquire the serial port identification of the target terminal serial port for calling the IMEI in the terminal when the identification storage position indication information matched with the terminal equipment category information is not found.
6. The method of claim 5, wherein traversing the output data of each serial port of the terminal comprises:
repeatedly executing the following steps until the serial port identification of the serial port of the target terminal for calling the IMEI is obtained:
acquiring a current terminal serial port;
redirecting and outputting the output data of the current terminal serial port to a target file under a preset path;
judging whether the IMEI is acquired from the target file;
when the IMEI is acquired from the target file, the serial port identification of the serial port of the current terminal is used as the serial port identification of the serial port of the target terminal for calling the IMEI;
and when the IMEI is not acquired from the target file, acquiring a next terminal serial port as the current terminal serial port.
7. A terminal identification device, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the model of the terminal to be identified, which is connected with an identification device, through an input frame of a display interface in the process that the identification device identifies the terminal to be identified in the flashing repair state;
a searching unit, configured to search, in a pre-stored mapping relationship, identifier storage location indication information that matches a device model of the terminal, where the identifier storage location indication information includes at least one of: a database path of an International Mobile Equipment Identity (IMEI) of the terminal stored in the terminal, and a serial port identifier of a target terminal serial port used for calling the IMEI in the terminal, wherein the identifier storage position indication information is used for indicating the storage position of the IMEI matched with the terminal in the terminal;
and the identification unit is used for acquiring the IMEI according to the found identification storage position indication information so as to enable the identification equipment to identify the terminal through the IMEI.
8. The apparatus of claim 7, wherein the identification unit comprises:
the pulling module is used for pulling the database from the terminal for mapping storage when the storage position indicated by the identification storage position indication information is found to be the database according to the terminal equipment category information;
and the second acquisition module is used for acquiring the IMEI from the database in mapping storage according to the database path indicated by the identification storage position indication information.
9. The apparatus of claim 8, wherein the database path comprises: database identification, database table field identification.
10. The apparatus of claim 7, wherein the identification unit comprises:
and the communication module is used for communicating with a target terminal serial port to acquire the IMEI of the terminal when the storage position indicated by the identification storage position indication information is found to be serial equipment according to the terminal equipment category information, wherein the identification storage position indication information is used for indicating the serial port identification of the target terminal serial port, and the target terminal serial port is used for calling the IMEI.
11. The apparatus of claim 7, wherein the lookup unit comprises:
and traversing the output data of each terminal serial port of the terminal to acquire the serial port identifier of the target terminal serial port for calling the IMEI in the terminal after searching the identifier storage position indication information matched with the terminal equipment category information in the pre-stored mapping relation and when not searching the identifier storage position indication information matched with the terminal equipment category information.
12. The apparatus of claim 11, wherein the traversal module comprises:
the processing submodule is used for repeatedly executing the following steps until the serial port identification of the serial port of the target terminal for calling the IMEI is obtained:
acquiring a current terminal serial port;
redirecting and outputting the output data of the current terminal serial port to a target file under a preset path;
judging whether the IMEI is acquired from the target file;
when the IMEI is acquired from the target file, the serial port identification of the serial port of the current terminal is used as the serial port identification of the serial port of the target terminal for calling the IMEI;
and when the IMEI is not acquired from the target file, acquiring a next terminal serial port as the current terminal serial port.
13. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
14. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 6.
CN201611131744.2A 2016-12-09 2016-12-09 Terminal identification method and device Active CN108460271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611131744.2A CN108460271B (en) 2016-12-09 2016-12-09 Terminal identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611131744.2A CN108460271B (en) 2016-12-09 2016-12-09 Terminal identification method and device

Publications (2)

Publication Number Publication Date
CN108460271A CN108460271A (en) 2018-08-28
CN108460271B true CN108460271B (en) 2020-09-29

Family

ID=63221465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611131744.2A Active CN108460271B (en) 2016-12-09 2016-12-09 Terminal identification method and device

Country Status (1)

Country Link
CN (1) CN108460271B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110177093A (en) * 2019-05-22 2019-08-27 上海上湖信息技术有限公司 A kind of equipment, equipment and recognition methods for identification carrying out identification
CN110225511B (en) * 2019-06-20 2022-04-15 天翼数字生活科技有限公司 Method, device and system for acquiring IMEI number of terminal and computer equipment
CN111097175B (en) * 2019-11-21 2021-09-14 腾讯科技(深圳)有限公司 Simulator determination method and device and storage medium
CN111045737B (en) * 2019-11-29 2023-09-19 惠州Tcl移动通信有限公司 Equipment identifier acquisition method, device, terminal equipment and storage medium
CN114510510A (en) * 2022-02-16 2022-05-17 上海颖橙电子科技有限公司 Data searching system for live-action entertainment terminal
CN116932449B (en) * 2023-09-15 2023-12-15 浪潮(山东)计算机科技有限公司 Method, system, equipment and medium for realizing serial port redirection to remote equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750100A (en) * 2012-06-20 2012-10-24 宇龙计算机通信科技(深圳)有限公司 Terminal and method for identifying operating system of terminal
KR20130030956A (en) * 2011-09-20 2013-03-28 삼성전자주식회사 Apparatus and method for charging in one device multi-user system
CN103840914A (en) * 2014-02-17 2014-06-04 天地融科技股份有限公司 Data communication method, terminal and information security equipment
CN104079634A (en) * 2014-06-12 2014-10-01 深圳市金立通信设备有限公司 Method, device and system for displaying device interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130030956A (en) * 2011-09-20 2013-03-28 삼성전자주식회사 Apparatus and method for charging in one device multi-user system
CN102750100A (en) * 2012-06-20 2012-10-24 宇龙计算机通信科技(深圳)有限公司 Terminal and method for identifying operating system of terminal
CN103840914A (en) * 2014-02-17 2014-06-04 天地融科技股份有限公司 Data communication method, terminal and information security equipment
CN104079634A (en) * 2014-06-12 2014-10-01 深圳市金立通信设备有限公司 Method, device and system for displaying device interface

Also Published As

Publication number Publication date
CN108460271A (en) 2018-08-28

Similar Documents

Publication Publication Date Title
CN108460271B (en) Terminal identification method and device
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN108388599B (en) Electronic device, data migration and calling method and storage medium
US7685322B2 (en) Port number emulation for wireless USB connections
CN109284140B (en) Configuration method and related equipment
CN109117172B (en) Method and device for identifying terminal version number of target terminal
CN109388671B (en) Data processing method, device, equipment and storage medium
CN111158968B (en) BIOS configuration information self-checking method, device and storage medium
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN113688045B (en) Automatic checking method and device for binary interface compatibility
EP3671512A1 (en) Automated software vulnerability determination
CN104426868A (en) Request processing method and processing apparatus
CN111124480A (en) Application package generation method and device, electronic equipment and storage medium
CN112988780A (en) Data checking method and device, storage medium and electronic equipment
CN110597662B (en) Backup data automatic verification method and device, user equipment and storage medium
CN110851334A (en) Flow statistical method, electronic device, system and medium
CN111008220A (en) Dynamic identification method and device of data source, storage medium and electronic device
CN111026613B (en) Log processing method and device
CN109739868B (en) Data processing method and related equipment thereof
CN110737662A (en) data analysis method, device, server and computer storage medium
CN109522014B (en) Algorithm processing method based on new product development, electronic device and readable storage medium
CN113032019A (en) Multi-factor-based android device identification method and device and storage medium
US11360785B2 (en) Execution path determination in a distributed environment
CN104951550B (en) Date storage method and device
CN110457187B (en) TPC-E test method and test server capable of conveniently running based on backup test data

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