CN105653713B - It is a kind of to determine the method and device that EIC equipment identification code is present - Google Patents
It is a kind of to determine the method and device that EIC equipment identification code is present Download PDFInfo
- Publication number
- CN105653713B CN105653713B CN201511031063.4A CN201511031063A CN105653713B CN 105653713 B CN105653713 B CN 105653713B CN 201511031063 A CN201511031063 A CN 201511031063A CN 105653713 B CN105653713 B CN 105653713B
- Authority
- CN
- China
- Prior art keywords
- identification code
- sub
- equipment identification
- preset
- device identification
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000003860 storage Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 2
- 238000004590 computer program Methods 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 4
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention is that embodiment discloses a kind of method and device for determining EIC equipment identification code presence;The embodiment of the present invention uses the search request that receiving terminal is sent, then, divided according to the EIC equipment identification code that default division rule is carried to the search request, to obtain the first sub- EIC equipment identification code and the second sub- EIC equipment identification code, obtain the corresponding EIC equipment identification code set of the first sub- EIC equipment identification code, the EIC equipment identification code set includes at least one second default sub- EIC equipment identification code, searched in the EIC equipment identification code set and preset sub- EIC equipment identification code with the second sub- EIC equipment identification code identical, to obtain lookup result, when presetting sub- EIC equipment identification code with the second sub- EIC equipment identification code identical second when lookup result to find, determine the existing EIC equipment identification code;The program, which can be reduced, reduces the memory consumption that EIC equipment identification code is searched, and then reduces memory usage.
Description
Technical Field
The invention belongs to the technical field of internet, and particularly relates to a method and a device for determining existence of an equipment identification code.
Background
With the popularization of internet technology, more and more users learn, entertain and the like through the internet, not only can life be enriched, but also convenience is brought to the users.
An IMEI number (International Mobile Equipment identity) needs to be added to the policy rule to provide more flexible operation capability, specifically, the server needs to determine whether an IMEI number sent by the terminal exists through IMEI number search, and if the IMEI number exists, the IMEI number policy rule is executed, for example, the server directly uses modes of bisection search, hash search and the like to retrieve and locate the target IMEI number so as to determine whether the IMEI number exists.
However, the number level of the IMEI number can reach millions, and meanwhile, almost every request needs to be determined by the existence of the IMEI number; the existing scheme for determining the existence of the IMEI number needs to read all IMEI entries into a memory for searching to determine whether the IMEI number exists, although the speed is fast enough, the consumed memory is large, and the memory occupancy rate is large, wherein the memory occupancy rate is proportional to the data size.
From the above, the existing scheme for determining the existence of the IMEI number has the technical problem of large memory occupancy rate.
Disclosure of Invention
The invention provides a method and a device for determining the existence of an equipment identification code, which can solve the technical problem of large memory occupancy rate in the existing scheme for determining the existence of an IMEI number.
The embodiment of the invention provides a method for determining the existence of an equipment identification code, which comprises the following steps:
receiving a search request sent by a terminal, wherein the search request carries an equipment identification code of the terminal;
dividing the equipment identification code according to a preset division rule to obtain a first sub-equipment identification code and a second sub-equipment identification code;
acquiring an equipment identification code set corresponding to the first sub-equipment identification code, wherein the equipment identification code set comprises at least one second preset sub-equipment identification code, and the first sub-equipment identification code and the second sub-equipment identification code are combined to form the equipment identification code;
searching a second preset sub-device identification code which is the same as the second sub-device identification code in the device identification code set to obtain a searching result;
and when the second preset sub-equipment identification code which is the same as the second sub-equipment identification code is found, determining that the equipment identification code exists.
Correspondingly, an embodiment of the present invention further provides an apparatus for determining the existence of an equipment identity, including:
the device comprises a receiving unit, a searching unit and a processing unit, wherein the receiving unit is used for receiving a searching request sent by a terminal, and the searching request carries a device identification code of the terminal;
the first dividing unit is used for dividing the equipment identification code according to a preset dividing rule to obtain a first sub-equipment identification code and a second sub-equipment identification code, wherein the first sub-equipment identification code and the second sub-equipment identification code are combined to form the equipment identification code;
a first obtaining unit, configured to obtain a device identification code set corresponding to the first sub-device identification code, where the device identification code set includes at least one second preset sub-device identification code;
the searching unit is used for searching a second preset sub-device identification code which is the same as the second sub-device identification code in the device identification code set to obtain a searching result;
a determining unit, configured to determine that the device identification code already exists when the second preset sub-device identification code that is the same as the second sub-device identification code is found.
The embodiment of the invention provides a method and a device for determining the existence of an equipment identification code, wherein a search request sent by a receiving terminal is adopted, the search request carries the equipment identification code of the terminal, then the equipment identification code is divided according to a preset division rule to obtain a first sub-equipment identification code and a second sub-equipment identification code, an equipment identification code set corresponding to the first sub-equipment identification code is obtained, the equipment identification code set comprises at least one second preset sub-equipment identification code, a preset sub-equipment identification code which is the same as the second sub-equipment identification code is searched in the equipment identification code set to obtain a search result, and when the search result is that the second preset sub-equipment identification code which is the same as the second sub-equipment identification code is searched, the equipment identification code is determined to exist; according to the scheme, the equipment identification code of the terminal can be divided into two sub-equipment identification codes, whether the equipment identification code exists is determined by searching the sub-equipment identification code, and compared with the prior art, the memory consumption for searching the equipment identification code can be reduced, so that the memory occupancy rate is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for determining the existence of an equipment identity according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for determining the existence of an equipment identity according to a second embodiment of the present invention;
fig. 3a is a schematic structural diagram of a first apparatus for determining the existence of a device identification code according to a third embodiment of the present invention;
fig. 3b is a schematic structural diagram of a second apparatus for determining the existence of a device identification code according to a third embodiment of the present invention;
fig. 3c is a schematic structural diagram of a third apparatus for determining the existence of a device identification code according to a third embodiment of the present invention;
fig. 3d is a schematic structural diagram of a fourth apparatus for determining the existence of a device identification code according to a third embodiment of the present invention.
Detailed Description
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.
The embodiment of the invention provides a method and a device for determining existence of an equipment identification code. The details will be described below separately.
The first embodiment,
The embodiment will be described from the perspective of a server, and the apparatus for determining the existence of the device identification code may be specifically integrated in a device such as a terminal.
Referring to fig. 1, the present embodiment provides a method for determining the existence of an equipment identity, and the specific process may be as follows:
101. and receiving a search request sent by a terminal, wherein the search request carries the equipment identification code of the terminal.
Specifically, when the terminal performs data interaction with the server, the terminal sends a service request to the server, where the service request includes the search request, that is, includes the device identification code of the terminal, and it needs to be noted that the device identification code has uniqueness, such as an IMEI number; for example, when the terminal searches for a keyword through a browser, a service request carrying the terminal device identification code is sent to the server, and the server receives and processes the request.
102. And dividing the equipment identification code according to a preset division rule to obtain a first sub-equipment identification code and a second sub-equipment identification code, wherein the first sub-equipment identification code and the second sub-equipment identification code are combined to form the equipment identification code.
Specifically, the device identification code includes a series of character strings, and the server obtains the device identification code of the terminal according to the search request, and divides the device identification code according to a preset division rule to obtain a first sub-device identification code and a second sub-device identification code, where the first sub-device identification code and the second sub-device identification code are combined to form the device identification code, that is, the first sub-device identification code includes a first M-bit string of the device identification code, and the second sub-device identification code includes a second N-bit string of the device identification code. M, N are all positive integers, and the sum of M and N is the total number of characters in the terminal equipment identification code string.
In a specific implementation process, the preset division rule may divide the device identification code into two parts, for example, divide an IMEI number of the terminal, where the IMEI number includes 15 digital characters, and divide the IMEI number once from the 8 th character to the 9 th character, to obtain a first 8-digit character as a first sub-device identification code of the terminal, and a second 7-digit character as a second sub-device identification code of the terminal.
Preferably, before the device identification code is divided, the server may obtain feature information of the device identification code, and determine whether the feature information matches preset feature information, if yes, perform an operation of dividing the device identification code, and if not, not perform the operation of dividing the device identification code. For example, if the preset feature information is that the device identification code needs to be a 15-bit numeric character string, when the device identification code carried in the search request contains other characters or the number of characters is not 15, the server determines that the device identification code does not conform to the preset feature information, and therefore the operation of dividing the device identification code is not performed.
103. And acquiring an equipment identification code set corresponding to the first sub-equipment identification code, wherein the equipment identification code set comprises at least one second preset sub-equipment identification code.
In this embodiment of the present invention, before receiving the search request sent by the terminal, the device identifier of the terminal needs to be processed in advance, that is, before "receiving the search request sent by the terminal, where the search request carries the device identifier of the terminal" in step 101, the method may further include:
acquiring a plurality of preset equipment identification codes;
dividing the preset equipment identification code to obtain a first preset sub-equipment identification code and a second preset sub-equipment identification code, wherein the first preset sub-equipment identification code and the second preset sub-equipment identification code are combined to form the preset equipment identification code;
and setting the corresponding relation between the first preset sub-equipment identification code and the second preset sub-equipment identification code.
Specifically, when the server creates a search rule of the device identification codes, the server may obtain the device identification codes of the plurality of terminal devices, that is, the preset device identification codes, divide the preset device identification codes to obtain the first preset sub-device identification code and the second preset sub-device identification code, and then set the corresponding relationship between the first preset sub-device identification code and the second preset sub-device identification code; the rule for dividing the preset device identification code is the same as the rule for dividing the device identification code of the terminal by the server in the step 102.
The step of "setting the corresponding relationship between the first preset sub-device identification code and the second preset sub-device identification code" may be to filter out the repeated first preset sub-device identification code after dividing the preset device identification code, and then establish the corresponding relationship between the second preset sub-device identification code and the first preset sub-device identification code according to the status code before the preset device identification code is not divided, so as to obtain the device identification code set corresponding to the first preset sub-device identification code.
For example, if the device a1 identification code is a + b and the device a2 identification code is a + c, where a, b, and c are numeric character strings, the device a1 identification code is divided to obtain a first sub-device a1 identification code a and a second sub-device a1 identification code b of the device a1 identification code, and the device a2 identification code is divided to obtain a first sub-device a2 identification code a and a second sub-device a2 identification code c of the device a2 identification code; since the first sub-device id of the device a1 and the first sub-device a2 id of the device a2 are both a, the first sub-device a2 id a and the second sub-device a2 id c are associated with a to obtain a device id set corresponding to the first preset sub-device id. I.e. the set of device identifiers of the first device identifier a is b, c.
Preferably, the step of setting the corresponding relationship between the first preset sub-device identification code and the second preset sub-device identification code may specifically include:
acquiring a file corresponding to the first preset sub-device identification code;
and taking the second preset sub-device identification code as the content of the file.
In a specific implementation process, a file may be created, the first preset sub-device identification code is used as a name of the file, the second preset sub-device identification code is used as content of the file, and a corresponding relationship between the first preset sub-device identification code and the second preset sub-device identification code is set.
Preferably, the step of "acquiring the device identification code set corresponding to the first sub-device identification code" may specifically include:
judging whether a first preset sub-equipment identification code which is the same as the first sub-equipment identification code exists or not;
if so, acquiring a device identification code set corresponding to the first sub-device identification code according to the corresponding relation between the first preset sub-device identification code and the second preset sub-device identification code.
Specifically, the server judges whether a first preset sub-device identification code identical to the first sub-device identification code exists in the database, if so, the first preset sub-device identification code is obtained, and then all second preset sub-device identification codes corresponding to the first preset sub-device identification code in the database are obtained according to the first preset sub-device identification code, so that a device identification code set corresponding to the first sub-device identification code is obtained.
The step of obtaining the device identification code set corresponding to the first sub-device identification code according to the corresponding relationship between the first preset sub-device identification code and the second preset sub-device identification code may specifically include:
acquiring a file corresponding to the first sub-device identification code;
and extracting the content of the file to obtain a device identification code set corresponding to the first sub-device identification code.
104. And searching a second preset sub-device identification code which is the same as the second sub-device identification code in the device identification code set to obtain a searching result.
Specifically, the server searches for a second preset sub-device identification code which is the same as the second sub-device identification code from the device identification code set corresponding to the acquired first sub-device identification code, so as to obtain a search result.
105. And when the search result is a second preset sub-equipment identification code with the same second sub-equipment identification code, determining that the equipment identification code exists according to the search result.
Specifically, the server determines whether the device identification code exists according to the search result, and if the device identification code exists, the server acquires corresponding search content according to the search request and feeds the search content back to the terminal.
As can be seen from the above, an embodiment of the present invention provides a method for determining the existence of an equipment identity, where a search request sent by a receiving terminal is adopted, where the search request carries an equipment identity of the receiving terminal, and then the equipment identity is divided according to a preset division rule to obtain a first sub-equipment identity and a second sub-equipment identity, and obtain an equipment identity set corresponding to the first sub-equipment identity, where the equipment identity set includes at least one second preset sub-equipment identity, and a preset sub-equipment identity identical to the second sub-equipment identity is searched in the equipment identity set to obtain a search result, and when the search result is that the second preset sub-equipment identity identical to the second sub-equipment identity is searched, the equipment identity is determined to exist; according to the scheme, the equipment identification code of the terminal can be divided into two sub-equipment identification codes, whether the equipment identification code exists is determined by searching the sub-equipment identification code, and compared with the prior art, the memory consumption for searching the equipment identification code can be reduced, so that the memory occupancy rate is reduced.
Example II,
The present embodiment further describes the method for determining the presence of the device identification code according to the present invention on the basis of the first embodiment. As the server needs to cache the file state in the search process, the cache is easily removed due to too many files, and as can be seen from the first embodiment, the method can only take effect for the existing device identification code, and in order to improve the execution efficiency and the search quality of the server, the method of this embodiment limits the step of "obtaining the file corresponding to the first preset sub-device identification code" when creating the search rule, that is, the step of "obtaining the file corresponding to the first preset sub-device identification code" may specifically include:
judging whether a file path corresponding to the first preset sub-equipment identification code exists or not;
if so, acquiring a file corresponding to the file path;
if not, generating a corresponding file path according to the first preset sub-equipment identification code, and creating a file corresponding to the file path.
Specifically, when a cache file of a file path corresponding to the first preset sub-device exists, the corresponding file is acquired, otherwise, the corresponding file path is generated according to the identification code of the first preset sub-device, and the file corresponding to the file path is created.
Correspondingly, the step of acquiring the file corresponding to the first sub-device identification code may specifically include:
acquiring a file path corresponding to the first sub-device identification code;
judging whether a file path corresponding to the first sub-equipment identification code exists or not;
and if so, acquiring the file corresponding to the file path.
Preferably, in order to reduce the number of files in a single directory, in the embodiment of the present invention, when creating the search rule of the server, the first preset sub-device identification code of the preset device identification code may be divided to create a secondary folder, so as to reduce fragmented files; for example, the IMEI number of the terminal device is formed by 15 digits of arabic numerals, the first 6 digits of the IMEI number represent the model of the terminal, and the 7-8 digits represent the production address, so that the first 6 digits of the IMEI number can be used as the folder name to create a secondary folder, and the 7-8 digits can be used as the file name of the file in the folder, so as to avoid excessive fragmented files. By analogy, the 1 st to 6 th positions of the folder can be divided to create a second-level folder.
Preferably, when creating the search rule of the server, in order to be able to quickly locate the second preset sub-device identification code in the file corresponding to the first preset sub-device identification code, when a series of second preset sub-device identification codes are used as the content of the file, the second preset sub-device identification codes may be preprocessed, that is, between the step of "using the second preset identification code as the content of the file" and the step of "receiving the search request sent by the terminal", the method may further include:
and sequencing the second preset sub-equipment identification codes in the file according to the number size corresponding to the second preset sub-equipment identification codes.
Specifically, the device identification code includes a numeric character, the second preset sub-device identification code may be added to the end of the file content, and the second preset sub-device identification code is sorted from high to low according to the corresponding numeric size and from small to large or from large to small, so that the server may quickly find the target device identification code in the file by using a binary search method.
For example, the device identifiers are 1234567890, 1234576890, 1234567980, and 1234567089, the second-level folder may be created by using bits 1 to 5 of the device identifiers as the folder name, bits 6 to 7 are used as the file name, and bits 8 to 9 are added to the end of the file content, so as to obtain file paths 12345/67 and 12345/76, where the file content corresponding to the file path 12345/67 includes 890, 980, and 089, the child device identifiers in the file content are sorted from small to large, so as to obtain 089, 890, and 980, and so on, when the data size is large, the server may quickly locate the device identifier by using a binary search method according to the search rule.
As can be seen from the above, an embodiment of the present invention provides a method for determining the existence of an equipment identity, where a search request sent by a receiving terminal is adopted, where the search request carries an equipment identity of the receiving terminal, and then the equipment identity is divided according to a preset division rule to obtain a first sub-equipment identity and a second sub-equipment identity, and an equipment identity set corresponding to the first sub-equipment identity is obtained, where the equipment identity set includes at least one second preset sub-equipment identity, and a preset sub-equipment identity identical to the second sub-equipment identity is searched in the equipment identity set to obtain a search result, and when the second preset sub-equipment identity identical to the second sub-equipment identity is searched, the equipment identity is determined to exist; according to the scheme, when the search rule is established, the secondary folder is added, so that excessive and fragmented files are avoided, the sub-equipment identification codes in the file corresponding to the first equipment identification code are sequenced, and the search speed is accelerated; compared with the prior art, the method can reduce the memory consumption of searching the equipment identification code, thereby reducing the memory occupancy rate.
Example III,
The method for determining the presence of a device identification code according to the embodiments one and two will be described in further detail below by way of example.
In this embodiment, the apparatus for determining the existence of the device identification code is specifically integrated in the smart phone, and the device identification code is, for example, the IMEI number of the smart phone, and relevant description is performed.
It should be noted that, in the embodiment of the present invention, a search rule of the server needs to be created in advance; specifically, the IMEI numbers of a plurality of smart phones are acquired and divided, in this embodiment, it is preferable to divide 15 digits of the IMEI numbers into three parts, with digits 1 to 6 as one unit, digits 7 to 8 as one unit, and digits 9 to 15 as one unit; for example, if the IMEI number is 864182020468931, using the 1 st to 6 th digits as a folder name, creating a folder, creating a file in the folder, for example, a txt text document, using the 7 th to 8 th digits of the IMEI number as the file name, obtaining a file path,/864182/02. txt, adding the 9 th to 15 th digits of the IMEI number as a unit to the end of the content of the file, and sorting the file according to a book order of the digit size from small to large; for example, when the content of the document contains the 9 th to 15 th digits of a plurality of IMEI numbers, if the sequence is as follows: 341526068931151242646842162123515, then the sequence is: 04689311512426212351534153264684216.
as shown in fig. 2, a specific process of determining the existence of the device identification code may be as follows:
201. the method comprises the steps that a server receives a search request of the smart phone, the search request carries an IMEI number of the smart phone, the server divides the IMEI number according to a preset division rule to obtain a first sub-device identification code and a second sub-device identification code, and the first sub-device identification code and the second sub-device identification code are combined to form the device identification code.
Specifically, there are various ways for the smartphone to initiate a search request to the server, for example, the smartphone may perform entry search through a browser, and at this time, a service request including a search request of the IMEI number of the smartphone is initiated to the server. The server divides the IMEI number according to the above-created server division rule, for example, the IMEI number is 864182020468931, and after the division, the first sub-device identifier is 86418202, and the second sub-device identifier is 0468931.
202. The server divides the first sub-device identification code to obtain a first sub-device identification code a1 and a first sub-device identification code a 2.
Specifically, the server divides the first sub-device id according to the created server search rule, and obtains 864182 as the first sub-device id a1 and 02 as the first sub-device id a 2.
203. And acquiring a first device identification code set corresponding to the first sub-device identification code a1, wherein the device identification code set comprises at least one first preset sub-device identification code a 2.
Specifically, the server determines whether there is a folder named by the first child device identifier a1, for example IIMEI No. 864182020468931, that is, finds a folder with a folder name of 864182. If yes, the folder corresponding to the first child device identification code a1 is obtained.
204. The first predetermined kid device id a2 that is the same as the first kid device id a2 is found in the first set of device ids.
Specifically, the server searches the first device id set, i.e. the folder in step 203, for the file named by the first sub-device id a2, e.g. IIMEI No. 864182020468931, i.e. for the file with the file name of 02.
205. And determining whether the first preset sub-device identification code a2 exists according to the search result, if so, executing step 206, and if not, executing step 210.
206. And acquiring a second device identification code set corresponding to the first preset sub-device identification code a2, wherein the device identification code set comprises at least one second preset sub-device identification code.
Specifically, taking IIMEI number 864182020468931 as an example, all the second preset child device identification codes are obtained from the file with 02 as the file name.
207. And searching a second preset sub-device identification code which is the same as the second sub-device identification code in the second device identification code set.
Specifically, taking IIMEI No. 864182020468931 as an example, the file content 0468931 is searched for in the second preset sub-device identification code in the file with 02 as the file name.
208. It is determined whether the second predetermined sub-device identification code is found, if yes, step 209 is executed, and if not, step 210 is executed.
209. The server determines that the IMEI number exists.
Specifically, if the server finds a second preset sub-device identification code that is the same as the second sub-device identification code, it determines that the IMEI number exists.
210. And the server feeds back the information of the search failure to the smart phone.
Specifically, if the server does not search the first preset sub-device identification code a2 which is the same as the first sub-device identification code a2 in the first device identification code set, or the server does not search the second preset sub-device identification code which is the same as the second sub-device identification code, the server feeds back the information of the search failure to the smartphone, and displays the information on the display screen of the smartphone.
As can be seen from the above, an embodiment of the present invention provides a method for determining the existence of an equipment identity, where a search request sent by a receiving terminal is adopted, where the search request carries an equipment identity of the receiving terminal, and then the equipment identity is divided according to a preset division rule to obtain a first sub-equipment identity and a second sub-equipment identity, and an equipment identity set corresponding to the first sub-equipment identity is obtained, where the equipment identity set includes at least one second preset sub-equipment identity, and a preset sub-equipment identity identical to the second sub-equipment identity is searched in the equipment identity set to obtain a search result, and the equipment identity is determined to exist according to the search result; according to the scheme, the equipment identification code of the terminal can be divided into two sub-equipment identification codes, whether the equipment identification code exists is determined by searching the sub-equipment identification code, and compared with the prior art, the memory consumption for searching the equipment identification code can be reduced, so that the memory occupancy rate is reduced.
Example four,
In order to better implement the above method, an embodiment of the present invention further provides an apparatus for determining the presence of a device identification code, where the apparatus may be integrated in a terminal, and the terminal may specifically include a mobile phone, a tablet Computer, a notebook Computer, or a Personal Computer (PC). As shown in fig. 3a, the means for determining the presence of the device identification code may comprise: a receiving unit 301, a first dividing unit 302, a first obtaining unit 303, a searching unit 304 and a determining unit 305; wherein,
the receiving unit 301 is configured to receive a search request sent by a terminal, where the search request carries an equipment identification code of the terminal;
the first dividing unit 302 is configured to divide the device identification code according to a preset dividing rule to obtain a first sub-device identification code and a second sub-device identification code, where the first sub-device identification code and the second sub-device identification code are combined to form the device identification code;
the first obtaining unit 303 is configured to obtain a device identifier set corresponding to the first sub-device identifier, where the device identifier set includes at least one second preset sub-device identifier;
the searching unit 304 is configured to search for a second preset sub-device identification code that is the same as the second sub-device identification code in the device identification code set to obtain a searching result;
the determining unit 305 is configured to determine that the device identification code already exists when the search result is that a second preset sub-device identification code identical to the second sub-device identification code is found.
Preferably, referring to fig. 3b, the apparatus may further include: a second acquisition unit 306, a second division unit 307, and a setting unit 308; wherein,
the second obtaining unit 306 is configured to obtain a plurality of preset device identifiers before receiving the search request sent by the terminal;
the second dividing unit 307 is configured to divide the preset device identification code to obtain a first preset sub-device identification code and a second preset sub-device identification code, where the first preset sub-device identification code and the second preset sub-device identification code are combined to form the preset device identification code;
the setting unit 308 is configured to set a corresponding relationship between the first preset sub-device identification code and the second preset sub-device identification code.
The first obtaining unit 303 may specifically include: a judgment subunit 3031 and a first acquisition subunit 3032;
the determining subunit 3031 is configured to determine whether there is a first preset sub-device identification code that is the same as the first sub-device identification code;
the first obtaining sub-unit 3032 is configured to, when the determining sub-unit 3031 determines that the first sub-device identifier is the second sub-device identifier, obtain a device identifier set corresponding to the first sub-device identifier according to a corresponding relationship between the first preset sub-device identifier and the second preset sub-device identifier.
Preferably, referring to fig. 3c, the setting unit 308 specifically includes: a second acquisition sub-unit 3081 and a content setting sub-unit 3082; wherein,
the second obtaining subunit 3081 is configured to obtain a file corresponding to the first preset sub-device identification code;
the content setting sub-unit 3082, configured to identify the second preset sub-device as the content of the file;
the first obtaining subunit 3032 is specifically configured to:
acquiring a file corresponding to the first sub-device identification code;
and extracting the content of the file to obtain a device identification code set corresponding to the first sub-device identification code.
Preferably, the second obtaining subunit 3081 is specifically configured to:
judging whether a file path corresponding to the first preset sub-equipment identification code exists or not;
if so, acquiring a file corresponding to the file path;
if not, generating a corresponding file path according to the first preset sub-equipment identification code, and creating a file corresponding to the file path.
Preferably, referring to fig. 3d, the apparatus may further include: a sorting unit 309;
the sorting unit 309 is configured to, after the content setting subunit 3082 takes the second preset sub-device identification code as the content of the file, before the receiving unit 301 receives the search request sent by the terminal, sort the second preset sub-device identification code in the file according to the size of the number corresponding to the second preset sub-device identification code.
Preferably, the first obtaining subunit 3032 is specifically configured to:
acquiring a file path corresponding to the first sub-device identification code;
judging whether a file path corresponding to the first sub-equipment identification code exists or not;
and if so, acquiring the file corresponding to the file path.
As can be seen from the above, an embodiment of the present invention provides an apparatus for determining an equipment identifier, where a receiving unit 301 is used to receive a search request sent by a terminal, where the search request carries an equipment identifier of the terminal, a first dividing unit 302 divides the equipment identifier according to a preset dividing rule to obtain a first sub-equipment identifier and a second sub-equipment identifier, a first obtaining unit 303 obtains an equipment identifier set corresponding to the first sub-equipment identifier, where the equipment identifier set includes at least one second preset sub-equipment identifier, a searching unit 304 searches for a preset sub-equipment identifier that is the same as the second sub-equipment identifier in the equipment identifier set to obtain a search result, and a determining unit determines that the equipment identifier exists according to the search result; according to the scheme, the equipment identification code of the terminal can be divided into two sub-equipment identification codes, whether the equipment identification code exists is determined by searching the sub-equipment identification code, and compared with the prior art, the memory consumption for searching the equipment identification code can be reduced, so that the memory occupancy rate is reduced.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the steps in the various methods of the above embodiments may be implemented by relevant hardware instructed by a program, where the program may be stored in a computer-readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and during the execution, the flow of the embodiments such as the information distribution method may be included. Among others, the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The method and the apparatus for determining the existence of the device identification code according to the embodiments of the present invention are described in detail above, and each functional unit may be integrated in one processing chip, or each unit may exist alone physically, or two or more units may be integrated in 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 principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (6)
1. A method for determining the presence of a device identification code, comprising:
acquiring a plurality of preset equipment identification codes;
dividing the preset equipment identification code according to a preset division rule to obtain a first preset sub-equipment identification code and a second preset sub-equipment identification code, wherein the first preset sub-equipment identification code and the second preset sub-equipment identification code are combined to form the preset equipment identification code;
when the file path corresponding to the first preset sub-equipment identification code does not exist, generating a corresponding file path according to the first preset sub-equipment identification code, creating a file corresponding to the file path, and taking the second preset sub-equipment identification code as the content of the file;
when a file path corresponding to the first preset sub-device identification code exists, taking the second preset sub-device identification code as the content of a file corresponding to the file path;
receiving a search request sent by a terminal, wherein the search request carries an equipment identification code of the terminal;
dividing the equipment identification code according to the preset division rule to obtain a first sub-equipment identification code and a second sub-equipment identification code, wherein the first sub-equipment identification code and the second sub-equipment identification code are combined to form the equipment identification code;
acquiring a target file path corresponding to the first sub-device identification code;
judging whether a target file path corresponding to the first sub-equipment identification code exists or not;
if so, acquiring a target file corresponding to the target file path, extracting content from the target file, and obtaining an equipment identification code set corresponding to the first sub-equipment identification code, wherein the equipment identification code set comprises at least one second preset sub-equipment identification code;
searching the second preset sub-device identification code which is the same as the second sub-device identification code in the device identification code set to obtain a searching result;
and when the search result is that the second preset sub-equipment identification code which is the same as the second sub-equipment identification code is searched, determining that the equipment identification code exists.
2. The method according to claim 1, wherein the step of using the second predetermined sub-device identification code as the content of the file specifically comprises:
and adding the second preset sub-equipment identification code to the end of the content of the file.
3. The method of claim 1, wherein after the second preset sub-device identification code is used as the content of the file, and before a search request sent by a terminal is received, the search method further comprises:
and sequencing the second preset sub-equipment identification codes in the file according to the number size corresponding to the second preset sub-equipment identification codes.
4. An apparatus for determining the presence of a device identification code, comprising:
the second obtaining unit is used for obtaining a plurality of preset equipment identification codes before receiving the searching request sent by the terminal;
the second dividing unit is used for dividing the preset equipment identification code according to a preset dividing rule to obtain a first preset sub-equipment identification code and a second preset sub-equipment identification code, wherein the first preset sub-equipment identification code and the second preset sub-equipment identification code are combined to form the preset equipment identification code;
the setting unit is used for judging whether a file path corresponding to the first preset sub-equipment identification code exists or not; if so, acquiring a file corresponding to the file path; if not, generating a corresponding file path according to the first preset sub-equipment identification code, and creating a file corresponding to the file path
The setting unit is used for generating a corresponding file path according to the first preset sub-device identification code when the file path corresponding to the first preset sub-device identification code does not exist, creating a file corresponding to the file path, and taking the second preset sub-device identification code as the content of the file; when a file path corresponding to the first preset sub-device identification code exists, taking the second preset sub-device identification code as the content of a file corresponding to the file path;
the device comprises a receiving unit, a searching unit and a processing unit, wherein the receiving unit is used for receiving a searching request sent by a terminal, and the searching request carries a device identification code of the terminal;
the first dividing unit is used for dividing the equipment identification code according to a preset dividing rule to obtain a first sub-equipment identification code and a second sub-equipment identification code, wherein the first sub-equipment identification code and the second sub-equipment identification code are combined to form the equipment identification code;
the first acquisition unit is used for acquiring a target file path corresponding to the first sub-equipment identification code; judging whether a target file path corresponding to the first sub-equipment identification code exists or not; if so, acquiring a target file corresponding to the target file path, extracting content from the target file, and obtaining an equipment identification code set corresponding to the first sub-equipment identification code, wherein the equipment identification code set comprises at least one second preset sub-equipment identification code;
the searching unit is used for searching a second preset sub-device identification code which is the same as the second sub-device identification code in the device identification code set to obtain a searching result;
a determining unit, configured to determine that the device identification code already exists when the search result indicates that the second preset sub-device identification code identical to the second sub-device identification code is found.
5. The apparatus of claim 4, further comprising a sorting unit;
the sorting unit is configured to sort the second preset sub-device identification code in the file according to the size of the number corresponding to the second preset sub-device identification code after the setting unit uses the second preset sub-device identification code as the content of the file and before the receiving unit receives the search request sent by the terminal
6. A computer-readable storage medium storing a computer program for determining the presence of a device identification code, wherein the computer program causes a computer to perform the method of claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511031063.4A CN105653713B (en) | 2015-12-30 | 2015-12-30 | It is a kind of to determine the method and device that EIC equipment identification code is present |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511031063.4A CN105653713B (en) | 2015-12-30 | 2015-12-30 | It is a kind of to determine the method and device that EIC equipment identification code is present |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105653713A CN105653713A (en) | 2016-06-08 |
CN105653713B true CN105653713B (en) | 2017-10-17 |
Family
ID=56490363
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511031063.4A Active CN105653713B (en) | 2015-12-30 | 2015-12-30 | It is a kind of to determine the method and device that EIC equipment identification code is present |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105653713B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105893539B (en) * | 2016-03-31 | 2018-01-19 | 广东欧珀移动通信有限公司 | IMEI number lookup method, device and mobile terminal |
JP7210989B2 (en) * | 2018-10-04 | 2023-01-24 | 富士電機株式会社 | Management server, vending machine, and method for adding device identification information |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101859316B (en) * | 2010-04-29 | 2012-07-11 | 北京无限立通通讯技术有限责任公司 | Method and device for mass file access |
CN103124266B (en) * | 2013-02-07 | 2016-08-31 | 百度在线网络技术(北京)有限公司 | Mobile terminal and carry out the method, system and the cloud server that log in by it |
CN103686667A (en) * | 2013-12-13 | 2014-03-26 | 北京奇虎科技有限公司 | Method and device for inquiring state of terminal |
CN104765657B (en) * | 2015-04-27 | 2019-04-16 | Oppo广东移动通信有限公司 | A kind of data back up method, data reconstruction method and relevant apparatus |
-
2015
- 2015-12-30 CN CN201511031063.4A patent/CN105653713B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105653713A (en) | 2016-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108961052B (en) | Verification method, storage method, device, equipment and medium of block chain data | |
CN109951435B (en) | Equipment identifier providing method and device and risk control method and device | |
CN111031017B (en) | Abnormal business account identification method, device, server and storage medium | |
WO2020233033A1 (en) | Information interaction method, device and storage medium | |
CN105447162B (en) | Group file searching method and device | |
US11789586B2 (en) | Method for displaying view and terminal device | |
CN107748739B (en) | Short message text template extraction method and related device | |
JP2017509069A (en) | Input resource push method, system, computer storage medium and device | |
CN109829073B (en) | Image searching method and device | |
CN108804487A (en) | A kind of method and device of extraction target character | |
CN105653713B (en) | It is a kind of to determine the method and device that EIC equipment identification code is present | |
CN110855812B (en) | Positioning method, device and equipment based on IP address | |
WO2018041036A1 (en) | Keyword searching method, apparatus and terminal | |
CN110266598B (en) | Routing information processing method, device, equipment and readable storage medium | |
CN114338102B (en) | Security detection method, security detection device, electronic equipment and storage medium | |
JP2010140475A (en) | Method, apparatus and computer program for providing input order independent character input mechanism | |
CN111027065B (en) | Leucavirus identification method and device, electronic equipment and storage medium | |
CN103257977B (en) | Obtain the method and device of identification number | |
CN109241360A (en) | The matching process and device and electronic equipment of combining characters string | |
US11323873B2 (en) | Method for wireless fidelity connection and related products | |
CN105653533B (en) | A kind of method and apparatus updating classification associated set of words | |
US20160139819A1 (en) | Computer-readable recording medium, encoding device and encoding method | |
CN106202423A (en) | A kind of file ordering method and apparatus | |
US9176972B1 (en) | Implied M83 names in alternate name generation in directories supporting multiple naming protocols | |
CN109543024B (en) | Text processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: Guangdong Opel Mobile Communications Co., Ltd. |
|
CP01 | Change in the name or title of a patent holder |