CN104468265A - Method and device for detecting online states of local area network terminals - Google Patents

Method and device for detecting online states of local area network terminals Download PDF

Info

Publication number
CN104468265A
CN104468265A CN201410666122.4A CN201410666122A CN104468265A CN 104468265 A CN104468265 A CN 104468265A CN 201410666122 A CN201410666122 A CN 201410666122A CN 104468265 A CN104468265 A CN 104468265A
Authority
CN
China
Prior art keywords
terminal
online
response
record
present
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.)
Pending
Application number
CN201410666122.4A
Other languages
Chinese (zh)
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 CN201410666122.4A priority Critical patent/CN104468265A/en
Publication of CN104468265A publication Critical patent/CN104468265A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and device for detecting the online states of local area network terminals. The method for detecting the online states of the local area network terminals comprises the steps that a transmission request sent by a first terminal and used for transmitting a data packet is obtained; testing data are sent to all second terminals in the network where the first terminal is located by means of a broadcast packet which is obtained in advance, wherein the second terminals include all the terminals, except a terminal used for sending the testing data, in the network; whether the second terminals are online or not is determined according to responses of the second terminals. By the adoption of the method and device for detecting the online states of the local area network terminals, the problem that in the prior art, a long time is consumed when a method for detecting whether a server is online or not is adopted is solved, and then the effect of shortening the time spent in detecting whether the terminals are online or not is achieved.

Description

The detection method of local area network terminal presence and device
Technical field
The present invention relates to internet arena, in particular to a kind of detection method and device of local area network terminal presence.
Background technology
When the server in Intranet is by server message block (Server Message Block, i.e. SMB) protocol transmission data time, Windows Authentication must be carried out for the purpose of safety, if can pass through by normal authentication, then the time used is shorter, if but authentication failed, then have a series of retry mechanism, repeatedly retry can occupying system resources, and retry is unsuccessful will cause time-out error, makes the processing speed of data transfer task slow especially.
If just from 1 station server obtain data (as, download file), then the processing speed impact of authentication failed on overall task may be less, but when obtaining data from the multiple servers in Intranet, the time meeting that authentication failed consumes affect the overall time of deal with data transformation task greatly.Existing settling mode is before by SMB protocol transmission data, by Internet Control Message Protocol (Internet Control Message Protocol, i.e. ICMP) or a TCP is carried out to 445 ports of server, whether the server detected in Intranet is online, scanning required time is of a specified duration, causes the length consuming time of whole data transfer task.
For the problem detecting the whether online method of server length consuming time in correlation technique, at present effective solution is not yet proposed.
Summary of the invention
Main purpose of the present invention is the detection method and the device that provide a kind of local area network terminal presence, to solve in prior art the problem of the method detecting the whether online length consuming time of server.
To achieve these goals, according to an aspect of the present invention, a kind of detection method of local area network terminal presence is provided.
Detection method according to the present invention comprises: obtain the transmission request for transmitting packet that first terminal sends; Use the broadcast packet obtained in advance to send test data to each second terminal in the network at first terminal place, wherein, each second terminal comprises all terminals in network except sending the terminal of test data; Determine that whether the second terminal is online according to the response of each the second terminal.
Further, determine whether the second terminal comprises online according to the response of each the second terminal: after sending test data to each second terminal, detect the response whether receiving the second terminal in Preset Time; If receive the response of the second terminal in Preset Time, then determine that the second terminal is in presence; If do not receive the response of the second terminal in Preset Time, then determine that the second terminal is in not presence.
Further, after determining that according to the response of each the second terminal the second terminal is whether online, detection method also comprises: the presence or the not presence that record the second terminal, wherein, if determine, the second terminal is in presence, then use the state of the first identifier marking second terminal; If determine, the second terminal is in not presence, then use the state of the second identifier marking second terminal.
Further, record the second terminal presence or not presence comprise: obtain the terminal set of request data transfer bag in transmission request; Judge whether the second terminal is present in terminal set; If the second terminal is present in terminal set, then record presence or the not presence of the second terminal; If the second terminal is not present in terminal set, then do not record presence or the not presence of the second terminal.
Further, record second terminal presence or not after presence, detection method also comprises: if the second terminal being present in terminal set is in not presence, then generate the notification message that the second identifier is corresponding; Notification message is sent to first terminal with the form of window message.
Further, record the second terminal presence or not presence also comprise: record the IP address of the second terminal, the presence of the tested port numbers of the second terminal and the second terminal or not presence, generate destination file, wherein, tested port numbers is the port numbers of the tested port of test data test.
To achieve these goals, according to a further aspect in the invention, a kind of checkout gear of local area network terminal presence is provided.
Checkout gear according to the present invention comprises: the first acquisition module, for obtaining the transmission request for transmitting packet that first terminal sends; First sending module, for using the broadcast packet obtained in advance to send test data to each second terminal in the network at first terminal place, wherein, each second terminal comprises all terminals in network except sending the terminal of test data; According to the response of each the second terminal, first determination module, for determining that whether the second terminal is online.
Further, the first determination module comprises: detection module, for after sending test data to each second terminal, detects the response whether receiving the second terminal in Preset Time; First determines submodule, for receiving the response of the second terminal in Preset Time, determines that the second terminal is in presence; Second determines submodule, for not receiving the response of the second terminal in Preset Time, determines that the second terminal is in not presence.
Further, checkout gear also comprises: logging modle, for after determining that according to the response of each the second terminal whether the second terminal is online, record presence or the not presence of the second terminal, wherein, if determine, the second terminal is in presence, then use the state of the first identifier marking second terminal; If determine, the second terminal is in not presence, then use the state of the second identifier marking second terminal.
Further, logging modle comprises: the second acquisition module, for obtaining the terminal set of request data transfer bag in transmission request; Judge module, for judging whether the second terminal is present in terminal set; First record sub module, for when the second terminal is present in terminal set, records presence or the not presence of the second terminal; Second determination module, for determining when the second terminal is not present in terminal set, does not record presence or the not presence of the second terminal.
Further, checkout gear also comprises: generation module, for the presence in record second terminal or not after presence, when the second terminal being present in terminal set be in not presence, generate the notification message that the second identifier is corresponding; Second sending module, for being sent to first terminal by notification message with the form of window message.
Further, logging modle also comprises: the second record sub module, for recording the IP address of the second terminal, the presence of the tested port numbers of the second terminal and the second terminal or not presence, generate destination file, wherein, tested port numbers is the port numbers of the tested port of test data test.
Pass through the embodiment of the present invention, get that first terminal sends for transmit packet transmission request after, and before the operation of execution data packet transmission, the mode of broadcast packet is sent by all terminals in the network to first terminal place except sending the terminal of broadcast packet, detect each terminal whether online, with when follow-up execution data packet transmission operates, only connect online terminal, authentication failed when avoiding connection not online terminal and the mistake that causes, reduce the possibility of authentication failed, shorten the processing time of whole data packet transmission task.In the above-described embodiments, whether online by the terminal in broadcast packet Sampling network, carry out TCP without the need to the shared port (being 445 ports in the present embodiment) to all terminals, decrease the time whether sense terminals is online.By the present invention, solve in prior art the problem detecting the whether online method of server length consuming time, and then reach the effect reducing the sense terminals whether online time.
Accompanying drawing explanation
The accompanying drawing forming a application's part is used to provide a further understanding of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the detection method of local area network terminal presence according to the embodiment of the present invention;
Fig. 2 is the flow chart of the detection method of a kind of optional local area network terminal presence according to the embodiment of the present invention;
Fig. 3 is the schematic diagram of a kind of optional destination file form according to the embodiment of the present invention; And
Fig. 4 is the schematic diagram of the checkout gear of local area network terminal presence according to the embodiment of the present invention.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
As shown in Figure 1, this detection method comprises following step S102 to step S106:
Step S102, obtains the transmission request for transmitting packet that first terminal sends.
Step S104, uses the broadcast packet obtained in advance to send test data to each second terminal in the network at first terminal place.
Wherein, each second terminal comprises all terminals in network except sending the terminal of test data.
According to the response of each the second terminal, step S106, determines that whether the second terminal is online.
Particularly, obtain that first terminal sends for transmit packet transmission request after, test data is sent to each second terminal in the network at this first terminal place by the broadcast packet obtained in advance, and determine that whether it is online according to the response of each the second terminal, if the second terminal is online, then can according to transmission request to its transmission packet; If the second terminal is not online, then can not transmit packet to it.
Pass through the embodiment of the present invention, get that first terminal sends for transmit packet transmission request after, and before the operation of execution data packet transmission, the mode of broadcast packet is sent by all terminals in the network to first terminal place except sending the terminal of broadcast packet, detect each terminal whether online, with when follow-up execution data packet transmission operates, only connect online terminal, authentication failed when avoiding connection not online terminal and the mistake that causes, reduce the possibility of authentication failed, shorten the processing time of whole data packet transmission task.In the above-described embodiments, whether online by the terminal in broadcast packet Sampling network, carry out TCP without the need to the shared port (being 445 ports in the present embodiment) to all terminals, decrease the time whether sense terminals is online.By the present invention, solve in prior art the problem detecting the whether online method of server length consuming time, and then reach the effect reducing the sense terminals whether online time.
Above-mentioned first terminal and the second terminal can be all Windows system is installed can by server message block (Server Message Block, i.e. SMB) equipment of protocol transmission data, this equipment can be server, computer, notebook and intelligent terminal etc.; First terminal and the second terminal are positioned at same local area network (LAN).
According to the abovementioned embodiments of the present invention, determine whether the second terminal can comprise online according to the response of each the second terminal: after sending test data to each second terminal, detect the response whether receiving the second terminal in Preset Time; If receive the response of the second terminal in Preset Time, then determine that the second terminal is in presence; If do not receive the response of the second terminal in Preset Time, then determine that the second terminal is in not presence.
Particularly, the test data that each second terminal can use broadcast packet to send by its tested port accepts, if the second terminal opens tested port (the data sharing port namely in above-described embodiment, as 445 ports), then this second terminal is after by tested port accepts to test data, the response to this test data can be returned, if first terminal receives the response of this second terminal in Preset Time, then can determine that this second terminal is in presence.If the tested port of the second terminal is not in opening, then this second terminal may postpone the response of test data or not respond test data, if the second end delay response test data, then the operating lag that receives of first terminal, determines that the second terminal is in not presence; If the second terminal is response test data not, then first terminal cannot receive the response of the second terminal, also can determine that the second terminal is in not presence.
In the above-described embodiment, test data is sent by all terminals of broadcast packet in network except sending the terminal of broadcast packet, and detect the response whether receiving each terminal in Preset Time, the presence of each terminal is determined according to testing result, without the need to carrying out TCP to the tested port of all terminals in network, decrease the time whether each terminal detected in local area network (LAN) is online.
Further, after determining that according to the response of each the second terminal whether the second terminal is online, detection method can also comprise: the presence or the not presence that record the second terminal, wherein, if determine, the second terminal is in presence, then use the state of the first identifier marking second terminal; If determine, the second terminal is in not presence, then use the state of the second identifier marking second terminal.
Particularly, if the second terminal is in presence, namely detects that the second terminal opens tested port, then use the presence of this second terminal of the first identifier record, to represent the tested port open of this second terminal, the transmission of packet can be carried out with it; If the second terminal is in not presence, namely detect that the tested port of the second terminal is not opened, then use the not presence of this second terminal of the second identifier record, to represent that the tested port of this second terminal is not opened, the transmission of packet can not be carried out with it.
Such as, after the transmission request receiving main frame, by the broadcast host (this broadcast host can be any main frame of local area network (LAN)) being arranged in same local area network (LAN) with main frame, the test data of broadcast packet is sent to other Servers-alls (comprising the main frame sending and transmit and ask) of local area network (LAN), 445 ports are opened with which server detected in this local area network (LAN), if server opens 445 ports, then use the presence of first this server of identifier record (the first identifier is as shown in Figure 3 1); If server does not open 445 ports, then use the not presence of second this server of identifier record (the second identifier is as shown in Figure 3 0).
Introduce the above embodiment of the present invention in detail below in conjunction with Fig. 2, as shown in Figure 2, this detection method can comprise:
Step S202, receives the transmission request for transmitting packet.
Wherein, the IP address of the second terminal of request data transfer bag can be carried in the transmission request that first terminal sends.
Step S204, whether the broadcast packet that transmission obtains in advance, to the server of local subnet, opens 445 ports with the server detected in local subnet.
Particularly, the server sending broadcast packet can be positioned at same local area network (LAN) with first terminal, carry the IP address of each second terminal (server in namely above-mentioned local subnet) in this local area network (LAN) in broadcast packet, use the data sharing port of same broadcast packet to the server in local subnet to detect in this embodiment.
Further, in the present embodiment, whether the server sending broadcast packet can receives the response of the second terminal for foundation in Preset Time, determine the second terminal whether turn-on data shared port: if the server sending broadcast packet receives the response of the second terminal in Preset Time, then determine that the second terminal is in presence, also namely determine the data sharing port open of the second terminal; If the server sending broadcast packet does not receive the response of the second terminal in Preset Time, then determine that the second terminal is in not presence, also namely determine that the data sharing port of the second terminal is not opened.
Step S206, is saved to the testing result detected in destination file.
Particularly, if the second terminal opens 445 ports, then 1 is designated as by the testing result of the second terminal; If the second terminal does not open 445 ports, then be designated as 0 by the testing result of the second terminal, after the testing result getting each the second terminal in local area network, be saved in destination file (as csv file), the state for each server in requester network during subsequent transmission packet uses.
Above-mentioned 1 represents 445 port opens, and namely this second terminal can transmit packet; 0 represents that 445 ports are not opened, and namely this second terminal can not transmit packet.
Further, record the second terminal presence or not presence can also comprise: record the IP address of the second terminal, the presence of the tested port numbers of the second terminal and the second terminal or not presence, generate destination file, wherein, tested port numbers is the port numbers of the tested port of test data test.
Particularly, determine the second terminal presence or not after presence, by the presence of the IP address of the second terminal, its tested port numbers and correspondence or not presence be recorded in destination file, wherein, presence can represent with the first identifier (as, 1), presence can not represent (e.g., 0) with the second identifier.
Such as, the destination file shown in Fig. 3 comprises: IP, port and result, and wherein, IP represents the IP address of the second terminal in local subnet, and port represents the tested port numbers of this second terminal, and result represents the testing result of this second terminal.Alternatively, the form of this destination file can be csv form, can by its called after result.csv.
Pass through the above embodiments, after obtaining the transmission request for transmitting packet, and before the transmission operation performing packet, use each terminal in broadcast packet Sampling network except sending the terminal of broadcast packet whether online, without the need to point-to-point the data sharing port scanning the second terminal, shorten the time whether sense terminals is online; Testing result is kept in destination file, before transmission packet, whether online directly can inquire about the terminal needing to transmit packet from destination file, and to online terminal authentication identity, and not to not online terminal authentication identity, authentication failed when can avoid carrying out authentication to online terminal (e.g., the server that 445 ports are not opened) in prior art and the mistake that causes, shorten the time of the authentication before transfer of data.
According to the above embodiment of the present invention, record the second terminal presence or not presence can comprise: obtain the terminal set of request data transfer bag in transmission request; Judge whether the second terminal is present in terminal set; If the second terminal is present in terminal set, then record presence or the not presence of the second terminal; If the second terminal is not present in terminal set, then do not record presence or the not presence of the second terminal.
Particularly, the terminal set of the second terminal needed to its transmission packet is determined according to transmission request, after detection determines that whether the second terminal is online, and at the presence of record second terminal or not before presence, can judge whether the second terminal is present in the terminal set of carrying in transmission request, if the second terminal is present in terminal set, just record the state of the second terminal; If the second terminal is not present in terminal set, then do not record the state of the second terminal, also namely, only record is present in presence or the not presence of the terminal in terminal set, and does not record presence or the not presence of the other-end outside terminal set.
Pass through above-described embodiment, after the terminal set obtaining request data transfer bag in transmission request, by judging whether the second terminal is present in this terminal set, determine whether presence or the not presence of record second terminal, only record and transmission can ask the state of relevant terminal, and without the need to recording the state of all terminals in network, shorten the time of process transmission packet task further.
Need to further illustrate, record second terminal presence or not after presence, detection method can also comprise: if the second terminal being present in terminal set is in not presence, then generate the notification message that the second identifier is corresponding; Notification message is sent to first terminal with the form of window message.
Particularly, after detection determines that whether the second terminal is online, and at the presence of record second terminal or not before presence, can judge whether the second terminal is present in the terminal set of carrying in transmission request, if the second terminal being present in terminal set is in presence, first identifier of this second terminal is designated as 1, so performs the transmission operation of packet according to transmission request; If the second terminal being present in terminal set is in not presence, second identifier of this second terminal is designated as 0, generate the notification message that this second identifier is corresponding, and this notification message is sent to the first terminal generating transmission request by window message, to point out the tested port of this second terminal of user not open, packet can not be transmitted.
Such as, above-mentioned notification message can be " IP address is that the terminal of xxx does not open 445 ports, please check ".
In an optional embodiment of the present invention, server A request is to the server B in the local subnet at its place, server C and server D transfer files, wherein, also comprise server E and server F in this local subnet, the broadcast packet obtained in advance is arranged in the broadcast packet application program of server E; Server E receive that server A sends for ask transfer files transmission request after, broadcast packet in broadcast packet application program is sent to other Servers-alls (i.e. server A, server B, server C, server D and server F) in local subnet, whether opens with 445 ports detecting each server; Server B, server C and server D composition server set and above-described embodiment in terminal set; Therefore, when recording testing result (presence of the terminal namely in above-described embodiment or not presence), only the testing result of server B, server C and server D is saved in result.csv file, and whether do not record server F online; If the testing result of server B and server C is 1, the testing result of server D is 0, so when transfer files, after server A reads above-mentioned testing result from result.csv file, by only to server B and server C transfer files, and not to server D transfer files; If the address of server D is 10.200.200.4, point out user's " IP address is that the terminal of 10.200.200.4 does not open 445 ports, please check " by with the form of window message so on server.
The above-mentioned broadcast packet obtained in advance can be arranged on any station terminal of network.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
According to embodiments of the invention, provide a kind of checkout gear of local area network terminal presence, as shown in Figure 4, this checkout gear can comprise: the first acquisition module 10, for obtaining the transmission request for transmitting packet that first terminal sends; First sending module 30, for using the broadcast packet obtained in advance to send test data to each second terminal in the network at first terminal place, wherein, each second terminal comprises all terminals in network except sending the terminal of test data; According to the response of each the second terminal, first determination module 50, for determining that whether the second terminal is online.
Particularly, the first acquisition module 10 obtain that first terminal sends for transmit packet transmission request after, first sending module 30 sends test data by the broadcast packet obtained in advance to each second terminal in the network at this first terminal place, according to the response of each the second terminal, first determination module 50 determines that whether it is online, if the second terminal is online, then can according to transmission request to its transmission packet; If the second terminal is not online, then can not transmit packet to it.
Pass through the embodiment of the present invention, get that first terminal sends for transmit packet transmission request after, and before the operation of execution data packet transmission, the mode of broadcast packet is sent by all terminals in the network to first terminal place except sending the terminal of broadcast packet, detect each terminal whether online, with when follow-up execution data packet transmission operates, only connect online terminal, authentication failed when avoiding connection not online terminal and the mistake that causes, reduce the possibility of authentication failed, shorten the processing time of whole data packet transmission task.In the above-described embodiments, whether online by the terminal in broadcast packet Sampling network, carry out TCP without the need to the shared port (being 445 ports in the present embodiment) to all terminals, decrease the time whether sense terminals is online.By the present invention, solve in prior art the problem detecting the whether online method of server length consuming time, and then reach the effect reducing the sense terminals whether online time.
Above-mentioned first terminal and the second terminal can be all Windows system is installed can by server message block (Server Message Block, i.e. SMB) equipment of protocol transmission data, this equipment can be server, computer, notebook and intelligent terminal etc.; First terminal and the second terminal are positioned at same local area network (LAN).
According to the above embodiment of the present invention, the first determination module 50 can comprise: detection module, for after sending test data to each second terminal, detects the response whether receiving the second terminal in Preset Time; First determines submodule, for receiving the response of the second terminal in Preset Time, determines that the second terminal is in presence; Second determines submodule, for not receiving the response of the second terminal in Preset Time, determines that the second terminal is in not presence.
Particularly, the test data that each second terminal can use broadcast packet to send by its tested port accepts, if the second terminal opens tested port (the data sharing port namely in above-described embodiment, as 445 ports), then this second terminal is after by tested port accepts to test data, the response to this test data can be returned, if first terminal receives the response of this second terminal in Preset Time, then can determine that this second terminal is in presence.If the tested port of the second terminal is not in opening, then this second terminal may postpone the response of test data or not respond test data, if the second end delay response test data, then the operating lag that receives of first terminal, determines that the second terminal is in not presence; If the second terminal is response test data not, then first terminal cannot receive the response of the second terminal, also can determine that the second terminal is in not presence.
In the above-described embodiment, test data is sent by all terminals of broadcast packet in network except sending the terminal of broadcast packet, and detect the response whether receiving each terminal in Preset Time, the presence of each terminal is determined according to testing result, without the need to carrying out TCP to the tested port of all terminals in network, decrease the time whether each terminal detected in local area network (LAN) is online.
Further, checkout gear can also comprise: logging modle, for after determining that according to the response of each the second terminal whether the second terminal is online, record presence or the not presence of the second terminal, wherein, if determine, the second terminal is in presence, then use the state of the first identifier marking second terminal; If determine, the second terminal is in not presence, then use the state of the second identifier marking second terminal.
Particularly, if the second terminal is in presence, namely detects that the second terminal opens tested port, then use the presence of this second terminal of the first identifier record, to represent the tested port open of this second terminal, the transmission of packet can be carried out with it; If the second terminal is in not presence, namely detect that the tested port of the second terminal is not opened, then use the not presence of this second terminal of the second identifier record, to represent that the tested port of this second terminal is not opened, the transmission of packet can not be carried out with it.
According to the above embodiment of the present invention, logging modle can also comprise: the second record sub module, for recording the IP address of the second terminal, the presence of the tested port numbers of the second terminal and the second terminal or not presence, generate destination file, wherein, tested port numbers is the port numbers of the tested port of test data test.
Particularly, determine the second terminal presence or not after presence, by the presence of the IP address of the second terminal, its tested port numbers and correspondence or not presence be recorded in destination file, wherein, presence can represent with the first identifier (as, 1), presence can not represent (e.g., 0) with the second identifier.
Pass through the above embodiments, after obtaining the transmission request for transmitting packet, and before the transmission operation performing packet, use each terminal in broadcast packet Sampling network except sending the terminal of broadcast packet whether online, without the need to point-to-point the data sharing port scanning the second terminal, shorten the time whether sense terminals is online; Testing result is kept in destination file, before transmission packet, whether online directly can inquire about the terminal needing to transmit packet from destination file, and to online terminal authentication identity, and not to not online terminal authentication identity, authentication failed when can avoid carrying out authentication to online terminal (e.g., the server that 445 ports are not opened) in prior art and the mistake that causes, shorten the time of the authentication before transfer of data.
According to the above embodiment of the present invention, logging modle can comprise: the second acquisition module, for obtaining the terminal set of request data transfer bag in transmission request; Judge module, for judging whether the second terminal is present in terminal set; First record sub module, for when the second terminal is present in terminal set, records presence or the not presence of the second terminal; Second determination module, for determining when the second terminal is not present in terminal set, does not record presence or the not presence of the second terminal.
Particularly, the terminal set of the second terminal needed to its transmission packet is determined according to transmission request, after detection determines that whether the second terminal is online, and at the presence of record second terminal or not before presence, can judge whether the second terminal is present in the terminal set of carrying in transmission request, if the second terminal is present in terminal set, just record the state of the second terminal; If the second terminal is not present in terminal set, then do not record the state of the second terminal, also namely, only record is present in presence or the not presence of the terminal in terminal set, and does not record presence or the not presence of the other-end outside terminal set.
Pass through above-described embodiment, after the terminal set obtaining request data transfer bag in transmission request, by judging whether the second terminal is present in this terminal set, determine whether presence or the not presence of record second terminal, only record and transmission can ask the state of relevant terminal, and without the need to recording the state of all terminals in network, shorten the time of process transmission packet task further.
What needs further illustrated is, checkout gear can also comprise: generation module, for the presence in record second terminal or not after presence, when the second terminal being present in terminal set be in not presence, generate the notification message that the second identifier is corresponding; Second sending module, for being sent to first terminal by notification message with the form of window message.
Particularly, after detection determines that whether the second terminal is online, and at the presence of record second terminal or not before presence, can judge whether the second terminal is present in the terminal set of carrying in transmission request, if the second terminal being present in terminal set is in presence, first identifier of this second terminal is designated as 1, so performs the transmission operation of packet according to transmission request; If the second terminal being present in terminal set is in not presence, second identifier of this second terminal is designated as 0, generate the notification message that this second identifier is corresponding, and this notification message is sent to the first terminal generating transmission request by window message, to point out the tested port of this second terminal of user not open, packet can not be transmitted.
Such as, above-mentioned notification message can be " IP address is that the terminal of xxx does not open 445 ports, please check ".
The modules provided in the present embodiment is identical with the using method that the corresponding step of embodiment of the method provides, application scenarios also can be identical.It is noted, of course, that the scheme that above-mentioned module relates to can be not limited to content in above-described embodiment and scene, and above-mentioned module may operate in terminal or mobile terminal, can pass through software or hardware implementing.
As can be seen from the above description, present invention achieves following technique effect:
Pass through the embodiment of the present invention, get that first terminal sends for transmit packet transmission request after, and before the operation of execution data packet transmission, the mode of broadcast packet is sent by all terminals in the network to first terminal place except sending the terminal of broadcast packet, detect each terminal whether online, with when follow-up execution data packet transmission operates, only connect online terminal, authentication failed when avoiding connection not online terminal and the mistake that causes, reduce the possibility of authentication failed, shorten the processing time of whole data packet transmission task.In the above-described embodiments, whether online by the terminal in broadcast packet Sampling network, carry out TCP without the need to the shared port (being 445 ports in the present embodiment) to all terminals, decrease the time whether sense terminals is online.By the present invention, solve in prior art the problem detecting the whether online method of server length consuming time, and then reach the effect reducing the sense terminals whether online time.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. a detection method for local area network terminal presence, is characterized in that, comprising:
Obtain the transmission request for transmitting packet that first terminal sends;
Use the broadcast packet obtained in advance to send test data to each second terminal in the network at described first terminal place, wherein, each second terminal described comprises all terminals in described network except sending the terminal of described test data;
Determine that whether described second terminal is online according to the response of the second terminal described in each.
2. detection method according to claim 1, is characterized in that, determines whether described second terminal comprises online according to the response of the second terminal described in each:
To after the second terminal sends described test data described in each, detect the response whether receiving described second terminal in Preset Time;
If receive the response of described second terminal in described Preset Time, then determine that described second terminal is in presence;
If do not receive the response of described second terminal in described Preset Time, then determine that described second terminal is in not presence.
3. detection method according to claim 1 and 2, is characterized in that, after determining that according to the response of the second terminal described in each whether described second terminal is online, described detection method also comprises:
Record presence or the not presence of described second terminal,
Wherein, if determine, described second terminal is in described presence, then use the state of the second terminal described in the first identifier marking; If determine described second terminal be in described in not presence, then use the state of the second terminal described in the second identifier marking.
4. detection method according to claim 3, is characterized in that, record described second terminal presence or not presence comprise:
Obtain the terminal set of the described packet of request transmission in described transmission request;
Judge whether described second terminal is present in described terminal set;
If described second terminal is present in described terminal set, then record the described presence of described second terminal or described not presence;
If described second terminal is not present in described terminal set, then do not record the described presence of described second terminal or described not presence.
5. detection method according to claim 4, is characterized in that, after the described presence recording described second terminal or described not presence, described detection method also comprises:
If not presence described in described second terminal being present in described terminal set is in, then generate the notification message that described second identifier is corresponding;
Described notification message is sent to described first terminal with the form of window message.
6. detection method according to claim 3, is characterized in that, record described second terminal presence or not presence also comprise:
Record the IP address of described second terminal, the tested port numbers of described second terminal and the described presence of described second terminal or described not presence, generate destination file,
Wherein, described tested port numbers is the port numbers of the tested port of described test data test.
7. a checkout gear for local area network terminal presence, is characterized in that, comprising:
First acquisition module, for obtaining the transmission request for transmitting packet that first terminal sends;
First sending module, test data is sent to each second terminal in the network at described first terminal place for using the broadcast packet obtained in advance, wherein, each second terminal described comprises all terminals in described network except sending the terminal of described test data;
According to the response of the second terminal described in each, first determination module, for determining that whether described second terminal is online.
8. checkout gear according to claim 7, is characterized in that, described first determination module comprises:
Detection module, for after the second terminal sends described test data described in each, detects the response whether receiving described second terminal in Preset Time;
First determines submodule, for receiving the response of described second terminal in described Preset Time, determines that described second terminal is in presence;
Second determines submodule, for not receiving the response of described second terminal in described Preset Time, determines that described second terminal is in not presence.
9. the checkout gear according to claim 7 or 8, is characterized in that, described checkout gear also comprises:
Logging modle, for after determining that according to the response of the second terminal described in each described second terminal is whether online, records presence or the not presence of described second terminal,
Wherein, if determine, described second terminal is in described presence, then use the state of the second terminal described in the first identifier marking; If determine described second terminal be in described in not presence, then use the state of the second terminal described in the second identifier marking.
10. checkout gear according to claim 9, is characterized in that, described logging modle comprises:
Second acquisition module, for obtaining the terminal set of the described packet of request transmission in described transmission request;
Judge module, for judging whether described second terminal is present in described terminal set;
First record sub module, for when described second terminal is present in described terminal set, records the described presence of described second terminal or described not presence;
Second determination module, when described second terminal is not present in described terminal set, does not record the described presence of described second terminal or described not presence for determining.
11. checkout gears according to claim 10, is characterized in that, described checkout gear also comprises:
Generation module, for after the described presence recording described second terminal or described not presence, when described in described second terminal being present in described terminal set is in not presence, generate the notification message that described second identifier is corresponding;
Second sending module, for being sent to described first terminal by described notification message with the form of window message.
12. checkout gears according to claim 9, is characterized in that, described logging modle also comprises:
Second record sub module, for recording the IP address of described second terminal, the described presence of the tested port numbers of described second terminal and described second terminal or described not presence, generates destination file,
Wherein, described tested port numbers is the port numbers of the tested port of described test data test.
CN201410666122.4A 2014-11-19 2014-11-19 Method and device for detecting online states of local area network terminals Pending CN104468265A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410666122.4A CN104468265A (en) 2014-11-19 2014-11-19 Method and device for detecting online states of local area network terminals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410666122.4A CN104468265A (en) 2014-11-19 2014-11-19 Method and device for detecting online states of local area network terminals

Publications (1)

Publication Number Publication Date
CN104468265A true CN104468265A (en) 2015-03-25

Family

ID=52913672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410666122.4A Pending CN104468265A (en) 2014-11-19 2014-11-19 Method and device for detecting online states of local area network terminals

Country Status (1)

Country Link
CN (1) CN104468265A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933924A (en) * 2016-04-20 2016-09-07 广东欧珀移动通信有限公司 Online state detection method of information interactive software, device and terminals
CN107343032A (en) * 2017-06-21 2017-11-10 武汉慧联无限科技有限公司 The offline detection method and device of terminal node in remote low power consumption network
CN108600037A (en) * 2018-01-22 2018-09-28 来邦科技股份公司 A kind of equipment on-line recognition methods, electronic equipment, system and storage medium
CN109067932A (en) * 2018-07-24 2018-12-21 广州贯行电能技术有限公司 A kind of data collection station data transmission method and data service end without fixed IP
CN109361562A (en) * 2018-10-31 2019-02-19 广东电网有限责任公司信息中心 A kind of automated testing method based on the access of related network equipment
CN114006938A (en) * 2021-09-24 2022-02-01 深圳市佳创视讯技术股份有限公司 Message routing issuing method, device, equipment and storage medium of distributed cluster
CN115150299A (en) * 2022-06-27 2022-10-04 海信视像科技股份有限公司 Terminal device online state detection method and terminal device

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1071295A2 (en) * 1999-07-23 2001-01-24 Phone.Com Inc. Messaging and status indication for wireless communication devices
CN101087222A (en) * 2006-06-09 2007-12-12 中兴通讯股份有限公司 Method for H.323 system to support online status display
CN101155335A (en) * 2006-09-29 2008-04-02 华为技术有限公司 Method and system for NGN terminal implementing short message service, NGN short message center
CN101252499A (en) * 2008-03-28 2008-08-27 程凯征 Mail server dynamic state polling method for checking whether mail server has new mail arrive or not
CN101267609A (en) * 2008-04-24 2008-09-17 中兴通讯股份有限公司 Terminal state inquiry method for cluster system
CN101420333A (en) * 2007-10-22 2009-04-29 中兴通讯股份有限公司 Method for detecting state of connection between digital customer line and access terminal
CN101714991A (en) * 2009-10-30 2010-05-26 清华大学 Method for realizing heartbeat mechanism
CN101873727A (en) * 2009-04-21 2010-10-27 华为终端有限公司 Terminal state updating method of terminal management system and terminal management system
CN102014160A (en) * 2010-11-25 2011-04-13 中国联合网络通信集团有限公司 Method and system for data transmission between terminals
CN102083128A (en) * 2010-04-02 2011-06-01 大唐移动通信设备有限公司 Offline detection method, device and system for machine type communication (MTC) equipment
CN102395108A (en) * 2011-11-28 2012-03-28 苏州迈普信息技术有限公司 Cooperated rescue method based on mobile localization
CN102421060A (en) * 2011-11-28 2012-04-18 苏州迈普信息技术有限公司 GIS (Geographic Information System)-based emergency condition management system for tour group
US8204760B2 (en) * 2006-02-07 2012-06-19 Eflag Professional Solutions, Llc Systems, methods, and computer program products for facilitating communications, workflow, and task assignments in medical practices and clinics
CN102594585A (en) * 2011-12-15 2012-07-18 江苏亿通高科技股份有限公司 Automatic clearing method for terminal registry
CN102932364A (en) * 2012-11-12 2013-02-13 华为软件技术有限公司 Register method, register device and register system
CN102984042A (en) * 2012-11-27 2013-03-20 浙江中控技术股份有限公司 Deterministic scheduling method and system for realizing bus communication
CN103326928A (en) * 2013-06-04 2013-09-25 四川长虹电器股份有限公司 Platform and system for realizing real-time sharing of television programme content

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1071295A2 (en) * 1999-07-23 2001-01-24 Phone.Com Inc. Messaging and status indication for wireless communication devices
US8204760B2 (en) * 2006-02-07 2012-06-19 Eflag Professional Solutions, Llc Systems, methods, and computer program products for facilitating communications, workflow, and task assignments in medical practices and clinics
CN101087222A (en) * 2006-06-09 2007-12-12 中兴通讯股份有限公司 Method for H.323 system to support online status display
CN101155335A (en) * 2006-09-29 2008-04-02 华为技术有限公司 Method and system for NGN terminal implementing short message service, NGN short message center
CN101420333A (en) * 2007-10-22 2009-04-29 中兴通讯股份有限公司 Method for detecting state of connection between digital customer line and access terminal
CN101252499A (en) * 2008-03-28 2008-08-27 程凯征 Mail server dynamic state polling method for checking whether mail server has new mail arrive or not
CN101267609A (en) * 2008-04-24 2008-09-17 中兴通讯股份有限公司 Terminal state inquiry method for cluster system
CN101873727A (en) * 2009-04-21 2010-10-27 华为终端有限公司 Terminal state updating method of terminal management system and terminal management system
CN101714991A (en) * 2009-10-30 2010-05-26 清华大学 Method for realizing heartbeat mechanism
CN102083128A (en) * 2010-04-02 2011-06-01 大唐移动通信设备有限公司 Offline detection method, device and system for machine type communication (MTC) equipment
CN102014160A (en) * 2010-11-25 2011-04-13 中国联合网络通信集团有限公司 Method and system for data transmission between terminals
CN102395108A (en) * 2011-11-28 2012-03-28 苏州迈普信息技术有限公司 Cooperated rescue method based on mobile localization
CN102421060A (en) * 2011-11-28 2012-04-18 苏州迈普信息技术有限公司 GIS (Geographic Information System)-based emergency condition management system for tour group
CN102594585A (en) * 2011-12-15 2012-07-18 江苏亿通高科技股份有限公司 Automatic clearing method for terminal registry
CN102932364A (en) * 2012-11-12 2013-02-13 华为软件技术有限公司 Register method, register device and register system
CN102984042A (en) * 2012-11-27 2013-03-20 浙江中控技术股份有限公司 Deterministic scheduling method and system for realizing bus communication
CN103326928A (en) * 2013-06-04 2013-09-25 四川长虹电器股份有限公司 Platform and system for realizing real-time sharing of television programme content

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933924A (en) * 2016-04-20 2016-09-07 广东欧珀移动通信有限公司 Online state detection method of information interactive software, device and terminals
CN105933924B (en) * 2016-04-20 2019-09-27 Oppo广东移动通信有限公司 A kind of presence detection method, device and the terminal of information exchange software
CN107343032A (en) * 2017-06-21 2017-11-10 武汉慧联无限科技有限公司 The offline detection method and device of terminal node in remote low power consumption network
CN108600037A (en) * 2018-01-22 2018-09-28 来邦科技股份公司 A kind of equipment on-line recognition methods, electronic equipment, system and storage medium
CN109067932A (en) * 2018-07-24 2018-12-21 广州贯行电能技术有限公司 A kind of data collection station data transmission method and data service end without fixed IP
CN109361562A (en) * 2018-10-31 2019-02-19 广东电网有限责任公司信息中心 A kind of automated testing method based on the access of related network equipment
CN114006938A (en) * 2021-09-24 2022-02-01 深圳市佳创视讯技术股份有限公司 Message routing issuing method, device, equipment and storage medium of distributed cluster
CN115150299A (en) * 2022-06-27 2022-10-04 海信视像科技股份有限公司 Terminal device online state detection method and terminal device

Similar Documents

Publication Publication Date Title
CN104468265A (en) Method and device for detecting online states of local area network terminals
EP3013086B1 (en) Method, apparatus and electronic device for connection management
US9258305B2 (en) Authentication method, transfer apparatus, and authentication server
CN113613283B (en) Wi-Fi hotspot connection method and terminal
CN101582856B (en) Session setup method of portal server and BAS (broadband access server) device and system thereof
US20130268632A1 (en) Server assisted authenticated device
CN109167762B (en) IEC104 message checking method and device
CN101702717A (en) Method, system and equipment for authenticating Portal
CN105897652A (en) Standard protocol based heterogeneous terminal dynamic access method
CN104811462A (en) Access gateway redirection method and access gateway
CN111711533B (en) Fault diagnosis method, fault diagnosis device, electronic device and storage medium
US10523549B1 (en) Method and system for detecting and classifying networked devices
CN104079571A (en) Method and device for recognizing Android simulator
CN112751716B (en) Test method and system for controlling response of file server and electronic equipment
CN112463281A (en) Remote assistance method, device, system, electronic equipment and storage medium
US9509777B2 (en) Connection method and management server
US20070288607A1 (en) System and method for loading a network configuration program on a wired/wireless network product
CN108667913B (en) Method, device, computer equipment and storage medium for access management of shared terminal
US20160294465A1 (en) Information collection system, relay terminal, control method for relay terminal to connect to center system, sensor terminal, and control method for sensor terminal to connect to center system
CN112148604A (en) iOS software testing method, device, equipment and computer readable medium
CN110943962B (en) Authentication method, network equipment, authentication server and forwarding equipment
CN105991641A (en) Portal authentication method and portal authentication device
US20230336375A1 (en) Systems and methods for control channel tunneling
CN114285668B (en) Gate testing method and device, storage medium and electronic equipment
US11444880B2 (en) Traffic control method and related apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
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.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20150325

RJ01 Rejection of invention patent application after publication