CN114338456B - Image acquisition equipment state determining method and device, electronic equipment and medium - Google Patents

Image acquisition equipment state determining method and device, electronic equipment and medium Download PDF

Info

Publication number
CN114338456B
CN114338456B CN202011027573.5A CN202011027573A CN114338456B CN 114338456 B CN114338456 B CN 114338456B CN 202011027573 A CN202011027573 A CN 202011027573A CN 114338456 B CN114338456 B CN 114338456B
Authority
CN
China
Prior art keywords
state
image acquisition
port
target
acquisition equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011027573.5A
Other languages
Chinese (zh)
Other versions
CN114338456A (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 CN202011027573.5A priority Critical patent/CN114338456B/en
Publication of CN114338456A publication Critical patent/CN114338456A/en
Application granted granted Critical
Publication of CN114338456B publication Critical patent/CN114338456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the application discloses a method, a device, electronic equipment and a medium for determining the state of image acquisition equipment. The method comprises the following steps: if the state of the target port is detected to be switched, generating state switching information of the target port; the state switching of the target port is generated when the state switching of the target equipment connected with the target port exists; determining a target image acquisition device associated with the target port based on the association relationship between the port and the image acquisition device; and sending the state switching information and the identification of the target image acquisition equipment to the central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally. The scheme enables the central management platform to timely acquire and update the state of the image acquisition device through the detection of the network switching device to the target port and the reporting of the information.

Description

Image acquisition equipment state determining method and device, electronic equipment and medium
Technical Field
The embodiment of the application relates to the technical field of equipment state detection, in particular to a method and a device for determining the state of image acquisition equipment, electronic equipment and a medium.
Background
The image acquisition equipment generally performs unified management through the central management platform, registers with the central management platform, and periodically sends keep-alive messages so that the central management platform records that the image acquisition equipment is in an on-line state, and the marked image acquisition equipment can work normally.
After the image acquisition equipment is registered to the central management platform, the image acquisition equipment periodically sends keep-alive messages to the central management platform, the platform receives the keep-alive messages of the image acquisition equipment in the period, the state of the image acquisition equipment is set to be online, and otherwise, the state of the image acquisition equipment is set to be offline. However, the image acquisition equipment cannot send a keep-alive message after power failure or network failure, and the state of the image acquisition equipment can be set to be an offline state only when the central management platform does not receive the keep-alive message after the period time is reached. In the period from offline to the period when the image acquisition equipment reaches, the state of the image acquisition equipment marked by the central management platform is still in an online state, and the image acquisition equipment can be misused by a user, but the image acquisition equipment is not available in practice, so that the service is failed to start, and the user experience is affected.
Disclosure of Invention
The embodiment of the invention provides a method, a device, electronic equipment and a medium for determining the state of image acquisition equipment, which are used for timely acquiring the state change of the image acquisition equipment and switching the recording state of the image acquisition equipment.
In one embodiment, an embodiment of the present application provides a method for determining a status of an image capturing device, which is performed by a network switching device, and includes:
if the state of the target port is detected to be switched, generating state switching information of the target port; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
determining a target image acquisition device associated with the target port based on the association relation between the port and the image acquisition device;
and sending the state switching information and the identification of the target image acquisition equipment to a central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally.
In another embodiment, an embodiment of the present application further provides an apparatus for determining a status of an image capturing device, configured to a network switching device, where the apparatus includes:
The state switching information generation module is used for generating state switching information of the target port if the state of the target port is detected to be switched; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
the association equipment determining module is used for determining target image acquisition equipment associated with the target port based on the association relation between the port and the image acquisition equipment;
and the information sending module is used for sending the state switching information and the identification of the target image acquisition equipment to a central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally.
In still another embodiment, an embodiment of the present application further provides an image capturing device status determining device, including: one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image capturing device state determining method according to any of the embodiments of the present application.
In yet another embodiment, the present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the image capturing device state determining method according to any of the embodiments of the present application.
In the embodiment of the application, the state switching of the target port is detected through the network switching equipment, so that the state switching of the target equipment connected with the target port is timely acquired, the target image acquisition equipment associated with the target port is determined, and the central management platform is informed to switch the recording state of the target image acquisition equipment, so that the problem that the central management platform cannot timely acquire the original state and still records the original state when the state of the image acquisition equipment is changed is avoided, the central management platform can timely acquire the state of the image acquisition equipment when the state of the image acquisition equipment is switched, and the current recording state of the image acquisition equipment is accurately changed.
Drawings
Fig. 1 is a schematic structural diagram of a communication system of an image capturing device according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for determining a status of an image capturing device according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for determining a status of an image capturing device according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of an image capturing device status determining apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that, in the embodiment of the present application, the image capturing device may be a device capable of capturing an image or capturing a video, such as a camera, a video camera, a mobile phone with a photographing function, and the like. The target device may be a network switching device and/or an image capturing device, where the network switching device is a device for expanding a network, and may provide more connection ports for sub-networks to connect more terminal devices, such as switches, routers, hubs, etc. As shown in fig. 1, the central management platform may be communicatively connected to a network switching device through an IP network, where the network switching device is connected to an image capturing device, and the network switching device may also be cascaded. Among the two cascaded adjacent network switching devices, the network switching device with a small communication distance from the central management platform is an upper network switching device of the network switching device with a large communication distance from the central management platform. In fig. 1, a network switching device 1 is a superior network switching device to a network switching device 2. For the image capturing device, the upper level network switching device is a network switching device directly connected to the image capturing device, for example, in fig. 1, the upper level network switching devices of the image capturing device 1, the image capturing device 2 and the image capturing device 3 are network switching devices 2, and the upper level network switching device of the image capturing device 4 is network switching device 1. In the embodiment of the present application, if the target device in which the state switching occurs is an image capturing device, the method provided in the embodiment of the present application is performed by an upper network switching device of the image capturing device, that is, by a network switching device directly connected thereto, for example, when the state of the image capturing device 1 is switched, the method provided in the embodiment of the present application is performed by the network switching device 2. If the target device with state switching is a network switching device, the upper network switching device executes the method provided by the embodiment of the application. For example, when the state of the network switching device 2 is switched, the method provided by the embodiment of the present application is executed by the network switching device 1.
Fig. 2 is a flowchart of a method for determining a status of an image capturing device according to an embodiment of the present invention. The method for determining the state of the image capturing device provided by the embodiment can be suitable for determining the state of the image capturing device. Typically, the method can be applied to the situation that the state of the image acquisition equipment is switched by timely determining the state switching of the image acquisition equipment through the network switching equipment, and indicating the central management platform to switch the recorded state of the image acquisition equipment. The method may in particular be performed by an image acquisition device state determining means, which may be implemented in software and/or hardware, which may be integrated in an electronic device. Referring to fig. 2, the method in the embodiment of the present application specifically includes:
s110, if the state of the target port is detected to be switched, generating state switching information of the target port; the state switching of the target port is generated when the state switching of the target device connected with the target port exists.
In the embodiment of the application, the operation of port state switching detection is performed by the network switching device to which each port belongs. Each network switching device detects the state of its own port, and when any network switching device detects that the state of any port of itself is switched, the network switching device executes the method in the embodiment of the present application. The port in which the state is switched is the target port.
When the target device connected with the port is powered off or fails to be offline, the state of the port is switched accordingly. When the target device connected with the port is registered on line again, the state of the port is switched accordingly. And if the network switching equipment detects that the switching of the state of the target port exists, generating state switching information of the target port. The state switching information may include an identification of the target port, a state before the target port is switched, a state after the target port is switched, and the like.
In the embodiment of the present application, the switching of the state of the target port and the switching of the state of the target device are corresponding, for example, when the state of the target device is switched from online to offline, the state of the target port is switched from UP to DOWN, and when the state of the target device is switched from offline to online, the state of the target port is switched from DOWN to UP. Based on this, the state of the target device connected to the target port can be determined directly from the detected state switching condition of the target port, for example, when the state of the target port is detected to be switched from UP to DOWN, it can be determined that the state of the target device connected to the target port is switched from the on-line state to the off-line state. When the state of the target port is detected to be switched from the DOWN state to the UP state, it can be determined that the state of the target device connected with the target port is switched from the offline state to the online state.
The method has the beneficial effects that through detecting the port state switching, the state switching of the target equipment connected with the port is timely known, so that the recorded state of the image acquisition equipment is switched later, and a user selects the online image acquisition equipment for use according to the current state of the image acquisition equipment.
S120, determining target image acquisition equipment associated with the target port based on the association relation between the port and the image acquisition equipment.
The association relationship between the port and the image acquisition device may be a communication association relationship between the port and the image acquisition device. For example, in fig. 1, when the image capturing apparatus 1 communicates with the central management platform and needs to make communication signals flow into the PORT1 (PORT 1) and the PORT5 (PORT 5), the image capturing apparatus 1 has an association relationship with the PORT1 and the PORT5, respectively. When the image capturing device 4 communicates with the central management platform and a communication signal needs to flow into the PORT6 (PORT 6), the image capturing device 4 and the PORT6 have an association relationship.
In the embodiment of the application, the association relationship may be established when the network switching device receives the registration online notification message sent by the image acquisition device through the port, or may instruct the network switching device to establish when the central management platform receives the registration online notification message sent by the image acquisition device. The network switching equipment not only establishes the image acquisition equipment directly connected with the own port and the association relation between the own ports, but also establishes the image acquisition equipment indirectly connected with the own ports through the lower-level network switching equipment and the association relation between the own ports. For the network switching device 2, an image capturing device directly connected to its own PORT1 (PORT) is an image capturing device 1, and no image capturing device indirectly connected to the PORT1 is used to establish an association relationship between the PORT1 and the image capturing device 1. For the network switching device 1, there is no image capturing device directly connected to its own port5, and the image capturing device 1, the image capturing device 2, and the image capturing device 3 are indirectly connected to the port5 through the network switching device 2, and therefore, the association relationship of the port5 with the image capturing device 1, the image capturing device 2, and the image capturing device 3 is established.
Specifically, when the state of the target device connected to the target port is switched, signal transmission of all the image capturing devices communicating through the target port is affected, for example, when the state of the target port 5 is switched from UP to DOWN, that is, from an on-line state to an off-line state, it is determined that the state of the network switching device 2 is switched from the on-line state to the off-line state, and at this time, all of the image capturing device 1, the image capturing device 2 and the image capturing device 3 cannot communicate with the central management platform and should be switched to the off-line state, so that according to the association relationship between the port and the image capturing device, all the target image capturing devices having the association relationship with the target port need to be found, so that the central management platform switches the state of the target image capturing device, and accurately records the current real state of the target image capturing device.
The method has the beneficial effects that when the state of the target port is detected to be switched, the state of the target image acquisition equipment associated with the target port is traced back, so that the central management platform can update the state of the target image acquisition equipment in time, and the current state of the target image acquisition equipment can be recorded more accurately.
And S130, sending the state switching information and the identification of the target image acquisition equipment to a central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally.
Because the image acquisition equipment is uniformly managed and scheduled by the central management platform, the central management platform needs to accurately record the current state of the image acquisition equipment, and timely acquire and switch the recorded state of the image acquisition equipment when the state of the image acquisition equipment changes, so that the condition that a user continuously uses the image acquisition equipment in an offline state due to untimely misleading of state change is avoided. In the embodiment of the application, when the network switching equipment detects that the state of the target port is switched, the network switching equipment sends the state switching information of the target port and the identification of the target image acquisition equipment to the central management platform, so that the central management equipment timely switches the state of the locally recorded target image acquisition equipment. For example, when the network switching device detects that the state of the target port is switched from UP to DOWN, the network switching device sends information that the state of the target port is switched from UP to DOWN to the central management platform, and sends the identifier of the target image acquisition device associated with the target port, and after receiving the information sent by the network switching device, the central management platform switches the state of the target image acquisition device corresponding to the received identifier to an offline state, so that the starting failure caused by the fact that the user continues to use the target image acquisition device is avoided.
In the embodiment of the application, the state switching of the target port is detected through the superior network switching equipment, so that the state switching of the target equipment connected with the target port is timely known, the target image acquisition equipment associated with the target port is determined, and the central management platform is informed to switch the recording state of the target image acquisition equipment, so that the problem that the central management platform cannot timely know and still record the original state when the state of the image acquisition equipment is changed is avoided, the central management platform can timely know the state of the image acquisition equipment when the state of the image acquisition equipment is switched, and the current state of the recorded image acquisition equipment is accurately changed.
Fig. 3 is a flowchart of a method for determining a status of an image capturing device according to another embodiment of the present invention. The embodiments of the present application are further optimized for the above embodiments, and details not described in detail in the present embodiment are detailed in the above embodiments. Referring to fig. 3, the method for determining the state of the image capturing device provided in the present embodiment may include:
s210, detecting the state of at least one port according to a preset period.
The preset period can be set according to actual conditions. The state of at least one port is detected according to a preset period, so that the state of the port can be timely obtained when the state of the port is switched. In this embodiment of the present application, all network switching devices may execute the step of performing state detection on at least one port according to a preset period, and when any port of any network switching device is in state switching, the network switching device that detects that the target port is in state switching executes the subsequent step.
S220, if detecting that a target port with a switched state exists in at least one port, generating state switching information of the target port according to the identification of the target port, the pre-switching state and the post-switching state of the target port.
Specifically, the network switching device detecting that the state switching of the target port occurs generates state switching information, so that the central management platform determines the change of the state of the target image acquisition device associated with the target port according to the state switching information. For example, if the state before the target port is switched in the state switching information is UP and the state after the switching is DOWN, the central management platform may determine that the state of the target image capturing device associated with the target port is switched from the on-line state to the off-line state, so as to change the locally recorded state of the target image capturing device accordingly.
S230, determining the image acquisition equipment associated with the target port based on the association relation between the port and the image acquisition equipment.
S240, recording the image acquisition equipment with the online state in the image acquisition equipment associated with the target port, and determining the image acquisition equipment with the online state as the target image acquisition equipment associated with the target port.
Specifically, when the image acquisition equipment is on line, an on-line message is generally sent to the central management platform immediately, and a keep-alive message is sent regularly, so that when the image acquisition equipment is switched from an off-line state to an on-line state, the central management platform can timely receive the on-line message of the image acquisition equipment, and accordingly changes the recorded state of the image acquisition equipment, and switches to the on-line state. When the image acquisition equipment is offline, an offline message cannot be timely sent to the central management equipment to inform the central management platform of changing the state of the image acquisition equipment, so that the central management platform is inaccurate in recording state of the image acquisition equipment. Based on this, the embodiment of the application mainly aims at the situation that the image acquisition equipment is switched from the on-line state to the off-line state, and the scheme in the embodiment of the application is adopted for timely updating the state. When detecting that the target port with the switched state exists, the network switching device searches the image acquisition device with the online recording state from the image acquisition device associated with the target port as the target image acquisition device associated with the target port, so that the central management platform switches the state of the target image acquisition device from the online state to the offline state.
S250, assembling a state update notification message according to the state switching information, the identification of the target image acquisition equipment and the state update identification; the state update identifier is used for enabling the central management platform to determine that the state update notification message is used for updating the state of the image acquisition equipment.
In the embodiment of the application, the network switching device assembles the state switching information, the identifier of the target image acquisition device and the state update identifier into a state update notification message, so that the central management platform switches the state of the target image acquisition device according to the state update notification message.
In order to identify that the state update notification message is used for updating the state of the image acquisition equipment, the state update notification message carries a state update identifier, so that the central management platform determines that the state update notification message is used for updating the state of the image acquisition equipment according to the state update identifier.
And S260, sending the state update notification message to the central management platform so that the central management platform can switch the state of the locally recorded target image acquisition equipment.
The central management device analyzes the state switching information, the identifier of the target image acquisition device and the state update identifier from the state update notification message, and updates the locally recorded state of the target image acquisition device.
According to the technical scheme, through detecting the port state, state switching of target equipment connected with the port is timely obtained. The online image acquisition equipment is used as the target image acquisition equipment associated with the target port in the image acquisition equipment associated with the target port, so that the record state of the target image acquisition equipment with the online-to-offline state change can be updated and switched in time.
In this embodiment of the present application, after sending the status switching information and the identifier of the target image capturing device to a central management platform, the method further includes: receiving a response message returned by the central management platform and updating the recording state of the target image acquisition equipment; and forwarding the response message to other network switching equipment so that the other network switching equipment can update the record state of the target image acquisition equipment.
The central management platform returns a response message to the network switching device after switching the recorded state of the target image acquisition device, and the network switching device modifies the locally recorded state of the target image acquisition device after receiving the response message. Because the state of the target image acquisition device may also be recorded in other network switching devices, the response message is forwarded to the other network switching devices so that the other network switching devices update the recording state of the target image acquisition device. The other network switching device may be a network switching device connected to a network switching device executing the method in the embodiment of the present application, where the response message is forwarded through the interconnected ports.
In the embodiment of the present application, a process for establishing an association relationship between a port and an image acquisition device includes: if the registration online information of the first image acquisition equipment is received through the port, establishing an association relation between the port and the first image acquisition equipment; and/or if the registration online information of the second image acquisition equipment sent by other ports is received through the ports, establishing the association relation between the ports and the second image acquisition equipment. The establishing process of the association relation between the port and the image acquisition equipment further comprises the following steps: and if the registration online information of the first image acquisition equipment is received through the port, transmitting the registration online information of the first image acquisition equipment to the port of the upper-level network switching equipment so that the upper-level network switching equipment establishes an association relation between the port for receiving the registration online information and the first image acquisition equipment.
The number of the first image acquisition device and the second image acquisition device can be one or more, and is not limited. An image acquisition device sends registration online information to a network switching device through a port. The connection in fig. 1 is exemplified as an example. If the network switching device 2 receives the registration online information sent by the image acquisition device 1 through the port 1, the image acquisition device 2 through the port 2 and the image acquisition device 3 through the port 3, the association relationship between the image acquisition device 1 and the port 1 is established, the state of the image acquisition device 1 is recorded to be in an online state, the association relationship between the image acquisition device 2 and the port 2 is established, the state of the image acquisition device 2 is recorded to be in an online state, the association relationship between the image acquisition device 3 and the port 3 is established, and the state of the image acquisition device 3 is recorded to be in an online state. The network switching device 2 sends the registration online information sent by the image acquisition device 1 through the port 1, the image acquisition device 2 through the port 2 and the image acquisition device 3 through the port 3 to the upper-level network switching device 1 through the port 5, and the network switching device 1 establishes the association relationship between the port 5 and the image acquisition device 1, the image acquisition device 2 and the image acquisition device 3 and records that the registration online information is in an online state. In addition, if the network switching device 1 receives the registration online information sent by the image acquisition device 4 through the port 6, the association relationship between the port 6 and the image acquisition device 4 is established, and the image acquisition device 4 is recorded as an online state. The association relationship may be represented in the form of a table, as shown in the following table.
TABLE 1
Port (port) Image acquisition device identification Status of
PORT1 IPC1 Online line
PORT2 IPC2 Online line
PORT3 IPC3 Online line
PORT4 IPC4 Online line
TABLE 2
Table 1 is the association between the port recorded in the network switching device 2 and the image capturing device, and table 2 is the association between the port recorded in the network switching device 1 and the image capturing device. Wherein the image capturing device identification may be an ID and/or an IP of the image capturing device. PORT1 is PORT1, PORT2 is PORT2, and so on. IPC refers to an image capturing apparatus, IPC1 is the image capturing apparatus 1, IPC2 is the image capturing apparatus 2, and so on.
The method has the beneficial effects that when the image acquisition equipment is registered to be on line, the image acquisition equipment associated with each port is completely and accurately recorded, so that when the state of the port is switched, the image acquisition equipment in an off-line state can be searched, and the state of the off-line image acquisition equipment can be timely modified.
The following is a specific implementation flow of the method for determining the state of the image capturing device provided in the embodiment of the present application, which is specifically as follows:
the image acquisition equipment sends a registration message to the central management platform, and after successful registration, the image acquisition equipment receives a response message of the central management platform.
After the image acquisition equipment is successfully registered, a multicast message is encapsulated and sent to the network switching equipment connected with the multicast message, and the message carries the image acquisition equipment identification and the state information. The multicast message is the registration online notification message in the above embodiment.
After receiving the multicast message, the access terminal network switching device of the image acquisition device can judge that the message is for device information synchronization according to the destination IP. The destination IP is an IP address of the multicast message sent by the image acquisition equipment to the network switching equipment. The network switching equipment extracts the information of the image acquisition equipment in the multicast message and records the information in the association relation table, forwards the multicast message from other ports except the port for receiving the message to other network switching equipment, and after receiving the multicast message, the other network switching equipment unpacks the information of the image acquisition equipment and records the information in the association relation table. Each network switching device in the final network records an association table, as shown in the following table.
TABLE 3 Table 3
Port (port) Image acquisition device IP Image acquisition device identification ID Status of
PORT1 IP1 IPC1 UP
PORT2 IP2 IPC2 UP
PORT3 IP3 IPC3 UP
PORT4 IP4 IPC4 UP
TABLE 4 Table 4
Wherein, IP1, IP2, IP3 and IP4 are IP addresses of the image acquisition equipment, the UP state represents an on-line state, and the DOWN state represents an off-line state.
The above process can be performed at any time, and the steps of establishing the association relationship and recording the information of the image acquisition equipment can be performed as long as the multicast message sent after the image acquisition equipment is registered and online is received.
When the image acquisition device is powered off or the network switching device is powered off, the port state of the network switching device directly connected with the image acquisition device is switched from an UP state to a DOWN state. And a state detection module in the network switching equipment periodically patrols and examines the port state according to a preset period, and if the port state is detected to change, a message written with the port identifier and the port state is sent to an information notification module. After receiving the information, the information notification module searches the association relation table according to the port identification, and if the target image acquisition equipment which is associated with the port and has the current recording state of being in an on-line state exists, the information notification module sends a message carrying the identification and the state of the target image acquisition equipment to the processing module.
And after receiving the information, the processing module encapsulates and registers the offline message according to the information content, wherein the offline message comprises a target image acquisition equipment identifier, a pre-switching state, a post-switching state and a state update identifier of a port with a state switched, and the offline message is sent to the central management platform through a unicast message.
After receiving the registration offline message, the central management platform can judge that the registration offline message is used for updating the state of the image acquisition equipment according to the state update identifier. The registration offline message package has two cases:
1) If the image acquisition equipment is powered off, the network switching equipment directly connected with the image acquisition equipment encapsulates a registration offline message, and the registration offline message information carries the identification of the target image acquisition equipment, the pre-switching state, the post-switching state and the state updating identification of the port with the state switched.
2) The network switching equipment is powered off, the upper level network switching equipment directly connected with the powered off network switching equipment encapsulates a registration offline message, and the registration offline message carries all target image acquisition equipment identifiers associated with ports connected with the powered off network switching equipment, the pre-switching state, the post-switching state and the state updating identifiers of the ports with the states switched.
The central management platform receives the registration offline message sent by the network switching device, finds out the associated target image acquisition device according to the information in the registration offline message, switches the state of the target image acquisition device into an offline state, and sends a response message to the network switching device.
After receiving the response message returned by the central management platform, the network switching equipment updates the state of the target image acquisition equipment recorded locally, sets the state as DOWN, and simultaneously sends the response message to other network switching equipment information synchronization in the network.
In the case where the image capturing apparatus 1 is powered off and off, the association table recorded in the network switching apparatus 1 and the network switching apparatus 2 is updated as shown in tables 5 and 6.
TABLE 5
Port (port) Image acquisition device IP Image acquisition device ID Status of
PORT1 IP1 IPC1 DOWN
PORT2 IP2 IPC2 UP
PORT3 IP3 IPC3 UP
PORT4 IP4 IPC4 UP
TABLE 6
When the network switching device 2 is powered off and offline, the association table recorded in the network switching device 1 is updated as shown in table 7.
TABLE 7
After the image acquisition equipment is re-registered and online, the method returns to the starting step, and sends a registration message to the central management platform, and encapsulates a multicast message to be sent to the network switching equipment connected with the multicast message. And continuing with the subsequent steps.
The specific implementation method provided by the embodiment of the application has the same beneficial effects as any embodiment.
Fig. 4 is a schematic structural diagram of an apparatus for determining a status of an image capturing device according to an embodiment of the present invention. The apparatus may be adapted to determine a status of the image acquisition device. Typically, the method can be applied to the situation that the state switching of the image acquisition equipment is timely determined through the network switching equipment, and the central management platform is instructed to switch the recording state. The apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in an electronic device. Referring to fig. 4, the apparatus specifically includes:
A state switching information generating module 310, configured to generate state switching information of a target port if it is detected that the state of the target port is switched; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
an association device determining module 320, configured to determine a target image capturing device associated with the target port based on an association relationship between the port and the image capturing device;
and the information sending module 330 is configured to send the status switching information and the identifier of the target image capturing device to a central management platform, so that the central management platform switches the status of the target image capturing device recorded locally.
In the embodiment of the present application, the state switching information generating module 310 includes:
the periodic detection unit is used for detecting the state of at least one port according to a preset period;
and the information generating unit is used for generating state switching information of the target port according to the identification of the target port, the pre-switching state and the post-switching state of the target port if the target port with the switched state is detected in at least one port.
In an embodiment of the present application, the association device determining module 320 includes:
the association equipment searching unit is used for determining the image acquisition equipment associated with the target port based on the association relation between the port and the image acquisition equipment;
and the online equipment determining unit is used for determining the image acquisition equipment with the online state as the target port-associated target image acquisition equipment in the image acquisition equipment with the target port-associated target port.
In an embodiment of the present application, the apparatus further includes:
the first association relation establishing module is used for establishing an association relation between the port and the first image acquisition equipment if the registration online information of the first image acquisition equipment is received through the port; and/or the number of the groups of groups,
and the second association relation establishing module is used for establishing the association relation between the port and the second image acquisition equipment if the registration online information of the second image acquisition equipment sent by other ports is received through the port.
In an embodiment of the present application, the apparatus further includes:
and the forwarding module is used for sending the registration online information of the first image acquisition equipment to the port of the upper-level network switching equipment if the registration online information of the first image acquisition equipment is received through the port, so that the upper-level network switching equipment establishes an association relation between the port for receiving the registration online information and the first image acquisition equipment.
In the embodiment of the present application, the information sending module 330 includes:
the message assembling unit is used for assembling a state update notification message according to the state switching information, the identifier of the target image acquisition equipment and the state update identifier; the state update identifier is used for enabling the central management platform to determine that the state update notification message is used for updating the state of the image acquisition equipment;
and the message sending unit is used for sending the state update notification message to the central management platform.
In an embodiment of the present application, the apparatus further includes:
the record state updating module is used for receiving a response message returned by the central management platform and updating the record state of the target image acquisition equipment;
and the response message forwarding module is used for forwarding the response message to other network switching equipment so as to enable the other network switching equipment to update the record state of the target image acquisition equipment.
In an embodiment of the present application, the target device includes an image capturing device and/or a network switching device.
The image acquisition equipment state determining device provided by the embodiment of the application can execute the image acquisition equipment state determining method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the executing method.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary electronic device 412 suitable for use in implementing embodiments of the present application. The electronic device 412 shown in fig. 5 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments herein.
As shown in fig. 5, the electronic device 412 may include: one or more processors 416; a memory 428 for storing one or more programs that, when executed by the one or more processors 416, cause the one or more processors 416 to implement the image capturing device status determination method provided by the embodiments of the present application, comprising:
if the state of the target port is detected to be switched, generating state switching information of the target port; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
determining a target image acquisition device associated with the target port based on the association relation between the port and the image acquisition device;
and sending the state switching information and the identification of the target image acquisition equipment to a central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally.
Components of electronic device 412 may include, but are not limited to: one or more processors or processors 416, a memory 428, and a bus 418 that connects the different device components (including the memory 428 and the processor 416).
Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 412 typically includes a variety of computer-device-readable storage media. Such storage media can be any available storage media that can be accessed by electronic device 412 and includes both volatile and nonvolatile storage media, removable and non-removable storage media.
The memory 428 may include computer device readable storage media in the form of volatile memory, such as Random Access Memory (RAM) 430 and/or cache memory 432. The electronic device 412 may further include other removable/non-removable, volatile/nonvolatile computer device storage media. By way of example only, storage system 434 may be used to read from or write to a non-removable, nonvolatile magnetic storage medium (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical storage medium), may be provided. In such cases, each drive may be coupled to bus 418 via one or more data storage medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored in, for example, the memory 428, such program modules 442 including, but not limited to, an operating device, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 442 generally perform the functions and/or methodologies in the described embodiments of the invention.
The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 424, etc.), one or more devices that enable a user to interact with the electronic device 412, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 412 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 422. Also, the electronic device 412 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through the network adapter 420. As shown in fig. 5, network adapter 420 communicates with other modules of electronic device 412 over bus 418. It should be appreciated that although not shown in fig. 5, other hardware and/or software modules may be used in connection with electronic device 412, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, data backup storage devices, and the like.
The processor 416 performs various functional applications and data processing by executing at least one of the other programs among the plurality of programs stored in the memory 428, for example, to implement an image capturing device state determining method provided by the embodiments of the present application.
An embodiment of the present invention provides a storage medium containing computer-executable instructions for performing an image acquisition device state determination method when executed by a computer processor, comprising:
if the state of the target port is detected to be switched, generating state switching information of the target port; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
determining a target image acquisition device associated with the target port based on the association relation between the port and the image acquisition device;
and sending the state switching information and the identification of the target image acquisition equipment to a central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally.
Any combination of one or more computer-readable storage media may be employed as the computer storage media of the embodiments herein. The computer readable storage medium may be a computer readable signal storage medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or means, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: 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 or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present application, a computer-readable storage medium may be any tangible storage medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or means.
The computer readable signal storage medium may include a propagated data signal with computer readable program code embodied therein, either 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 of the foregoing. A computer readable signal storage medium may also be any computer readable storage medium that is not a computer readable storage medium and that can transmit, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
Program code embodied on a computer readable storage medium may be transmitted using any appropriate storage medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations 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, smalltalk, C ++ 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 device. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A method for determining a status of an image capturing device, the method comprising:
if the state of the target port is detected to be switched, generating state switching information of the target port; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
determining a target image acquisition device associated with the target port based on the association relation between the port and the image acquisition device;
the state switching information and the identification of the target image acquisition equipment are sent to a central management platform, so that the central management platform switches the state of the target image acquisition equipment which is locally recorded;
The establishment process of the association relation between the port and the image acquisition equipment comprises the following steps:
if the registration online information of the first image acquisition equipment is received through the port, establishing an association relation between the port and the first image acquisition equipment; and/or the number of the groups of groups,
and if the port receives the registration online information of the second image acquisition equipment sent by other ports, establishing an association relation between the port and the second image acquisition equipment.
2. The method of claim 1, wherein generating state switching information for the target port if a state switch of the target port is detected, comprises:
detecting the state of at least one port according to a preset period;
if the existence of a target port with a switched state in at least one port is detected, generating state switching information of the target port according to the identification of the target port, the pre-switching state and the post-switching state of the target port.
3. The method of claim 1, wherein determining a target image capture device associated with the target port based on an association of ports with image capture devices, comprises:
Determining an image acquisition device associated with the target port based on the association relationship between the port and the image acquisition device;
and recording the image acquisition equipment with the online state in the image acquisition equipment associated with the target port, and determining the image acquisition equipment with the online state as the target image acquisition equipment associated with the target port.
4. The method of claim 1, wherein the process of establishing the association of the port with the image capturing device further comprises:
and if the registration online information of the first image acquisition equipment is received through the port, transmitting the registration online information of the first image acquisition equipment to the port of the upper-level network switching equipment so that the upper-level network switching equipment establishes an association relation between the port for receiving the registration online information and the first image acquisition equipment.
5. The method of claim 1, wherein transmitting the status switching information and the identification of the target image capture device to a central management platform comprises:
assembling a state update notification message according to the state switching information, the identifier of the target image acquisition equipment and the state update identifier; the state update identifier is used for enabling the central management platform to determine that the state update notification message is used for updating the state of the image acquisition equipment;
And sending the state update notification message to the central management platform.
6. The method of claim 1, wherein after sending the status switching information and the identification of the target image capturing device to a central management platform, the method further comprises:
receiving a response message returned by the central management platform and updating the recording state of the target image acquisition equipment;
and forwarding the response message to other network switching equipment so that the other network switching equipment can update the record state of the target image acquisition equipment.
7. The method according to claim 1, wherein the target device comprises an image acquisition device and/or a network switching device.
8. An image capturing device state determining apparatus, characterized in that the apparatus comprises:
the state switching information generation module is used for generating state switching information of the target port if the state of the target port is detected to be switched; the state switching of the target port is generated when the state switching of target equipment connected with the target port exists;
the association equipment determining module is used for determining target image acquisition equipment associated with the target port based on the association relation between the port and the image acquisition equipment;
The establishment process of the association relation between the port and the image acquisition equipment comprises the following steps:
if the registration online information of the first image acquisition equipment is received through the port, establishing an association relation between the port and the first image acquisition equipment; and/or the number of the groups of groups,
if the port receives the registration online information of the second image acquisition equipment sent by other ports, establishing an association relation between the port and the second image acquisition equipment;
and the information sending module is used for sending the state switching information and the identification of the target image acquisition equipment to a central management platform so that the central management platform switches the state of the target image acquisition equipment recorded locally.
9. An electronic device, the electronic device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image capture device state determination method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the image capturing device status determining method according to any one of claims 1 to 7.
CN202011027573.5A 2020-09-25 2020-09-25 Image acquisition equipment state determining method and device, electronic equipment and medium Active CN114338456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011027573.5A CN114338456B (en) 2020-09-25 2020-09-25 Image acquisition equipment state determining method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011027573.5A CN114338456B (en) 2020-09-25 2020-09-25 Image acquisition equipment state determining method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN114338456A CN114338456A (en) 2022-04-12
CN114338456B true CN114338456B (en) 2024-03-22

Family

ID=81010635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011027573.5A Active CN114338456B (en) 2020-09-25 2020-09-25 Image acquisition equipment state determining method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114338456B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105191279A (en) * 2013-01-15 2015-12-23 威智伦公司 Security camera having dual communication ports
CN107979637A (en) * 2017-11-15 2018-05-01 广州德为信息技术有限公司 A kind of monitoring method and device based on rotating ring main-engine control desk
CN109639630A (en) * 2018-10-30 2019-04-16 国网陕西省电力公司信息通信公司 A kind of terminal prot managing and control system and management-control method
CN110858925A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Method, device and system for realizing video stream switching
CN111626597A (en) * 2020-05-22 2020-09-04 广东电网有限责任公司 Equipment alarm method, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9830246B2 (en) * 2014-06-18 2017-11-28 International Business Machines Corporation Management and correlation of network identification for communication errors

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105191279A (en) * 2013-01-15 2015-12-23 威智伦公司 Security camera having dual communication ports
CN107979637A (en) * 2017-11-15 2018-05-01 广州德为信息技术有限公司 A kind of monitoring method and device based on rotating ring main-engine control desk
CN110858925A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Method, device and system for realizing video stream switching
CN109639630A (en) * 2018-10-30 2019-04-16 国网陕西省电力公司信息通信公司 A kind of terminal prot managing and control system and management-control method
CN111626597A (en) * 2020-05-22 2020-09-04 广东电网有限责任公司 Equipment alarm method, device, equipment and medium

Also Published As

Publication number Publication date
CN114338456A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN112738791B (en) User information correlation backfill method, device, equipment and medium based on 5G core network
JP4558139B2 (en) Network management device
CN111787031B (en) Method for sending control instruction of Internet of things equipment based on distributed technology
CN108924043A (en) System monitoring method, gateway communication, gateway apparatus, service processing equipment
CN107852344B (en) Storage network element discovery method and device
TW201828658A (en) Method for detecting internet protocol address and media access control address
CN109286684B (en) Communication connection processing method and device, proxy server and storage medium
CN111405059A (en) Data transmission method of cloud equipment, electronic equipment and Internet of things system
CN115412540A (en) Remote equipment debugging method and device, electronic equipment and storage medium
CN108881247B (en) Message conversion method, device, gateway equipment and storage medium
CN114338456B (en) Image acquisition equipment state determining method and device, electronic equipment and medium
CN112600703B (en) Network equipment remote access fault positioning method and device
EP3944582A1 (en) Monitoring of abnormal host
CN110248156B (en) Video analysis method, platform equipment, intelligent camera and intelligent monitoring system
CN114158074B (en) 5G network element address determination method and device, electronic equipment and storage medium
CN115685971A (en) Vehicle diagnosis method and related device
CN113612659A (en) Equipment networking test method and device, electronic equipment and storage medium
CN113904980B (en) Channel switching method, device, switch and storage medium
CN109981796A (en) A kind of connection method and device
US20080198762A1 (en) Cross-subnet-nodes subnet node device detection method
CN112543224B (en) Method for interfacing with system in power communication network
CN115065649B (en) Method, device, equipment and storage medium for determining service message forwarding mode
CN112532524B (en) Message processing method and device
CN117640722A (en) Network communication method, device, equipment and storage medium
CN117176544A (en) Fault processing method and device of network equipment and electronic 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