CN108063678B - Method and device for generating client identification information - Google Patents

Method and device for generating client identification information Download PDF

Info

Publication number
CN108063678B
CN108063678B CN201610987133.1A CN201610987133A CN108063678B CN 108063678 B CN108063678 B CN 108063678B CN 201610987133 A CN201610987133 A CN 201610987133A CN 108063678 B CN108063678 B CN 108063678B
Authority
CN
China
Prior art keywords
character string
identification
configuration file
client
identification character
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
CN201610987133.1A
Other languages
Chinese (zh)
Other versions
CN108063678A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201610987133.1A priority Critical patent/CN108063678B/en
Publication of CN108063678A publication Critical patent/CN108063678A/en
Application granted granted Critical
Publication of CN108063678B publication Critical patent/CN108063678B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • H04L41/0873Checking configuration conflicts between network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for generating client identification information. Wherein, the method comprises the following steps: generating an identification character string in a configuration file of a client; judging whether the start log contains an identification character string in the configuration file; and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client. The invention solves the technical problems that the file configuration method is complicated and conflicts with other clients easily when the client communicates with the host in the prior art.

Description

Method and device for generating client identification information
Technical Field
The present invention relates to the field of computer communications, and in particular, to a method and an apparatus for generating client identification information.
Background
In the prior art, when the host and the client communicate with each other, firstly, the host needs to generate a unique identity for the client, and then the unique identity is used for configuring the client, so that the client needs to be connected at least twice, the communication process is troublesome, and the communication quality is easily influenced. Second, a host will typically communicate with multiple clients simultaneously, and if the unique id of one client conflicts with the unique ids of other clients, the client will not be able to boot. These problems in the prior art are not conducive to automating the operation of configuration files during host and client communications.
Aiming at the technical problems that the method for configuring the file is complicated and conflicts with other clients easily occur when the client communicates with the host in the prior art, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating client identification information, which are used for at least solving the technical problems that a file configuration method is complicated and conflicts with other clients easily when the client communicates with a host in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method of generating client identification information, the method including: generating an identification character string in a configuration file of a client; judging whether the start log contains an identification character string in the configuration file; and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client.
There is further provided, according to an aspect of the embodiments of the present invention, an apparatus for generating client identification information, the apparatus including: the generating module is used for generating an identification character string in a configuration file of the client; the analysis module is used for judging whether the start log contains the identification character string in the configuration file; and the transmission module is used for sending the identification character string in the configuration file to the database system under the condition that the start log does not contain the identification character string in the configuration file so as to acquire identification information for uniquely identifying the client.
In the embodiment of the invention, the identification character string in the configuration file of the client is generated by adopting a mode of generating the identification information of the client; judging whether the start log contains an identification character string in the configuration file; and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client. The purpose of automatically generating the identity marks by the client is achieved, the technical effect of improving the communication efficiency of the client and the host is achieved, and the technical problems that a file configuration method is complicated and conflicts with other clients easily when the client and the host communicate in the prior art are solved.
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 flow diagram of a method of generating client identifying information, in accordance with an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative method of generating client identifying information, in accordance with an embodiment of the present invention;
FIG. 3 is a flow diagram of an alternative method of generating client identifying information in accordance with an embodiment of the present invention;
FIG. 4 is a flow diagram of an alternative method of generating client identifying information in accordance with an embodiment of the present invention;
FIG. 5 is a flow diagram of an alternative method of generating client identifying information, in accordance with an embodiment of the present invention;
FIG. 6 is a flow diagram of an alternative method of generating client identifying information in accordance with an embodiment of the present invention;
FIG. 7 is a schematic diagram of an apparatus for generating client identifying information, according to an embodiment of the invention;
FIG. 8 is a schematic diagram of an alternative apparatus for generating client identifying information, according to an embodiment of the invention;
FIG. 9 is a schematic diagram of an alternative apparatus for generating client identifying information, according to an embodiment of the invention;
FIG. 10 is a schematic diagram of an alternative apparatus for generating client identifying information, according to an embodiment of the invention;
FIG. 11 is a schematic diagram of an alternative apparatus for generating client identifying information, in accordance with embodiments of the present invention; and
fig. 12 is a schematic diagram of an alternative apparatus for generating client identification information 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 accordance with an embodiment of the present invention, there is provided an embodiment of a method of generating client identifying information, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a method for generating client identification information according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, generating an identification character string in the configuration file of the client.
In step S102, the client may generate an identification string, and when communicating with the host, the client may autonomously generate the identification string in the configuration file, and the client may acquire current time information, MAC address, and identification information of the client device, convert the acquired current time information, MAC address, and identification information into the identification string, write the converted identification string into the configuration file of the client, and after autonomously generating the identification string, may select to restart the client, and execute the next step.
The client may be a slave associated with the master, and the master and the slave may be interchanged during communication between the slave and the master.
Step S104, judging whether the start log contains the identification character string in the configuration file.
In step S104, after the client is restarted, the start log may be read, and whether the configuration file of the start log client includes the identifier character string in the client configuration file may be determined by reading the start log, so as to obtain whether a preset field matching the identifier character string exists in at least one character string included in the determination result. And if the start log contains the identification character string in the client configuration file, which indicates that the identification character string is not unique and possibly conflicts with other clients, the identification character string in the configuration file of the client is regenerated.
And step S106, under the condition that the start log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client.
In step S106, in a case that the start log does not include the identification character string in the configuration file, the log may be selected to be continuously tracked within a preset time, and if no conflicting identification character string is monitored within the preset time, the identification character string in the configuration file may be sent to the database system to obtain the identification information for uniquely identifying the client.
In case the start log does not contain the identification string in the configuration file, step S106 sends the identification string in the configuration file to the database system, and the database system obtains the identification string sent in the request by receiving the communication protocol request. Wherein the communication protocol request includes at least: HTTP POST. The database system can analyze the received identification character string to obtain the analyzed analysis information of the first character string. The parsing information includes at least one of: IP address, host name, and identification information. After the analysis information is obtained, the corresponding server record file can be inquired in the database system according to the IP address and/or the host name, and the identification information obtained by analysis is stored in the corresponding field of the record.
It should be noted that, steps S102 to S106 provided in the first embodiment of the present application may be executed on a client terminal, and in the implementation process, the client in the above embodiment may be a slave that communicates with a master, and the above embodiment will be described in detail below by taking the slave communicating with the master as an example.
When the slave communicates with the master, the slave may obtain current time information and convert the obtained current time information into an identification character string, where the identification character string may be a 20-bit string, for example: saltadalady in used. The identifier string obtained by conversion may be written into a configuration file of the slave, and after the identifier string in the configuration file of the client is generated, the slave may be restarted to update the identifier string information in the configuration file in the slave. After the slave computer is started, whether the identification character string saltadalaready in used in the client configuration file appears in the starting log or not can be analyzed by reading the starting log of salt. If the start log contains the identification character string stochas in used in the client configuration file, which indicates that the identification character string is not unique in the start log and may conflict with the identification character strings of other slave machines, the identification character string in the configuration file of the client needs to be regenerated. In the case that the start log does not contain the identification string stoltid available in used in the client configuration file, the start log may be selected to continue to track for 30 seconds if no conflicting identification string is detected within 30 seconds. The slave reads the configuration file, reads the configuration information of the row where the identification character string is located in the configuration file, and generates a first character string according to the configuration information of the row, wherein the first character string at least comprises one of the following contents: IP address, host name and identification information, and sends the first character string to the database system. The database system receives and analyzes the first character string to obtain the analyzed analysis information of the first character string, wherein the analysis information of the first character string comprises at least one of the following information: IP address, host name, and identification information.
In the embodiment of the invention, the identification character string in the configuration file of the client is generated by adopting a mode of generating the identification information of the client; judging whether the start log contains an identification character string in the configuration file; and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client. The purpose of automatically generating the identity marks by the client is achieved, the technical effect of improving the communication efficiency of the client and the host is achieved, and the technical problems that a file configuration method is complicated and conflicts with other clients easily when the client and the host communicate in the prior art are solved.
Based on the schemes provided in the above steps S102 to S106, the present application also provides the following preferred schemes:
optionally, fig. 2 is a flowchart of an optional method for generating client identification information according to an embodiment of the present invention, and as shown in fig. 2, when step S102 is executed, an identification character string in a configuration file of a client is generated, where the method includes the following steps:
step S202, current time information of the client is obtained.
Step S204, converting the current time information into an identification character string.
Step S206, writing the identification character string into the configuration file of the client.
In the above steps S202 to S206, when the client communicates with the host, the client may obtain current time information by obtaining the current time, and convert the obtained time information into an identification string, where the identification string may be a 20-bit string. And writing the converted identification character string into a configuration file, and restarting the client after acquiring the identification character string in the configuration file to be detected.
In an alternative embodiment, which is described below by taking the salt-termination client as an example, on the salt-termination client, a generating module may be deployed, generate a 20-bit string based on the current time point, write the string as an identifier string into a configuration file of the salt-termination client, restart the salt-termination client, and execute the next step.
Optionally, fig. 3 is a flowchart of an optional method for generating client identification information according to an embodiment of the present invention, and as shown in fig. 3, the method includes the following steps:
in step S303, when the start log includes the identification character string in the configuration file, the step of generating the identification character string in the configuration file of the client in S301 is executed again.
Step S305, under the condition that the start log does not contain the identification character string in the configuration file, determining whether the identification character string is monitored within a preset time.
In this embodiment, after the start log does not contain the identification character string in the configuration file, the method further includes a step of determining whether the identification character string is detected within a preset time.
In the above steps S303 to S305, after the client is started, the start log of salt may be read. And judging whether the identification character string consistent with the identification character string exists in the starting log or not. And under the condition that the start log contains the identification character string in the configuration file, re-executing the step S102, namely generating the identification character string in the configuration file of the client, and under the condition that the start log does not contain the identification character string in the configuration file, judging whether the identification character string is monitored or not within preset time. The preset time may be 30 seconds, that is, the start log is selected to be continuously tracked for 30 seconds to determine whether the identification character string is monitored.
In an alternative embodiment, which will be described below by taking the salt-minus client as an example, after the salt-minus client is started, reading whether an identification string occurs in the start log of the salt may be started, where the identification string may be but is not limited to a "stored available in used" field, and if a consistent identification string occurs, step S102 may be repeated; if the same identification character string does not appear, the starting log is selected to be continuously tracked for 30 seconds, and whether the identification character string is monitored or not is judged.
Optionally, fig. 3 is a flowchart of an optional method for generating client identification information according to an embodiment of the present invention, and as shown in fig. 3, after step S305 is executed, that is, after it is determined whether a preset field is monitored within a preset time, the method further includes the following steps:
step S307, if the identification character string is not monitored within the preset time, executing the step of sending the identification character string in the configuration file to the database system.
In the step S307, a monitoring time may be preset, whether the identification character string in the configuration file occurs within the preset time is monitored, and if the identification character string is not monitored within the preset time, the step of sending the identification character string in the configuration file to the database system may be performed.
In an alternative embodiment, which is described below by taking a salt-termination client as an example, if the predetermined character string of the identification character string does not appear, the start log configuration file is continuously monitored for 30 seconds, and then it is determined whether the predetermined character string is detected by the identification character string. Under the condition that no conflict identification character string log is detected after monitoring for 30 seconds, the steps of sending the identification character string in the configuration file to the database system and sending the identification character string in the configuration file to the database can be carried out.
Optionally, fig. 4 is a flowchart of an optional method for generating client identification information according to an embodiment of the present invention, and as shown in fig. 4, in step S106, that is, in a case that the start log does not contain an identification character string in the configuration file, the identification character string in the configuration file is sent to the database system to obtain identification information for uniquely identifying the client, the method includes the following steps:
step S402, reading the configuration information of the line where the identification character string is located in the configuration file.
Step S404, generating a first character string according to the configuration information.
Step S406, sending the first character string to the database system.
In the above steps S402 to S406, the client reads the configuration file to obtain the configuration information of the row in the configuration file, where the identification character string is located, and generates the first character string according to the configuration information of the row, where the first character string at least includes one of the following: IP address, host name and identification character string, and sends the first character string to database system.
In an alternative embodiment, taking the salt-termination client as an example to be described below, the salt-termination client obtains configuration information identifying a row where a character string is located in a configuration file by reading the configuration file, and generates a first character string, where the first character string may be a json string, and the first character string includes at least one of the following: ip, a host name and an identification character string, and sending the first character string to a database system, wherein the first character string may be uploaded to the database system through HTTPPOST. Wherein the json string may be, but is not limited to, in the form of: { 'ip': x.x.x.x ',' hostname ': xx-xx-xx', 'saltid': 'xxxxxxxxx' }.
Optionally, fig. 5 is a flowchart of an optional method for generating client identification information according to an embodiment of the present invention, and as shown in fig. 5, in step S106, that is, in a case that the start log does not contain an identification character string in the configuration file, the method sends the identification character string in the configuration file to the database system to obtain identification information for uniquely identifying the client, further includes the following steps:
step S502, the database system receives the first character string and parses the first character string.
Step S504, the database system obtains the analyzed analysis information of the first character string, where the analysis information of the first character string includes at least one of the following: IP address, host name, and identification information.
In the above steps S502 to S504, the database system obtains the analysis information of the analyzed first character string by receiving and analyzing the first character string, so as to achieve the purpose of analyzing the identification character string in the client, where the analysis information of the first character string includes at least one of the following: IP address, host name, and identification information.
In an alternative embodiment, which is described below by taking a salt-termination client as an example, the database system may parse the data information, which may be receiving a communication protocol request, to obtain an identification string sent in the protocol. Wherein the communication protocol request includes at least: HTTP POST. At least one of the following is obtained by analyzing the json string sent in the request: IP address, host name, and identification information.
Optionally, fig. 6 is a flowchart of an optional method for generating client identification information according to an embodiment of the present invention, and as shown in fig. 6, in step S504, the database system obtains parsing information of the parsed first character string, where the parsing information of the first character string includes at least one of: IP address, host name and identification information, including the following steps:
step S602, the database system queries a corresponding record file according to the IP address and the host name.
Step S604, the database system stores the identification information in the corresponding field of the record file.
In the above steps S602 to S604, after obtaining the analysis information, the database system may query the corresponding server record in the database according to the IP address and/or the host name in the analysis information, and store the identification information in the analyzed identification string into the corresponding field of the record.
In an alternative embodiment, the corresponding server record is queried in the database system according to the IP address and/or host name, and the saltid is stored in the corresponding field of the record to complete the record.
Example 2
According to an embodiment of the present invention, there is further provided an embodiment of a method of generating client identification information.
Fig. 7 is a schematic diagram of an apparatus for generating client identification information according to an embodiment of the present invention, as shown in fig. 7, the apparatus includes: a generation module 70, an analysis module 72, a transmission module 74.
Wherein, the generating module 70 is configured to generate an identification character string in the configuration file of the client; an analysis module 72, configured to determine whether the start log includes an identification character string in the configuration file; and a transmitting module 74, configured to send the identification character string in the configuration file to the database system to obtain the identification information for uniquely identifying the client in case the start log does not contain the identification character string in the configuration file.
As shown in fig. 7, when the slave communicates with the master, the slave may deploy generating module 70 obtains current time information and converts the obtained current time information into an identification character string, where the identification character string may be a 20-bit character string, for example: saltadalady in used. The identifier string obtained by conversion may be written into a configuration file of the slave, and after the identifier string in the configuration file of the client is generated, the slave may be restarted to update the identifier string information in the configuration file in the slave. After the slave is started, the analysis module 72 may analyze whether the identification string saltadalaady in used in the client configuration file appears in the start log by reading the start log of salt. If the start log contains the identification character string stochas in used in the client configuration file, which indicates that the identification character string is not unique in the start log and may conflict with the identification character strings of other slave machines, the identification character string in the configuration file of the client needs to be regenerated. In the case where the start log does not contain the identification string stoltid available in used in the client configuration file, the transfer module 74 may choose to continue tracking the start log for 30 seconds if no conflicting identification string is detected within 30 seconds. The slave reads the configuration file, reads the configuration information of the row where the identification character string is located in the configuration file, and generates a first character string according to the configuration information of the row, wherein the first character string at least comprises one of the following contents: IP address, host name and identification information, and sends the first character string to the database system. The database system receives and analyzes the first character string to obtain the analyzed analysis information of the first character string, wherein the analysis information of the first character string comprises at least one of the following information: IP address, host name, and identification information.
In an optional embodiment, the module generates the client identification information by generating an identification character string in a configuration file of the client; judging whether the start log contains an identification character string in the configuration file; and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client. The purpose of automatically generating the identity marks by the client is achieved, the technical effect of improving the communication efficiency of the client and the host is achieved, and the technical problems that a file configuration method is complicated and conflicts with other clients easily when the client and the host communicate in the prior art are solved.
It should be noted that the generating module 70, the analyzing module 72, and the transmitting module 74 correspond to steps S102 to S106 in the first embodiment, and the modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Optionally, fig. 8 is a schematic diagram of an apparatus for optionally generating client identification information according to an embodiment of the present invention, as shown in fig. 8, in an alternative embodiment, the generating module 70 includes: a first acquisition unit 701, a conversion unit 703 and a writing unit 705. A first obtaining unit 701, configured to obtain current time information of a client; a conversion unit 703, configured to convert the current time information into an identification character string; a writing unit 705 for writing the identification string into the configuration file of the client.
It should be noted here that the first obtaining unit 701, the converting unit 703, and the writing unit 705 correspond to steps S202 to S206 in the first embodiment, and the modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Optionally, fig. 9 is a schematic diagram of an optional apparatus for generating client identification information according to an embodiment of the present invention, as shown in fig. 9, in an optional embodiment, the apparatus further includes: a first execution module 90, a second execution module 92.
The first execution module 90 is configured to, in a case that the start log includes an identification character string in the configuration file, invoke the generation module 70 to regenerate the identification character string in the configuration file of the client; the second executing module 92 is configured to, in a case that the start log does not include the identification character string in the configuration file, determine whether the identification character string is monitored within a preset time.
It should be noted that the first executing module 90 and the second executing module 92 correspond to steps S302 to S304 in the first embodiment, and the modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Optionally, the second executing module 92 is further configured to: in the case that the identification string is not monitored within the preset time, the transfer module 74 is called to send the identification string in the configuration file to the database system.
It should be noted that the execution unit 921 corresponds to the step S307 in the first embodiment, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Optionally, fig. 10 is a schematic diagram of an alternative apparatus for generating client identification information according to an embodiment of the present invention, and as shown in fig. 10, in an alternative embodiment, the transmitting module 74 includes: reading unit 741, generating unit 743, transmitting unit 745.
The reading unit 741 is configured to read configuration information of a row in which the identification character string is located in the configuration file; a generating unit 743 for generating a first character string according to the configuration information; the transmitting unit 745 sends the first string to the database system.
It should be noted here that the reading unit 741, the generating unit 743 and the transmitting unit 745 correspond to steps S402 to S406 in the first embodiment, and the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Optionally, fig. 11 is a schematic diagram of an optional apparatus for generating client identification information according to an embodiment of the present invention, as shown in fig. 11, in an optional embodiment, the transmitting module 74 further includes: an analysis unit 747 and a second acquisition unit 749.
The parsing unit 747 is configured to receive the first character string by the database system and parse the first character string; a second obtaining unit 749, configured to obtain, by the database system, analysis information of the analyzed first character string, where the analysis information of the first character string includes at least one of the following: IP address, host name, and identification information.
It should be noted that the analyzing unit 747 and the second acquiring unit 749 correspond to steps S502 to S504 in the first embodiment, and the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
Optionally, fig. 12 is a schematic diagram of an optional apparatus for generating client identification information according to an embodiment of the present invention, as shown in fig. 12, in an optional embodiment, the second obtaining unit 763 includes: a third acquisition unit 7631 and a storage unit 7633.
The third obtaining unit 7631 is configured to query, by the database system, a corresponding record file according to the IP address and the host name; a storage unit 7633, configured to store the identification information in a corresponding field of the record file by the database system.
It should be noted here that the third acquiring unit 7631 and the storing unit 7633 correspond to steps S602 to S604 in the first embodiment, and the units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of an apparatus may be implemented in a computer system such as a set of computer-executable instructions.
The above-mentioned device includes: the generation module, the analysis module, the transmission module, the storage unit, the reading unit, the analysis module, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory. The configuration file, the preset first character segment string, the identification character string, the identification information, and the like may be stored in the memory.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to one or more than one, and the text content is analyzed by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The present application further provides an embodiment of a computer program method, which, when being executed on a data processing device, is adapted to perform program code initializing method steps comprising: generating an identification character string in a configuration file of a client; judging whether the start log contains an identification character string in the configuration file; and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to the database system so as to acquire identification information for uniquely identifying the client.
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.
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 embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit may be a division of a logic function, and an actual implementation may have another division, 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 may not be 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 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 integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a 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 instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: 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.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (10)

1. A method for generating client identification information, applied to a client, comprising:
generating an identification character string in a configuration file of a client;
judging whether the start log contains the identification character string in the configuration file;
and under the condition that the starting log does not contain the identification character string in the configuration file, sending the identification character string in the configuration file to a database system so as to acquire identification information for uniquely identifying the client.
2. The method of claim 1, wherein generating an identification string in a configuration file of a client comprises:
acquiring current time information of the client;
converting the current time information into the identification character string;
and writing the identification character string into a configuration file of the client.
3. The method of claim 1, wherein after determining whether the start-up log contains the identification string in the configuration file, the method further comprises:
under the condition that the starting log contains the identification character string in the configuration file, the step of generating the identification character string in the configuration file of the client is executed again;
and under the condition that the start log does not contain the identification character string in the configuration file, judging whether the identification character string is monitored or not within preset time.
4. The method of claim 3, further comprising:
and under the condition that the identification character string is not monitored within the preset time, executing the step of sending the identification character string in the configuration file to the database system.
5. The method of claim 1, wherein in the case that the startup log does not contain the identification string, sending the identification string in the configuration file to a database system comprises:
reading the configuration information of the line where the identification character string is located in the configuration file;
generating a first character string according to the configuration information;
and sending the first character string to the database system.
6. The method of claim 5, wherein in the event that the startup log does not contain the identification string, sending the identification string in the configuration file to a database system to obtain identification information for uniquely identifying the client, comprises:
the database system receives a first character string and analyzes the first character string;
the database system obtains the analyzed analysis information of the first character string, wherein the analysis information of the first character string comprises at least one of the following items: an IP address, a host name, and the identification information.
7. The method of claim 6, wherein the database system obtaining the parsed information of the parsed first string comprises:
the database system queries corresponding record files according to the IP address and the host name;
and the database system stores the identification information into a corresponding field of the record file.
8. An apparatus for generating client identification information, applied to a client, comprising:
the generating module is used for generating an identification character string in a configuration file of the client;
the analysis module is used for judging whether the start log contains the identification character string in the configuration file;
and the transmission module is used for sending the identification character string in the configuration file to a database system under the condition that the start log does not contain the identification character string in the configuration file so as to acquire identification information for uniquely identifying the client.
9. The apparatus of claim 8, wherein the generating module comprises:
a first acquisition unit configured to acquire current time information of the client;
the conversion unit is used for converting the current time information into the identification character string;
and the writing unit is used for writing the identification character string into the configuration file of the client.
10. The apparatus of claim 8, further comprising:
the first execution module is used for calling the generation module to regenerate the identification character string in the configuration file of the client under the condition that the starting log contains the identification character string in the configuration file;
and the second execution module is used for judging whether the identification character string is monitored within preset time under the condition that the start log does not contain the identification character string in the configuration file.
CN201610987133.1A 2016-11-09 2016-11-09 Method and device for generating client identification information Active CN108063678B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610987133.1A CN108063678B (en) 2016-11-09 2016-11-09 Method and device for generating client identification information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610987133.1A CN108063678B (en) 2016-11-09 2016-11-09 Method and device for generating client identification information

Publications (2)

Publication Number Publication Date
CN108063678A CN108063678A (en) 2018-05-22
CN108063678B true CN108063678B (en) 2021-05-14

Family

ID=62137385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610987133.1A Active CN108063678B (en) 2016-11-09 2016-11-09 Method and device for generating client identification information

Country Status (1)

Country Link
CN (1) CN108063678B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905475A (en) * 2005-07-28 2007-01-31 华为技术有限公司 Method and system for initial configuration of managed apparatus
CN101222377A (en) * 2007-11-23 2008-07-16 深圳国人通信有限公司 Method and device for processing slave machine parameter in distributed master-salve machine communication
CN104410547A (en) * 2014-12-03 2015-03-11 合肥工大高科信息科技股份有限公司 Address conflict detection method for distributed control system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8086698B2 (en) * 2006-06-02 2011-12-27 Google Inc. Synchronizing configuration information among multiple clients
CN105471594B (en) * 2014-06-04 2019-04-23 华为技术有限公司 The method and apparatus for managing resource
CN105589856B (en) * 2014-10-21 2019-04-26 阿里巴巴集团控股有限公司 Daily record data processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1905475A (en) * 2005-07-28 2007-01-31 华为技术有限公司 Method and system for initial configuration of managed apparatus
CN101222377A (en) * 2007-11-23 2008-07-16 深圳国人通信有限公司 Method and device for processing slave machine parameter in distributed master-salve machine communication
CN104410547A (en) * 2014-12-03 2015-03-11 合肥工大高科信息科技股份有限公司 Address conflict detection method for distributed control system

Also Published As

Publication number Publication date
CN108063678A (en) 2018-05-22

Similar Documents

Publication Publication Date Title
CN109951435B (en) Equipment identifier providing method and device and risk control method and device
CN107133086B (en) Task processing method, device and system based on distributed system
US20160239540A1 (en) Data Query Method and Apparatus, Server, and System
CN105791246B (en) Verification method, the apparatus and system of verification information
CN106571942B (en) Configuration data updating method, client and server
CN110445792B (en) Verification code generation method and verification code login system
CN115208951B (en) Request processing method, request processing device, electronic equipment and computer readable storage medium
CN111355802B (en) Information pushing method and device
CN109451078B (en) Transaction processing method and device under distributed architecture
CN106469078A (en) A kind of upgrade method of intelligent appliance and device
CN111353136B (en) Method and device for processing operation request
CN109802842B (en) Application topology generation method and related equipment
CN113507471A (en) Method, device, router and storage medium for acquiring terminal system type
CN111935104A (en) Internet of things equipment illegal access detection method and device and computer equipment
WO2012151978A1 (en) Method and device for recognizing port properties of data card
CN111506496A (en) Test data acquisition method and device, electronic equipment and storage medium
CN108845995B (en) Data processing method, data processing apparatus, storage medium, and electronic apparatus
CN105592169A (en) Terminal identification method and terminal identification device
CN108063678B (en) Method and device for generating client identification information
CN110166823B (en) Screen projection method and related device
CN106161452A (en) The sending method of identifying code and device
CN110765089A (en) Distributed equipment and log recording method, device and storage medium thereof
CN110830263A (en) Automatic login method and device for vehicle-mounted system
CN107483294B (en) Method and device for monitoring network request
CN113992739B (en) Local area network OTA firmware upgrading device, method and system

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant