CN114697147A - Equipment searching method, device, equipment and storage medium - Google Patents

Equipment searching method, device, equipment and storage medium Download PDF

Info

Publication number
CN114697147A
CN114697147A CN202011589956.1A CN202011589956A CN114697147A CN 114697147 A CN114697147 A CN 114697147A CN 202011589956 A CN202011589956 A CN 202011589956A CN 114697147 A CN114697147 A CN 114697147A
Authority
CN
China
Prior art keywords
list
equipment
target
target equipment
response message
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.)
Granted
Application number
CN202011589956.1A
Other languages
Chinese (zh)
Other versions
CN114697147B (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202011589956.1A priority Critical patent/CN114697147B/en
Publication of CN114697147A publication Critical patent/CN114697147A/en
Application granted granted Critical
Publication of CN114697147B publication Critical patent/CN114697147B/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
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a device searching method, a device, equipment and a storage medium, which are applied to a configuration management client, wherein a device table generated by two searches is compared through two broadcast searches, grouping is carried out according to different zone bits of the devices in a first list but not in a second list, and communication is respectively carried out at different frequencies so as to determine the state of the unsearched devices. Meanwhile, the off-line equipment group is dynamically maintained, and the off-line equipment is quickly responded after being on-line and is added into the search result, so that the search result is more accurate.

Description

Equipment searching method, device, equipment and storage medium
Technical Field
The present application relates to the field of device management technologies, and in particular, to a device search method, apparatus, device, and storage medium.
Background
With the rapid progress of communication technology, various networks implemented based on communication technology have been developed rapidly. Such as the basic internet, a mobile communication network, a video security network, and various local area networks, etc., the number of devices deployed in these networks is increasing, and for example, a large video security network, the number of front-end devices in the network cameras can be as many as ten thousands.
However, to manage and configure the devices in the network, a special configuration management client is generally used. The device search is the most basic service function in the configuration management client, and is used for realizing the discovery and management of the device, and how to ensure the accuracy of the device search is very important.
The current principle of device search is basically implemented by broadcast or multicast, such as sending a broadcast or multicast request every 30 s. However, when the number of devices is large, after the broadcast or multicast request is sent, all devices may return unicast response packets at the same time, which may cause congestion of the switch. In addition, the message response may be slow (exceeding the waiting time of the configured searching client), and even the response message is discarded, so that the number of the devices searched by the client is smaller than the actual number of the devices. This will cause inconsistency of the devices searched for multiple times on the final configuration management client, which will affect the configuration and management of the devices.
Disclosure of Invention
The application aims to provide a device searching method, a device, equipment and a storage medium, which can reduce the pressure brought by a large number of requests and achieve the effect of improving the accuracy of a device searching result by distinguishing online devices from offline devices and carrying out multicast requests at different frequencies.
In order to achieve the purpose, the technical scheme of the application is as follows:
a device searching method is applied to a configuration management client, and comprises the following steps:
sending a first broadcast search request, receiving a response message returned by equipment, recording the equipment which sends the response message in a first list, and setting a zone bit corresponding to the equipment as a first zone bit to indicate that the equipment is on line;
sending a second broadcast search request, receiving a response message returned by the equipment, and recording the equipment which sends the response message in a second list;
comparing the first list with the second list, if finding out the target equipment which exists in the first list but does not exist in the second list, adding the equipment with the zone bit being the first zone bit into the first set, and adding the equipment with the zone bit being the second zone bit into the second set, wherein the second zone bit represents that the equipment is off-line;
and sending messages to the target equipment in the first set and/or the second set, and updating the state of the target equipment.
Further, the device search method further includes:
and comparing the devices in the first list and the second list, if finding out the target device which exists in the second list but does not exist in the first list, adding the target device into the first list, and setting the corresponding zone bit of the target device into the first list as the first zone bit.
Further, the sending a message to the target devices in the first set and/or the second set, and updating the state of the target devices includes:
sending a message to target equipment in the first set;
if the response message of the target equipment is received, judging that the target equipment is on line, and removing the target equipment from the first set;
if the response message of the target equipment is not received, continuing to send the message to the target equipment in the first set;
and when the response message of the target equipment is not received for a plurality of times continuously, judging that the target equipment is off-line, adding the target equipment into the second set, and setting the zone bit of the target equipment in the first list as a second zone bit.
Further, the sending a message to the target devices in the first set and/or the second set, and updating the state of the target devices includes:
periodically sending messages to target equipment in the second set;
if receiving the response message of the target equipment, judging that the target equipment is on line, removing the target equipment from the second set, and setting the zone bit of the target equipment in the first list as a first zone bit;
and if the response message of the target equipment is not received, continuing to send the message to the target equipment in the second set.
The present application further provides an apparatus searching apparatus, which is applied to a configuration management client, and the apparatus searching apparatus includes:
the first search module is used for sending a first broadcast search request, receiving a response message returned by the equipment, recording the equipment which sends the response message in a first list, and setting a zone bit corresponding to the equipment as a first zone bit to indicate that the equipment is online;
the second searching module is used for sending a second broadcast searching request, receiving a response message returned by the equipment and recording the equipment which sends the response message in a second list;
the comparison module is used for comparing the devices of the first list and the second list, if the target devices which exist in the first list but do not exist in the second list are found, the devices with the zone bits being the first zone bits are added into the first set, the devices with the zone bits being the second zone bits are added into the second set, and the second zone bits represent that the devices are off-line;
and the state confirmation module is used for sending messages to the target equipment in the first set and/or the second set and updating the state of the target equipment.
Further, the comparing module is further configured to compare the first list with the second list, and if a target device that exists in the second list but does not exist in the first list is found, add the target device to the first list, and set a flag bit corresponding to the target device in the first list as the first flag bit.
Further, the status confirmation module sends a message to the target device in the first set and/or the second set, updates the status of the target device, and executes the following operations:
sending a message to target equipment in the first set;
if the response message of the target equipment is received, judging that the target equipment is on line, and removing the target equipment from the first set;
if the response message of the target equipment is not received, continuing to send the message to the target equipment in the first set;
and when the response message of the target equipment is not received for a plurality of times continuously, judging that the target equipment is off-line, adding the target equipment into the second set, and setting the zone bit of the target equipment in the first list as a second zone bit.
Further, the status confirmation module sends a message to the target device in the first set and/or the second set, updates the status of the target device, and executes the following operations:
periodically sending messages to target equipment in the second set;
if receiving the response message of the target equipment, judging that the target equipment is on line, removing the target equipment from the second set, and setting the zone bit of the target equipment in the first list as a first zone bit;
and if the response message of the target equipment is not received, continuing to periodically send the message to the target equipment in the second set.
The application also provides an electronic device, which comprises a processor and a memory storing a plurality of computer instructions, wherein the computer instructions are executed by the processor to realize the steps of the device searching method.
The present application also proposes a computer-readable storage medium having stored thereon computer instructions to be executed by a processor to implement the steps of the above-mentioned device search method.
According to the device searching method, the device searching apparatus and the storage medium, through two broadcast searches, the device tables generated by the two searches are compared, grouping is performed according to different zone bits of the devices in the first list but not in the second list, communication is performed respectively at different frequencies, so that the state of the device which is not searched is determined, and as the number of the devices in the grouping is small, the pressure of the broadcast request and a large number of responses on the switch is reduced, the search can be quickly responded, and the integrity of the search result is improved.
Drawings
FIG. 1 is a flow chart of a device search method of the present application;
FIG. 2 is a logic block diagram of a device search method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a device search apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the prior art, for device searching, a configuration management client sends a broadcast or multicast request every other time period, and displays a device returning a unicast response, that is, determines to search for a device returning a unicast response. However, in the prior art, only one broadcast or multicast request is sent and a response is waited for each time, if the time of the returned unicast response message exceeds the time of refreshing the configuration management client, or the response message is discarded due to network switch congestion, the number of devices searched each time is different, and the devices cannot be configured and managed.
According to the device searching method and device, the final searching result is determined by sending the two broadcast requests in one searching period and comparing the searching results of the two broadcast requests, so that one searching process is completed. And the search result is reserved after one search process, so that in the next search process, the broadcast request is sent once or twice again and is compared with the previously reserved search result to determine the search result, and the accuracy of the search result is improved.
In one embodiment, as shown in fig. 1, a device search method applied to a configuration management client is provided, where the device search method includes:
step S110, sending a first broadcast search request, receiving a response message returned by the equipment, recording the equipment which sends the response message in a first list, and setting a zone bit corresponding to the equipment as a first zone bit to show that the equipment is online.
The first time a broadcast search request is sent, it is to build a basic device list for comparison. If the configuration management client side already maintains the first list, after the broadcast search request is sent for the first time, the search result is placed in the first list.
In this embodiment, after the configuration management client sends the first broadcast search request, the device in the network receives the search request, and then responds, and sends a response packet through unicast. It is easily understood that the device on line can receive and respond to the broadcast search request, and the device off line cannot receive and respond to the broadcast search request.
The configuration management client in this embodiment may be a management server in a network or a terminal specifically used for searching for a display device, which is not limited in this application.
The configuration management client in the network may receive the response message sent by the device, so that the device may be recorded in the first list, where device information, such as an IP address, a device name, and the like, of all devices that send the response message is recorded in the first list. The device receives and responds to the information, and the information of the device itself is carried in the response message, which is a relatively mature technology.
In the first list, a flag bit is set for each device, and the flag bit is set to distinguish the device connection state after the last search of the device is finished, that is, the device connection state is an offline state or an online state. The flag bit may be a first flag bit or a second flag bit, for example, the first flag bit may be set to 1 to indicate the online state of the device, and the second flag bit may be set to 0 to indicate the offline state of the device, or may be replaced with other numbers or letters, which is not described herein again.
The first list is used as a basic device list for subsequent comparison, and the first list is continuously updated and maintained subsequently. After one searching process is finished and the next searching process is carried out, the first list is continuously adopted as a basic equipment list, wherein after the first broadcasting request in the next searching process, the responding equipment is added into the first list.
And step S120, sending a second broadcast search request, receiving a response message returned by the equipment, and recording the equipment which sends the response message in a second list.
As in step S110, this embodiment also sends a second broadcast search request, receives a response message returned by the device, and records the device that sent the response message in the second list. In contrast, the second list, which is only a temporary list, has no maintenance value after the search result is determined, and a flag bit does not need to be set for each device in the second list. A temporary list of target devices may be deleted after the comparison.
Step S130, comparing the apparatuses in the first list and the second list, if the target apparatus existing in the first list but not in the second list is found, adding the apparatus with the flag bit being the first flag bit into the first set, and adding the apparatus with the flag bit being the second flag bit into the second set, where the second flag bit indicates that the apparatus is offline.
In this step, after the search request is broadcast twice, the first list and the second list are compared to find out whether the devices recorded in the two lists are different, which may be the following three cases.
In the first case, there are devices in the second list that are not in the first list, that is, the second broadcast search finds a new device, which may be a device newly added to the network, or an offline device during the first broadcast search, or an unsearched device due to packet loss.
In the second case, there is no device in the first list in the second list, that is, when a device already in the network is searched for the second time, a new situation occurs, so that the device cannot be searched for, and the device may be offline or not searched for due to packet loss.
In the third case, the first list is the same as the devices in the second list.
For the third case, if after two search requests are broadcast, the devices in the first list and the second list are consistent, which indicates that no device is missed in the search, the first list is reserved as the final search result, and the search period is ended.
In this embodiment, for the first and second cases, it is necessary to add the unsearched devices caused by the two cases to a first list, which is used as a final search result, and display the devices on a search interface, and perform configuration and management.
For the first case, the present application compares the first list and the second list, and if a target device is found that is present in the second list but not present in the first list, the target device is added to the first list, and the flag bit corresponding to the target device is set as the first flag bit in the first list.
That is, if an apparatus a existing in the second list but not existing in the first list is found, the apparatus a is added to the first list and its flag position is set to 1. Therefore, the device A which is not searched in the first broadcast is added into the first list, and the unsearched result is more accurate.
For the second case, if the target device existing in the first list but not existing in the second list is found, and the flag bit corresponding to the target device is the first flag bit, adding it into the first set; and if the target device existing in the first list but not existing in the second list is found, and the zone bit corresponding to the target device is the second zone bit, adding the target device into the second set.
In the step, the devices in the first list but not in the second list are respectively added into different sets according to the zone bits of the devices, and then the state of the devices in the sets is confirmed.
Step S140, sending messages to the target equipment in the first set and/or the second set, and updating the state of the target equipment.
In the step, a message is sent to the target equipment in the first set to determine the online state of the target equipment, if the target equipment is online, the target equipment is removed from the first set, if the target equipment is offline, the target equipment is added into the second set, and the zone bit of the target equipment in the first list is set as the second zone bit to indicate that the equipment is offline.
Specifically, if there is found an apparatus B existing in the first list but not existing in the second list, and the flag bit corresponding to the apparatus B is the first flag bit, it is added to the first set. That is, the device B found by the first broadcast search is not found by the second broadcast search. The device B is not searched for in the second broadcast, which may be caused by offline of the device B, packet loss due to slow processing of the response message by the configuration management server, or failure to search for the device B due to congestion of the switch caused by a large number of response messages.
This embodiment sends a message to a target device in the first set, and updates the state of the target device, which specifically includes:
the configuration management server sends a message to the target equipment in the first set;
if the response message of the target equipment is received, judging that the target equipment is on line, and removing the target equipment from the first set;
if the response message of the target equipment is not received, continuing to send the message to the target equipment in the first set;
and when the response message of the target is not received for a plurality of times continuously, judging that the target equipment is off-line, adding the target equipment into the second set, and setting the zone bit of the target equipment in the first list as a second zone bit.
For example, device B is added to the first set, and devices C and D are added to the first set, the configuration management server sends a message to device B, C, D, and device B, C, D receives the message and then responds to the message, and sends a response message. At this time, because the number of devices in the first set is small, the message can be sent in a unicast manner, the switch is not congested due to the response message sent by the device in the first set, and the configuration management server can also process the response message in time, so that the device which is not searched before can be conveniently searched.
The configuration management server receives the response message from the device B, C, considers the devices B, C to be online, removes them from the first set, determines that the devices B, C were searched, and keeps them in the first list without change because the devices B, C are already in the first list and the flag is 1. This eliminates the situation where the device B, C is not searched for in the second search due to switch packet loss or slow processing.
If the network server does not receive the response message of the device D for a plurality of times, where the number of times may be set as a threshold, for example, 3 to 5 times, it is determined that the device D is offline. The reason for going offline may be the device powering down or the device being removed. The device D is added into the second set, the flag position of the device D is set to be 0 in the first list, and the device D is off-line.
In this embodiment, a message is also sent to the target device in the second set, and the state of the target device is updated. The method specifically comprises the following steps:
periodically sending messages to target equipment in the second set;
if receiving the response message of the target equipment, judging that the target equipment is on line, removing the target equipment from the second set, and setting the zone bit of the target equipment in the first list as a first zone bit;
and if the response message of the target equipment is not received, continuing to periodically send the message to the target equipment in the second set.
The configuration management server also sends a message to the target equipment in the second set, if the response message of the target equipment is received, the target equipment is judged to be on-line, the target equipment is removed from the second set, and the flag bit of the target equipment in the first list is set as the first flag bit. If the response message of the target is not received, the messages are continuously and periodically sent in the second set so as to update the state of the target equipment.
For example, if the device D is online in the second set, the device D receives the message sent by the configuration management server, responds, and sends a response message. After receiving the response message, the configuration management server determines that the device D is online, and sets the flag position of the device D in the first list to 1. And removes device D from the second set,
and if the response message of the device D can not be received all the time, the device D is considered to be continuously off-line, and the state of the device D is updated by periodically sending the message.
By the operation of this step, if there is a device in the second set, the checks are periodically made until there is no device in the second set. Therefore, the device D can be searched and added into the search result immediately after being online, and the accuracy of the search result is improved.
The method and the device perform dynamic maintenance on the offline equipment group (the second set), respond quickly after the offline equipment is online, and add the offline equipment group into the search result, so that the search result is more accurate.
By the two broadcasts, the obtained search result is placed in the first list, the device with the flag bit of 1 is online, and the device with the flag bit of 0 is offline. And when a searching process is restarted subsequently, the broadcasting searching request needs to be sent twice, the searched equipment is added into the first list after the first broadcasting searching, and the second list generated after the second broadcasting searching is compared with the first list, so that the searching result can be updated. The previous first list may also be discarded, and according to the method of the present application, the first broadcast search request is sent first to obtain the first list, and then the second broadcast search request is sent again to obtain the second list, and the first list and the second list are compared to obtain the search result.
In a specific embodiment, as shown in fig. 2, a device search method includes:
s201, sending a first broadcast search request, recording the equipment which sends the response message in an equipment table A (a first list) according to the received response message, and setting an equipment flag bit in the equipment table A to be 1.
S202, sending a second broadcast search request, and recording the device that sent the response packet in the device table B (second list) according to the received response packet.
S203, judging whether the devices in the device table B but not in the device table A exist, if so, executing the step S204, otherwise, executing the step S205.
S204, adding the devices in the device table B but not in the device table A into the device table A, and setting the flag bit of the devices to be 1.
S205, continuously judging whether the devices in the device table A but not in the device table B exist, if so, executing the step S206, otherwise, ending the search.
S206, judging whether the flag bit of the equipment in the equipment table A but not in the equipment table B is 1, if so, executing the step S207, otherwise, executing the step S214.
And S207, adding the devices with the flag bits of 1 in the device table A but not in the device table B into the set C.
S208, sending the message to the equipment in the set C.
S209, checking whether a unicast response is received, if so, executing a step S210, otherwise, executing a step S212.
S210, displaying the equipment sending the response message on a search interface, and removing the equipment from the set C.
S211, judging whether members exist in the set C or not, if not, ending the search, otherwise, returning to the step S208, and continuing to send the message to the equipment in the set C.
S212, checking whether no response message is received for t times, if yes, executing step S213, otherwise, returning to step S208. The number of times t may be set to 3 to 5 times.
And S213, adding the rest members in the set C into the set D, setting the flag bits of the devices to be 0, and ending the search.
S214, adding the devices with the flag bit of 0 in the device table A but not in the device table B into the set D.
And S215, sending the message in the set D every two search periods.
The embodiment periodically sends the message to the device in the set D, the period can be flexibly set, and a period time can also be directly set, for example, the device searches once every 1-10 seconds, which is not limited in the present application.
S216, checking whether a unicast response message is received, if so, executing the step S217, otherwise, returning to the step S215.
S217, displaying the device corresponding to the unicast response message on the search interface, removing the device from the set D, and setting the flag bit of the device to be 1 in the device table A.
According to the technical scheme, the device tables generated by two searches are compared through two broadcast searches, grouping is carried out according to the difference of the zone bits of the devices in the first list but not in the second list, communication is respectively carried out at different frequencies, and the unsearched devices are supplemented into the search results. Meanwhile, the offline equipment group is dynamically maintained, and the offline equipment group quickly responds after being online and is added into the search result, so that the user can know the state information of the equipment.
An embodiment of the present application, as shown in fig. 3, further provides an apparatus for searching for devices, which is applied to a configuration management client, where the apparatus for searching for devices includes:
the first search module is used for sending a first broadcast search request, receiving a response message returned by the equipment, recording the equipment which sends the response message in a first list, and setting a zone bit corresponding to the equipment as a first zone bit to indicate that the equipment is online;
the second searching module is used for sending a second broadcast searching request, receiving a response message returned by the equipment and recording the equipment which sends the response message in a second list;
the comparison module is used for comparing the devices of the first list and the second list, if the target devices which exist in the first list but do not exist in the second list are found, the devices with the zone bits being the first zone bits are added into the first set, the devices with the zone bits being the second zone bits are added into the second set, and the second zone bits represent that the devices are off-line;
and the state confirmation module is used for sending messages to the target equipment in the first set and/or the second set and updating the state of the target equipment.
For the specific definition of a device search apparatus in the present application, refer to the above definition of a device search method, and are not described herein again. The modules in the device search apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In a specific embodiment, the comparing module is further configured to compare the first list with the second list, and if a target device that exists in the second list but does not exist in the first list is found, add the target device to the first list, and set a flag bit corresponding to the target device in the first list as the first flag bit.
In another specific embodiment, the status confirmation module sends a message to the target device in the first set and/or the second set, updates the status of the target device, and performs the following operations:
sending a message to target equipment in the first set;
if the response message of the target equipment is received, judging that the target equipment is on line, and removing the target equipment from the first set;
if the response message of the target equipment is not received, continuing to send the message to the target equipment in the first set;
and when the response message of the target equipment is not received for a plurality of times continuously, judging that the target equipment is off-line, adding the target equipment into the second set, and setting the zone bit of the target equipment in the first list as a second zone bit.
In another specific embodiment, the status confirmation module sends a message to the target device in the first set and/or the second set, updates the status of the target device, and performs the following operations:
periodically sending messages to target equipment in the second set;
if receiving the response message of the target equipment, judging that the target equipment is on line, removing the target equipment from the second set, and setting the zone bit of the target equipment in the first list as a first zone bit;
and if the response message of the target equipment is not received, continuing to send the message to the target equipment in the second set.
In an embodiment of the present application, an electronic device is provided, as shown in fig. 4, the electronic device provided in this embodiment includes a processor and a memory storing a plurality of computer instructions, and the computer instructions, when executed by the processor, implement the steps of the device search method described above.
The processor in the electronic device may be one or more and the memory is used to store computer instructions, which may be one or more computer programs. The computer instruction of this embodiment is executed by the processor, and the processor implements the VLAN data packet forwarding method in this embodiment.
The electronic device of this embodiment may further include an input device and an output device, and the processor, the memory, the input device and the output device in the electronic device may be directly or indirectly electrically connected to realize data transmission or interaction. For example, these components may be electrically connected to each other through one or more communication buses or signal lines, as illustrated in fig. 4 by buses.
The memory in the electronic device, as a computer-readable storage medium, may be used to store one or more programs, which may be software programs, accounting machine executable programs, and modules, such as program instructions/modules corresponding to the VLAN data packet forwarding method/apparatus provided in the embodiments of the present application. The processor executes various functional applications and data processing of the electronic device by running software programs, instructions and modules stored in the memory, that is, the VLAN data packet forwarding method in the above embodiment is implemented.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the utility of the electronic device, and the like. In addition, the memory may include high speed random access memory, may also include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus. The output device may include a display device such as a display screen.
The present application also proposes a computer-readable storage medium having stored thereon computer instructions to be executed by a processor for implementing the steps of the above-mentioned device search method.
Computer storage media for embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Small talk, C + +, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The processor may be an integrated circuit chip having data processing capabilities. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (Network Processor), and the like. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An apparatus searching method applied to a configuration management client is characterized in that the apparatus searching method comprises the following steps:
sending a first broadcast search request, receiving a response message returned by equipment, recording the equipment which sends the response message in a first list, and setting a zone bit corresponding to the equipment as a first zone bit to indicate that the equipment is on line;
sending a second broadcast search request, receiving a response message returned by the equipment, and recording the equipment which sends the response message in a second list;
comparing the first list with the second list, if finding out the target device which exists in the first list but does not exist in the second list, adding the device with the zone bit being the first zone bit into the first set, and adding the device with the zone bit being the second zone bit into the second set, wherein the second zone bit represents that the device is off-line;
and sending messages to the target equipment in the first set and/or the second set, and updating the state of the target equipment.
2. The device search method of claim 1, further comprising:
and comparing the devices in the first list and the second list, if finding out the target device which exists in the second list but does not exist in the first list, adding the target device into the first list, and setting the corresponding zone bit of the target device into the first list as the first zone bit.
3. The device searching method according to claim 1, wherein the sending a packet to the target device in the first set and/or the second set, and updating the state of the target device, comprises:
sending a message to target equipment in the first set;
if the response message of the target equipment is received, judging that the target equipment is on line, and removing the target equipment from the first set;
if the response message of the target equipment is not received, continuing to send the message to the target equipment in the first set;
and when the response message of the target equipment is not received for a plurality of times continuously, judging that the target equipment is off-line, adding the target equipment into the second set, and setting the zone bit of the target equipment in the first list as a second zone bit.
4. The device search method according to claim 1 or 3, wherein the sending of the packet to the target devices in the first set and/or the second set, and the updating of the state of the target devices, comprises:
periodically sending messages to target equipment in the second set;
if receiving the response message of the target equipment, judging that the target equipment is on line, removing the target equipment from the second set, and setting the zone bit of the target equipment in the first list as a first zone bit;
and if the response message of the target equipment is not received, continuing to periodically send the message to the target equipment in the second set.
5. An apparatus for searching for a device, applied to a configuration management client, includes:
the first search module is used for sending a first broadcast search request, receiving a response message returned by the equipment, recording the equipment which sends the response message in a first list, and setting a zone bit corresponding to the equipment as a first zone bit to indicate that the equipment is online;
the second searching module is used for sending a second broadcast searching request, receiving a response message returned by the equipment and recording the equipment which sends the response message in a second list;
the comparison module is used for comparing the devices of the first list and the second list, if the target devices which exist in the first list but do not exist in the second list are found, the devices with the zone bits being the first zone bits are added into the first set, the devices with the zone bits being the second zone bits are added into the second set, and the second zone bits represent that the devices are off-line;
and the state confirmation module is used for sending messages to the target equipment in the first set and/or the second set and updating the state of the target equipment.
6. The device searching apparatus of claim 5, wherein the comparing module is further configured to compare the first list with the second list, and if a target device existing in the second list but not existing in the first list is found, add the target device to the first list, and set a flag bit corresponding to the target device in the first list as the first flag bit.
7. The device searching apparatus of claim 5, wherein the status confirmation module sends a message to the target device in the first set and/or the second set, updates the status of the target device, and performs the following operations:
sending a message to target equipment in the first set;
if the response message of the target equipment is received, judging that the target equipment is on line, and removing the target equipment from the first set;
if the response message of the target equipment is not received, continuing to send the message to the target equipment in the first set;
and when the response message of the target equipment is not received for a plurality of times continuously, judging that the target equipment is off-line, adding the target equipment into the second set, and setting the zone bit of the target equipment in the first list as a second zone bit.
8. The device searching apparatus according to claim 5 or 7, wherein the status confirmation module sends a message to the target device in the first set and/or the second set, updates the status of the target device, and performs the following operations:
periodically sending messages to target equipment in the second set;
if receiving the response message of the target equipment, judging that the target equipment is on line, removing the target equipment from the second set, and setting the zone bit of the target equipment in the first list as a first zone bit;
and if the response message of the target equipment is not received, continuing to periodically send the message to the target equipment in the second set.
9. An electronic device comprising a processor and a memory storing computer instructions, wherein the computer instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 4.
10. A computer-readable storage medium having stored thereon computer instructions, wherein the computer instructions are executable by a processor to perform the steps of the method of any one of claims 1-4.
CN202011589956.1A 2020-12-29 2020-12-29 Equipment searching method, device, equipment and storage medium Active CN114697147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011589956.1A CN114697147B (en) 2020-12-29 2020-12-29 Equipment searching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011589956.1A CN114697147B (en) 2020-12-29 2020-12-29 Equipment searching method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114697147A true CN114697147A (en) 2022-07-01
CN114697147B CN114697147B (en) 2024-04-05

Family

ID=82131628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011589956.1A Active CN114697147B (en) 2020-12-29 2020-12-29 Equipment searching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114697147B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796484A (en) * 2015-04-29 2015-07-22 西安诺瓦电子科技有限公司 Quick search connection method based on display screen control system
CN107124363A (en) * 2017-04-10 2017-09-01 华为技术有限公司 Message broadcasting method and apparatus
US20180052873A1 (en) * 2016-08-17 2018-02-22 International Business Machines Corporation Calibration of a first search query based on a second search query
CN109660976A (en) * 2018-12-20 2019-04-19 广州河东科技有限公司 Method, apparatus, system and the storage medium of equipment search
CN111427527A (en) * 2020-03-20 2020-07-17 海信视像科技股份有限公司 Screen projection method, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796484A (en) * 2015-04-29 2015-07-22 西安诺瓦电子科技有限公司 Quick search connection method based on display screen control system
US20180052873A1 (en) * 2016-08-17 2018-02-22 International Business Machines Corporation Calibration of a first search query based on a second search query
CN107124363A (en) * 2017-04-10 2017-09-01 华为技术有限公司 Message broadcasting method and apparatus
CN109660976A (en) * 2018-12-20 2019-04-19 广州河东科技有限公司 Method, apparatus, system and the storage medium of equipment search
CN111427527A (en) * 2020-03-20 2020-07-17 海信视像科技股份有限公司 Screen projection method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114697147B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
EP3297213B1 (en) Method and apparatus for identifying application information in network traffic
CN109963352B (en) Network access method and device of equipment, equipment and storage medium
CN113709839A (en) Multi-gateway network switching method, device and system, electronic equipment and storage medium
CN103248724A (en) SDN (Software-Defined Networking) controller-based DHCP (Dynamic Host Configuration Protocol) broadcast processing method
CN109040295B (en) Method and device for determining abnormal disconnection, terminal and storage medium
CN107204924B (en) Link discovery method and device
US10478731B2 (en) Method and apparatus for storing user data
CN112087475B (en) Message pushing method and device for cloud platform component application and message server
EP2071764B1 (en) A method, device and communication system thereof of electing local master
CN108880913B (en) traffic characteristic management method and device and central node server
CN114697147B (en) Equipment searching method, device, equipment and storage medium
CN112511440B (en) Message forwarding method, system, storage medium and electronic equipment
CN107819684B (en) Synchronous processing method and device
CN113132506B (en) Message processing method and device based on super virtual local area network
CN112437146B (en) Equipment state synchronization method, device and system
CN112737957B (en) Flow table aging method and device
CN110109933B (en) Information maintenance method, configuration management database system and storage medium
CN116847432A (en) Subnet fusion method and device, electronic equipment and storage medium
CN111385520B (en) Automatic networking method and device of video monitoring equipment
CN113360348A (en) Exception request processing method and device, electronic equipment and storage medium
CN101888387B (en) Method, device and snooping equipment for reestablishing binding table entry
CN107124293B (en) Protocol management method and system of distributed network system
CN110324155B (en) Multicast updating method, device and communication equipment
CN115175172B (en) Data processing method, device, electronic equipment and storage medium
CN115174388B (en) Network updating method, device, equipment and storage medium for networking intelligent equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant