CN112714161A - Video access method, device and system - Google Patents
Video access method, device and system Download PDFInfo
- Publication number
- CN112714161A CN112714161A CN202011523838.0A CN202011523838A CN112714161A CN 112714161 A CN112714161 A CN 112714161A CN 202011523838 A CN202011523838 A CN 202011523838A CN 112714161 A CN112714161 A CN 112714161A
- Authority
- CN
- China
- Prior art keywords
- target
- acquisition equipment
- gateway device
- video
- cloud server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
- H04N7/181—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention provides a video access method, a video access device and a video access system, which are applied to the technical field of video monitoring. The video access method is applied to a target gateway device, and comprises the following steps: determining a target operation to be executed for a target acquisition device; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the corresponding relationship is configured with a Software Development Kit (SDK) for the corresponding video acquisition equipment; and executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment. By the scheme, the complexity of video access can be reduced.
Description
Technical Field
The invention relates to the technical field of video monitoring, in particular to a video access method, a video access device and a video access system.
Background
Video access is a key step in applications such as video content analysis and video content storage. By video access is meant: video acquisition is carried out through video acquisition equipment such as a network camera, a network video recorder, infrared thermal imaging and entrance guard equipment, and then the pulling of video stream and the management and control of the video acquisition equipment are realized through a cloud server. Specifically, a user can log in to the cloud server through a login page and send an operation instruction to the cloud server, so that the cloud server executes an operation corresponding to the operation instruction on the corresponding video acquisition device, for example: video stream pull, or disable/enable video capture device.
However, the video capture devices are provided with a plurality of suppliers, which results in different specifications of the video capture devices, and then the cloud server needs to be adapted to various video capture devices, which undoubtedly increases the complexity of video access.
Disclosure of Invention
The embodiment of the invention aims to provide a video access method, a video access device and a video access system so as to reduce the complexity of video access. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a video access method, which is applied to a target gateway device, and the method includes:
determining a target operation to be executed for a target acquisition device; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the corresponding relationship is configured with a Software Development Kit (SDK) for the corresponding video acquisition equipment;
and executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
Optionally, the executing, by using the SDK for the target acquisition device, the target operation on the target acquisition device includes:
and logging in the target acquisition equipment by using the SDK aiming at the target acquisition equipment, and executing the target operation on the target acquisition equipment.
Optionally, the determining a target operation to be performed for the target acquisition device includes:
receiving an operation request aiming at target acquisition equipment issued by a cloud server;
determining a target operation to be executed, which is indicated by the operation request;
the method further comprises the following steps:
and feeding back a response result to the cloud server, wherein the response result is an execution result of the target gateway device executing the target operation.
Optionally, before receiving the operation request for the target acquisition device issued by the cloud server, the method further includes:
acquiring a state query request which is issued by a cloud server and aims at the target acquisition equipment; the state query request is issued by the cloud server before the operation request is issued to the target gateway device;
acquiring equipment state information of the target acquisition equipment from a local memory; the local memory records equipment state information of video acquisition equipment corresponding to the target gateway device;
and feeding back the acquired equipment state information to the cloud server, so that the cloud server issues an operation request aiming at the target acquisition equipment to the target gateway device when detecting that the equipment state information represents an online state.
Optionally, the method further comprises:
periodically determining storage information of the corresponding video acquisition equipment based on the SDK aiming at the corresponding video acquisition equipment, storing the storage information of the corresponding video acquisition equipment into the local memory, and reporting the storage information to the cloud server; wherein the stored information comprises at least device state information;
and after restarting, pulling the storage information of the video acquisition equipment corresponding to the target gateway device from the cloud server, and storing the storage information in the local memory.
In a second aspect, an embodiment of the present invention provides a video access method, which is applied to a cloud server, and the method includes:
determining target acquisition equipment to be operated and target operation to be operated aiming at the target acquisition equipment;
determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment;
issuing an operation request aiming at the target acquisition equipment to the target gateway device, wherein the operation request is used for indicating the target acquisition equipment to execute the target operation;
receiving a response result fed back by the target gateway device; and the response result is an execution result of the target gateway device executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
Optionally, before issuing the operation request for the target acquisition device to the target gateway apparatus, the method further includes:
acquiring equipment state information of the target acquisition equipment; the device state information of the target acquisition device is detected and reported by the target gateway device based on the SDK aiming at the target acquisition device;
and when the equipment state information of the target acquisition equipment represents the online state, issuing an operation request aiming at the target acquisition equipment to the target gateway device.
Optionally, the acquiring device state information of the target acquisition device includes:
issuing a state query request aiming at the target acquisition equipment to the target gateway device;
and receiving the equipment state information of the target acquisition equipment fed back by the target gateway device.
Optionally, the issuing, to the target gateway device, an operation request for the target acquisition device includes:
issuing an operation request aiming at the target acquisition equipment to the target gateway device through a target calculation example; wherein the target computing instance is a processing process allocated to the target gateway device in advance.
Optionally, the method further comprises:
after the target computing instance is distributed to the target gateway device, computing resources are distributed to the target computing instance according to a load balancing principle;
accordingly, the target computing instance sends the operation request to the target gateway device based on the allocated computing resources.
Optionally, the manner of allocating the target computing instance to the target gateway device includes:
after the target gateway device is registered to the cloud server, performing hash operation on the gateway ID of the target gateway device to obtain a target hash value;
and determining the calculation example corresponding to the target hash value from the corresponding relation between the hash value and the calculation example as the target calculation example.
Optionally, the establishing manner of the corresponding relationship between the video capture device and the gateway apparatus includes:
and aiming at each video acquisition device, determining the gateway device of which the corresponding network address and the network address of the video acquisition device are positioned in the same address segment based on the network address of the video acquisition device and the network address corresponding to each gateway device, and establishing the corresponding relation between the video acquisition device and the determined gateway device.
In a third aspect, an embodiment of the present invention provides a video access system, where the video access system includes a cloud server and at least one gateway device;
the cloud server is used for determining target acquisition equipment to be operated and target operation to be executed aiming at the target acquisition equipment; determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; issuing an operation request aiming at the target acquisition equipment to the target gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment; the operation request is used for indicating the target acquisition equipment to execute the target operation;
the target gateway device is used for executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment after receiving the operation request, and feeding back a response result to the cloud server; wherein the response result is an execution result of the target gateway device executing the target operation;
and the cloud server is also used for receiving a response result fed back by the target gateway device.
In a fourth aspect, an embodiment of the present invention provides a video access apparatus, which is applied to a target gateway apparatus, and the apparatus includes:
the operation determining module is used for determining target operation to be executed aiming at the target acquisition equipment; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the corresponding relationship is configured with a Software Development Kit (SDK) for the corresponding video acquisition equipment;
and the operation execution module is used for executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
In a fifth aspect, an embodiment of the present invention provides a video access apparatus, which is applied to a cloud server, where the apparatus includes:
the information determining module is used for determining target acquisition equipment to be operated and target operation to be operated aiming at the target acquisition equipment;
the device determining module is used for determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment;
a request issuing module, configured to issue an operation request for the target acquisition device to the target gateway apparatus, where the operation request is used to instruct the target acquisition device to perform the target operation;
a result receiving module, configured to receive a response result fed back by the target gateway device; and the response result is an execution result of the target gateway device executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps provided in the first aspect or the second aspect when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the video access method provided in the first aspect or the second aspect.
The embodiment of the invention has the following beneficial effects:
in the video access method provided by the embodiment of the invention, a target gateway device determines a target operation to be executed for a target acquisition device, and executes the target operation for the target acquisition device by using an SDK (software development kit) for the target acquisition device; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the correspondence is configured with a software development kit SDK for the corresponding video capture device. Because the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a flowchart of a video access method provided from the perspective of a gateway device according to an embodiment of the present invention;
fig. 2 is another flowchart of a video access method provided from the perspective of a gateway device according to an embodiment of the present invention;
fig. 3 is a flowchart of a video access method provided from the perspective of a cloud server according to an embodiment of the present invention;
fig. 4 is another flowchart of a video access method provided from the perspective of a cloud server according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a video access system according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a connection relationship between a video access system and each video capture device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a video access device provided from the perspective of a gateway device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a video access apparatus provided from the perspective of a cloud server according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to reduce the complexity of video access, the embodiment of the invention provides a video access method, a video access device and a video access system.
First, a video access method provided in an embodiment of the present invention is described below from the perspective of a gateway device in a video access system.
It should be noted that, on the premise that the video access system provided in the embodiment of the present invention includes a cloud server, the video access system may further include at least one gateway device, and each gateway device is registered in the cloud server in advance. It is reasonable that the cloud server is program software deployed in a cloud server and used for providing a video access service, and the gateway apparatus is program software deployed in any type of electronic device, which may be referred to as an edge network device, and the electronic device may be a terminal device or a server. It can be understood that, through the cooperation of the cloud server and the gateway device, video pulling and management are performed on the video acquisition device, and a cloud-side-end integrated processing architecture can be formed.
Moreover, a plurality of video acquisition devices are registered in the cloud server in advance; after each video acquisition device is registered to the cloud server, the cloud server can establish a corresponding relationship between the video acquisition device and a registered gateway device, so that the corresponding relationship between the video acquisition device and the gateway device is obtained. Wherein, each gateway apparatus is configured with an SDK (Software Development Kit) for the corresponding video capture device, so as to log in the corresponding video capture device through the configured SDK, thereby performing various operations on the corresponding video capture device. It can be understood that each gateway apparatus is further configured with a corresponding relationship between the software development kit SDK of the corresponding video capture device and the device identifier, so that the SDK to be utilized can be determined subsequently based on the device identifier of the device to be operated. In addition, it will be understood by those skilled in the art that the SDK described above for any video capture device is provided by the video capture device vendor for use in operating the video capture device.
There may be a plurality of ways for establishing the correspondence between the video capture device and the gateway apparatus. For example, considering that each gateway apparatus may pull and manage a video stream for video capture devices belonging to the same lan, in an implementation, the establishing manner of the corresponding relationship between the video capture devices and the gateway apparatus may include: for each video acquisition device, determining a gateway device with the corresponding network address and the network address of the video acquisition device in the same address segment based on the network address of the video acquisition device and the network address corresponding to each gateway device, and establishing the corresponding relation between the video acquisition device and the determined gateway device; wherein, the network address corresponding to each gateway device is the network address of the device where the gateway device is deployed.
In addition, the process of registering each gateway device with the cloud server may include: sending a registration request to a cloud server, wherein the registration request carries a gateway ID of a gateway device, so that the cloud server registers the gateway device to the cloud server after receiving the registration request of each gateway device; and the gateway device can report heartbeat information to the cloud server after registering to the cloud server. The mode of registering each video acquisition device to the cloud server may include: the user logs in the cloud server through a login page of the cloud server, and device information such as network addresses and device identifications of corresponding video acquisition devices is added to the device list, so that the cloud server can store the device information of the video acquisition devices.
As shown in fig. 1, a video access method provided in an embodiment of the present invention is applied to a target gateway device in a video access system, and may include the following steps:
s101, determining target operation to be executed for target acquisition equipment;
in this embodiment, the target gateway device is any one of gateway devices in the video access system. The target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the correspondence is configured with a software development kit SDK for the corresponding video capture device.
There are various ways in which the target gateway device determines the target operation to be performed for the target acquisition device. For example: when detecting that a pre-specified time point is reached or a specified trigger condition is met, the target gateway device determines a target operation to be executed for the target acquisition equipment according to a preset operation rule, wherein the number of the target acquisition equipment can be one or more. Another example is: after receiving a request of a cloud server, the target gateway device determines a target operation to be executed for the target acquisition equipment based on the request. For convenience of understanding, with reference to another embodiment, a specific implementation manner of the target gateway device is described later, after receiving a request of the cloud server, and determining a target operation to be executed for the target acquisition device based on the request.
In addition, there may be various kinds of target operations to be performed, for example: the target operation may be an operation for pulling a video stream, or an operation for disabling/enabling a device, or the like.
And S102, executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
After the target acquisition device executes the target operation by using the SDK for the target acquisition device, the target gateway device may report a response result for the target operation to the cloud server, so that the cloud server may store the response result, or output the response result to a user corresponding to the target acquisition device. Wherein, the response result to the target operation is a result obtained after the target operation is performed on the target acquisition device, which is as follows as an example: if the target operation is an operation for pulling the video stream, the response result is the video stream; if the target operation is the operation of the disable/enable device, the response result is result information for characterizing that the disable/enable device has succeeded or failed.
For example, performing the target operation on the target acquisition device by using the SDK for the target acquisition device may include:
and logging in the target acquisition equipment by using the SDK aiming at the target acquisition equipment, and executing the target operation on the target acquisition equipment.
Before logging in the target acquisition equipment, the target gateway device also needs the network address of the target acquisition equipment to locate the target acquisition equipment. In addition, the network address of the corresponding video acquisition equipment can be stored in the target gateway device in advance, so that after the target acquisition equipment is determined, the target gateway device acquires the network address of the target acquisition equipment from the local; or the network address of the corresponding video acquisition device is not stored in the target gateway device, and then, after the target acquisition device is determined, the target gateway device may obtain the network address of the target acquisition device from the cloud server based on the device identifier of the target acquisition device.
In the video access method provided by the embodiment of the invention, a target gateway device determines a target operation to be executed for a target acquisition device, and executes the target operation for the target acquisition device by using an SDK (software development kit) for the target acquisition device; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the correspondence is configured with a software development kit SDK for the corresponding video capture device. Because the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
Optionally, in another embodiment of the present invention, as shown in fig. 2, a video access method applied to a target gateway device in a video access system may include the following steps:
s201, receiving an operation request aiming at target acquisition equipment issued by a cloud server;
s202, determining a target operation to be executed indicated by the operation request;
in this embodiment, after determining a target acquisition device to be operated and a target operation to be performed for the target acquisition device, the cloud server may determine, based on a correspondence relationship between a video acquisition device and a gateway device that is established in advance, the gateway device corresponding to the target acquisition device as a target gateway device, and issue an operation request for the target acquisition device to the target gateway device, where the operation request is used to instruct the target acquisition device to perform the target operation; correspondingly, the target gateway device may receive an operation request for the target acquisition device issued by the cloud server, and determine a target operation to be executed indicated by the operation request.
In order to enable the target gateway device to be able to locate the target acquisition equipment, if the target gateway device has previously stored the equipment identifier and the network address of the corresponding video acquisition equipment, the operation request may carry the equipment identifier of the target acquisition equipment; accordingly, after obtaining the operation request, the target gateway device may find the network address of the target acquisition device based on the device identifier carried in the operation request, so as to locate the target acquisition device. In order to enable the target gateway device to be able to locate the target acquisition equipment, if the target gateway device only stores the equipment identifier of the corresponding video acquisition equipment, the operation request may carry the network address and the equipment identifier of the target acquisition equipment; correspondingly, after obtaining the operation request, the target gateway device may obtain the network address of the target acquisition device from the operation request, so as to be able to locate the target acquisition device.
The specific implementation manner of the cloud server determining the target acquisition device to be operated and the target operation to be performed for the target acquisition device is described in detail later when the video access method is introduced from the perspective of the cloud server.
S203, executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment;
illustratively, the performing the target operation on the target acquisition device by using the SDK for the target acquisition device includes:
and logging in the target acquisition equipment by using the SDK aiming at the target acquisition equipment, and executing the target operation on the target acquisition equipment.
In this embodiment, S203 is the same as S102 in the above embodiments, and is not described herein.
And S204, feeding back a response result to the cloud server, wherein the response result is an execution result of the target gateway device executing the target operation.
After the target operation is executed to obtain the response result, the response result may be fed back to the cloud server, so that the cloud server may store the response result, or output the response result to a user corresponding to the target acquisition device.
In the scheme provided by this embodiment, the cloud server does not need to directly communicate with the video acquisition device, but the gateway device communicates with the video acquisition device, that is, the gateway device can serve as a transfer party of the cloud server, so that the difference of bottom hardware devices can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition device. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
Optionally, based on the embodiment shown in fig. 2, in another embodiment of the present invention, before the target gateway device receives the operation request for the target collection device sent by the cloud server, the following steps a1-A3 may also be included:
step A1, acquiring a state query request aiming at the target acquisition equipment and issued by a cloud server; the state query request is issued by the cloud server before the operation request is issued to the target gateway device;
step A2, acquiring the device state information of the target acquisition device from a local memory; wherein, the local memory records the device state information of the video acquisition device corresponding to the target gateway device;
step a3, feeding back the acquired device status information to the cloud server, so that when detecting that the device status information indicates an online status, the cloud server issues an operation request for a target acquisition device to the target gateway apparatus.
The device state information may represent an online state or an offline state, wherein the online state indicates that the video acquisition device is operating normally; while the offline state indicates that the video capture device is not operating properly. And the local memory is a memory of the device in which the target gateway apparatus is deployed.
In order to ensure the access effectiveness and prevent the target gateway device from accessing the target acquisition equipment which does not normally operate, the cloud server may first issue a status query request for the target acquisition equipment to the target gateway device before issuing the operation request to the target gateway device. Correspondingly, the target gateway device can acquire the equipment state information of the target acquisition equipment from the local memory; and feeding back the acquired equipment state information to the cloud server, so that the cloud server issues an operation request aiming at the target acquisition equipment to the target gateway device when detecting that the equipment state information represents an online state.
It can be understood that the target gateway apparatus may periodically collect the device state information of the corresponding video capture device based on the SDK for the corresponding video capture device, and store the device state information in the local memory. Therefore, the reliability of the equipment state information in the local memory can be greatly improved, and the data processing efficiency can be ensured.
In this embodiment, the cloud server does not need to directly communicate with the video capture device, but the gateway device communicates with the video capture device, that is, the gateway device can serve as a transfer party of the cloud server, so that the cloud server can shield the difference of the bottom hardware devices, and thus the cloud server does not need to be adapted to each video capture device. Therefore, the complexity of video access can be reduced through the scheme. And when the cloud server identifies that the target acquisition equipment is in an online state, the cloud server executes the step of issuing an operation request aiming at the target acquisition equipment to the target gateway device, so that the access validity can be ensured, and the target gateway device is prevented from accessing the target acquisition equipment which is not normally operated.
Optionally, in another embodiment of the present invention, the video access method applied to the target gateway device may further include:
periodically determining the storage information of the corresponding video acquisition equipment based on the SDK aiming at the corresponding video acquisition equipment, storing the storage information of the corresponding video acquisition equipment into the local memory, and reporting the storage information to the cloud server; wherein the stored information comprises at least device state information;
and after restarting, pulling the storage information of the video acquisition equipment corresponding to the target gateway device from the cloud server, and storing the storage information in a local memory.
In consideration of the instability of the local area network and the data reading speed, the storage information may be stored in a memory of the device in which the target gateway apparatus is deployed. Due to the storage in the memory, the stored information disappears when the power is off, and therefore, the target gateway device is in a stateless service. And the cloud server is a stateful service, and all data is persisted to the database, so that after the target gateway device is restarted, an information pulling request can be sent to the cloud server, and the data storage state before restarting is recovered. The storage information of any video capture device may further include a device identifier, video channel information, a network address, and the like of the video capture device.
Therefore, the scheme provided by the embodiment can reduce the complexity of video access, and can ensure that the data storage state before the restart can be recovered after the target gateway device is restarted.
The video access method provided by the embodiment of the invention is described from the perspective of a cloud server in a video access system. For the related descriptions of the cloud server and the gateway device in the video access system, reference may be made to the method embodiment described in the perspective of the gateway device, and details are not repeated here.
As shown in fig. 3, a video access method provided in an embodiment of the present invention may include the following steps:
s301, determining target acquisition equipment to be operated and target operation to be operated aiming at the target acquisition equipment;
when video access needs to be performed on the video acquisition device, the cloud server can determine the target acquisition device to be operated and the target operation to be executed on the target acquisition device according to a user instruction or a preset screening rule. The screening rule is used for indicating which devices are screened as target acquisition devices and which operations are screened as target operations.
It will be appreciated that a user may need to pull a video stream or disable/enable a device for a certain device, a certain acquisition area, or a certain device type, etc. Then, the user can log in the cloud server through the login page of the cloud server, so that an operation instruction is sent to the cloud server after the user logs in the cloud server; correspondingly, the cloud server can obtain the operation instruction, and further determine the target acquisition equipment to be operated and the target operation to be executed for the target acquisition equipment based on the operation instruction.
The operation instruction can be used for instructing target operation to be performed on a certain video acquisition device, at this time, the operation instruction can carry a device identifier of the certain video acquisition device and an operation identifier for indicating the target operation, and then the target acquisition device is the video acquisition device with the device identifier carried by the operation instruction; or the operation instruction may be used to instruct a target operation to be performed on a certain acquisition area, at this time, the operation instruction may carry an area identifier of the certain acquisition area and an operation identifier used to indicate the target operation, and then the target acquisition device is a video acquisition device in the acquisition area having the area identifier carried by the operation instruction; or, the operation instruction may be used to instruct to perform a target operation on a certain device type, where the operation instruction may carry a type identifier of the certain device type and an operation identifier used to indicate the target operation, and then the target acquisition device is a video acquisition device belonging to the type identifier carried by the operation instruction.
S302, determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device;
after determining the target acquisition device to be operated and the target operation to be performed for the target acquisition device, since it is necessary to assist the response operation by means of the gateway device corresponding to the target acquisition device, the gateway device corresponding to the target acquisition device may be determined as the target gateway device based on the correspondence relationship between the video acquisition device and the gateway device established in advance.
It can be understood that, after the video capture devices corresponding to the gateway apparatuses are determined, the device identifiers and the network addresses of the corresponding video capture devices may be issued to each gateway apparatus, so that each gateway apparatus can store the device identifiers and the network addresses of the video capture devices.
S303, issuing an operation request aiming at the target acquisition equipment to the target gateway device, wherein the operation request is used for indicating the target acquisition equipment to execute the target operation;
in order to enable the target gateway device to know which video acquisition equipment performs the target operation, if the target gateway device has previously stored the equipment identifier and the network address of the corresponding video acquisition equipment, the operation request may carry the equipment identifier of the target acquisition equipment; correspondingly, after obtaining the operation request, the target gateway device may find the network address and the SDK of the target acquisition device based on the device identifier carried in the operation request, log in the target acquisition device with the found network address by using the SDK of the target acquisition device, perform a target operation on the target acquisition device, and feed back a response result to the cloud service end.
In order to enable the target gateway device to know which video acquisition device performs the target operation, if the target gateway device only stores the device identifier of the corresponding video acquisition device, the operation request may carry the network address and the device identifier of the target acquisition device; correspondingly, after obtaining the operation request, the target gateway device may find the SDK of the target acquisition device based on the device identifier carried in the operation request, log in the target acquisition device having the network address carried in the operation request by using the SDK of the target acquisition device, perform a target operation on the target acquisition device, and feed back a response result to the cloud service end.
S304, receiving a response result fed back by the target gateway device; wherein the response result is an execution result of the target gateway device executing the target operation on the target acquisition device by using the SDK for the target acquisition device.
After receiving the response result, the cloud server may output the response result fed back by the target gateway device to the user. For example: if the target operation is an operation for pulling the video stream, the response result is the video stream; the target operation is the operation of the disable/enable device, and the response result is result information for characterizing that the disable/enable device has succeeded or failed.
Because the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
Based on the embodiment of fig. 3, as shown in fig. 4, a video access method applied to a cloud server according to another embodiment of the present invention may further include, before S303:
s305, acquiring the equipment state information of the target acquisition equipment; the device state information of the target acquisition device is detected and reported by the target gateway device based on the SDK aiming at the target acquisition device;
s306, detecting whether the equipment state information of the target acquisition equipment represents the online state, and if so, executing S303;
the device state information may represent an online state or an offline state, wherein the online state indicates that the video acquisition device is operating normally; while the offline state indicates that the video capture device is not operating properly. And the device state information of the target acquisition device is detected and reported by the target gateway device based on the SDK of the target acquisition device.
In order to ensure the access validity and prevent the target gateway device from accessing the target collection device which is not operating normally, before S303, the device state information of the target collection device may be first obtained, and different operations may be performed based on the information content indicated by the device state information. Specifically, when the device state information of the target collection device indicates the online state, S303 may be executed; when the device state information of the target acquisition device indicates the offline state, error reporting information indicating that the target acquisition device is in the offline state can be directly output to the user.
For example, in an implementation manner, the target gateway device may periodically collect device state information of the corresponding video acquisition device based on the SDK of the corresponding video acquisition device, and report the collected device state information to the cloud server, and accordingly, the cloud server may store the device state information reported by the target gateway device; then, before performing S303, the cloud server may obtain locally stored device state information of the target acquisition device. Through the implementation mode, the acquisition rate of the equipment state information is high, and the access delay is reduced.
For example, in another implementation manner, if the cloud server does not pre-store the device state information of the video capture device reported by the target gateway device, the obtaining the device state information of the target capture device may include:
issuing a state query request aiming at the target acquisition equipment to the target gateway device;
and receiving the device state information of the target acquisition device fed back by the target gateway device.
After obtaining the status query request for the target acquisition device, the target gateway device may obtain the device status information of the target acquisition device from a local memory, and feed back the obtained device status information to the cloud server; the local memory records the device state information of the video acquisition device corresponding to the target gateway device. The local memory of the device to which the target gateway device belongs records the device state information of the video acquisition device corresponding to the target gateway device, so that the acquisition rate of the device state information is high, and the access delay is reduced. In addition, it can be understood that the target gateway device may periodically collect the device state information of the corresponding video capture device and store the device state information in the local memory, so that the reliability of the device state information in the local memory may be greatly improved.
In this embodiment, the cloud server does not need to directly communicate with the video capture device, but the gateway device communicates with the video capture device, that is, the gateway device can serve as a transfer party of the cloud server, so that the cloud server can shield the difference of the bottom hardware devices, and thus the cloud server does not need to be adapted to each video capture device. Therefore, the complexity of video access can be reduced through the scheme. And when the cloud server identifies that the target acquisition equipment is in an online state, the cloud server executes the step of issuing an operation request aiming at the target acquisition equipment to the target gateway device, so that the access validity can be ensured, and the target gateway device is prevented from accessing the target acquisition equipment which is not normally operated.
Optionally, in another embodiment of the present invention, the above S303 may include the following steps:
issuing an operation request aiming at the target acquisition equipment to the target gateway device through a target calculation example; wherein the target computing instance is a processing procedure allocated to the target gateway device in advance.
Wherein, the so-called computing instance is a process, and a process can be referred to as a computing instance. Specifically, in order to ensure processing efficiency and improve throughput, a calculation instance may be allocated to each gateway device in advance, and further, an operation request for the target acquisition device may be issued to the target gateway device through a target calculation instance allocated to the target gateway device in advance.
After the target computing instance is distributed to the target gateway device, computing resources are distributed to the target computing instance according to a load balancing principle; accordingly, the target computing instance sends the operation request to the target gateway device based on the allocated computing resources. By way of example, computing resources may include, but are not limited to: a CPU and a memory. Moreover, when allocating the computing resource for any gateway apparatus, the number of the video capturing devices corresponding to the gateway apparatus may be considered, wherein the greater the number of the corresponding video capturing devices, the greater the computing resource. In addition, when the number of video acquisition devices corresponding to any gateway device is increased or decreased, the number of computing resources of the corresponding computing instance of the gateway device can be increased or decreased, so that the purpose of load balancing through dynamic resource allocation is achieved.
Additionally, there are a variety of ways to allocate a computing instance to any one gateway device. The following target gateway device is taken as an example, and a specific manner of allocating a computing instance is described as an example. In one implementation, the method for allocating the target computing instance to the target gateway device includes:
and after the target gateway device is registered to the cloud server, adding a computing instance as a target computing instance distributed for the target gateway device. With this implementation, the gateway device and the compute instance have unique correspondence.
For example, in another implementation, the manner of allocating the target computing instance to the target gateway device may include:
after the target gateway device is registered to the cloud server, performing hash operation on the gateway ID of the target gateway device to obtain a target hash value;
and determining the calculation example corresponding to the target hash value from the corresponding relation between the hash value and the calculation example as the target calculation example.
Through the implementation mode, each gateway device can correspond to one computing instance, and one computing instance can correspond to at least one gateway device, so that the excessive number of computing instances is avoided, and resource allocation and instance management are facilitated.
In the scheme provided by the embodiment, the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, so that the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme. In addition, by allocating calculation instances in advance to the respective gateway apparatuses, it is possible to ensure processing efficiency and improve throughput.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a video access system, as shown in fig. 5, where the video access system includes a cloud server 510 and at least one gateway device 520;
the cloud server 510 is configured to determine a target acquisition device to be operated and a target operation to be performed for the target acquisition device; determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; issuing an operation request aiming at the target acquisition equipment to the target gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment; the operation request is used for indicating the target acquisition equipment to execute the target operation;
the target gateway device is used for executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment after receiving the operation request, and feeding back a response result to the cloud server; wherein the response result is an execution result of the target gateway device executing the target operation;
the cloud server 510 is further configured to receive a response result fed back by the target gateway device.
Because the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
For convenience of understanding, fig. 6 exemplarily shows a schematic diagram of a communication relationship between the video access system and each video capture device. As shown in fig. 6, the video access system includes a cloud server, a gateway device 1, a gateway device 2, and a gateway device 3, where each gateway device has four video capture devices: three network cameras and an access control device. Moreover, the service system 1 can be formed by the cloud server, the gateway device 1 and four video acquisition devices corresponding to the gateway device 1; the service system 2 can be formed by the cloud server, the gateway device 2 and four video acquisition devices corresponding to the gateway device 2; the service system 3 can be formed by the cloud server, the gateway device 3 and four video acquisition devices corresponding to the gateway device 3. The gateway apparatus 1 and the four video capture devices corresponding to the gateway apparatus 1 may be devices belonging to the same local area network, for example: the same factory floor, school, and company correspond to devices in the lan, and the gateway apparatus 1 is disposed in advance in any electronic device in the lan. Similarly, the four video capture devices corresponding to the gateway apparatus 2 and the gateway apparatus 1 may be devices belonging to the same lan, and the four video capture devices corresponding to the gateway apparatus 3 and the gateway apparatus 3 may be devices belonging to the same lan.
Optionally, the target gateway device executes the target operation on the target acquisition device by using the SDK for the target acquisition device, specifically:
and logging in the target acquisition equipment by using the SDK aiming at the target acquisition equipment, and executing the target operation on the target acquisition equipment.
Optionally, the target gateway device is further configured to periodically determine, based on the SDK for the corresponding video acquisition device, storage information of the corresponding video acquisition device, store the storage information of the corresponding video acquisition device in the local memory, and report the storage information to the cloud server; wherein the stored information comprises at least device state information;
and after restarting, pulling the storage information of the video acquisition equipment corresponding to the target gateway device from the cloud server, and storing the storage information in the local memory.
Optionally, the cloud server 510 is further configured to obtain device state information of the target acquisition device before issuing an operation request for the target acquisition device to the target gateway apparatus; the device state information of the target acquisition device is detected and reported by the target gateway device based on the SDK aiming at the target acquisition device;
and when the equipment state information of the target acquisition equipment represents the online state, issuing an operation request aiming at the target acquisition equipment to the target gateway device.
Optionally, the obtaining, by the cloud server 510, the device state information of the target collection device may include:
issuing a state query request aiming at the target acquisition equipment to the target gateway device;
receiving the device state information of the target acquisition device fed back by the target gateway device;
correspondingly, the target gateway device is further configured to obtain a state query request for the target acquisition device, which is issued by the cloud server, before receiving an operation request for the target acquisition device, which is issued by the cloud server; acquiring equipment state information of the target acquisition equipment from a local memory; feeding back the acquired device state information to the cloud server 510; and the local memory records the equipment state information of the video acquisition equipment corresponding to the target gateway device.
Optionally, the cloud server 510 issues an operation request for the target collection device to the target gateway apparatus, where the operation request includes:
issuing an operation request aiming at the target acquisition equipment to the target gateway device through a target calculation example; wherein the target computing instance is a processing process allocated to the target gateway device in advance.
The cloud server 510 is further configured to allocate computing resources to the target computing instance according to a load balancing principle after the target computing instance is allocated to the target gateway device;
accordingly, the target computing instance sends the operation request to the target gateway device based on the allocated computing resources.
The manner in which the cloud server 510 allocates the target computing instance to the target gateway device includes:
after the target gateway device is registered to the cloud server, performing hash operation on the gateway ID of the target gateway device to obtain a target hash value;
and determining the calculation example corresponding to the target hash value from the corresponding relation between the hash value and the calculation example as the target calculation example.
The establishment method of the cloud server 510 regarding the corresponding relationship between the video capture device and the gateway apparatus includes:
and aiming at each video acquisition device, determining the gateway device of which the corresponding network address and the network address of the video acquisition device are positioned in the same address segment based on the network address of the video acquisition device and the network address corresponding to each gateway device, and establishing the corresponding relation between the video acquisition device and the determined gateway device.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a video access apparatus, which is applied to a target gateway apparatus, and as shown in fig. 7, the apparatus includes:
an operation determining module 710, configured to determine a target operation to be performed for a target acquisition device; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the corresponding relationship is configured with a Software Development Kit (SDK) for the corresponding video acquisition equipment;
an operation executing module 720, configured to execute the target operation on the target acquisition device by using the SDK for the target acquisition device.
Because the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
Optionally, the operation executing module 720 is specifically configured to:
and logging in the target acquisition equipment by using the SDK aiming at the target acquisition equipment, and executing the target operation on the target acquisition equipment.
Optionally, the operation determining module 710 includes:
the request receiving unit is used for receiving an operation request which is issued by a cloud server and aims at the target acquisition equipment;
an operation determination unit configured to determine a target operation to be performed, which is indicated by the operation request;
the device further comprises:
and the response module is used for feeding back a response result to the cloud server, wherein the response result is an execution result of the target gateway device executing the target operation.
Optionally, the request receiving unit is further configured to obtain a status query request for the target acquisition device, which is issued by the cloud server, before receiving an operation request for the target acquisition device, which is issued by the cloud server; the state query request is issued by the cloud server before the operation request is issued to the target gateway device;
acquiring equipment state information of the target acquisition equipment from a local memory; the local memory records equipment state information of video acquisition equipment corresponding to the target gateway device;
and feeding back the acquired equipment state information to the cloud server, so that the cloud server issues an operation request aiming at the target acquisition equipment to the target gateway device when detecting that the equipment state information represents an online state.
Optionally, the apparatus further comprises:
the information acquisition module is used for periodically determining the storage information of the corresponding video acquisition equipment based on the SDK aiming at the corresponding video acquisition equipment, storing the storage information of the corresponding video acquisition equipment into the local memory and reporting the storage information to the cloud server; wherein the stored information comprises at least device state information;
and the information pulling module is used for pulling the storage information of the video acquisition equipment corresponding to the target gateway device from the cloud server after the restart, and storing the storage information in the local memory.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a video access apparatus, which is applied to a cloud server, and as shown in fig. 8, the apparatus includes:
an information determining module 810, configured to determine a target acquisition device to be operated and a target operation to be performed for the target acquisition device;
a device determining module 820, configured to determine, based on a pre-established correspondence relationship between video capture devices and gateway devices, a gateway device corresponding to the target capture device as a target gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment;
a request issuing module 830, configured to issue an operation request for the target acquisition device to the target gateway apparatus, where the operation request is used to instruct the target acquisition device to perform the target operation;
a result receiving module 840, configured to receive a response result fed back by the target gateway device; and the response result is an execution result of the target gateway device executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
Because the cloud server does not need to be in direct communication with the video acquisition equipment, but the gateway device is in communication with the video acquisition equipment, the difference of bottom hardware equipment can be shielded for the cloud server, and the cloud server does not need to be adapted to each video acquisition equipment. Therefore, the complexity of video access can be reduced through the scheme.
In addition, the gateway device is used as an intermediate bridge between the video acquisition equipment and the cloud server, so that the number of equipment directly connected with the cloud server is greatly reduced, the problem that the congestion of the cloud server is caused by the increase of the video acquisition equipment is undoubtedly solved, and the problems that the network bandwidth cost is high, the access delay is high, the network signal interference is easy to cause and the like due to the congestion are further solved.
Optionally, the apparatus further comprises:
a state analysis module, configured to acquire device state information of the target acquisition device before the request issuing module 830 issues an operation request for the target acquisition device to the target gateway apparatus; the device state information of the target acquisition device is detected and reported by the target gateway device based on the SDK aiming at the target acquisition device;
when the device state information of the target acquisition device indicates an online state, the trigger request issuing module 830 executes issuing an operation request for the target acquisition device to the target gateway apparatus.
Optionally, the obtaining, by the state analysis module, the device state information of the target collection device includes:
issuing a state query request aiming at the target acquisition equipment to the target gateway device;
and receiving the equipment state information of the target acquisition equipment fed back by the target gateway device.
Optionally, the request issuing module 830 is specifically configured to:
issuing an operation request aiming at the target acquisition equipment to the target gateway device through a target calculation example; wherein the target computing instance is a processing process allocated to the target gateway device in advance.
Optionally, the apparatus further comprises:
a resource allocation module, configured to allocate, after allocating the target computing instance to the target gateway device, computing resources to the target computing instance according to a load balancing principle;
accordingly, the target computing instance sends the operation request to the target gateway device based on the allocated computing resources.
Optionally, the manner of allocating the target computing instance to the target gateway device includes:
after the target gateway device is registered to the cloud server, performing hash operation on the gateway ID of the target gateway device to obtain a target hash value;
and determining the calculation example corresponding to the target hash value from the corresponding relation between the hash value and the calculation example as the target calculation example.
Optionally, the establishing manner of the corresponding relationship between the video capture device and the gateway apparatus includes:
and aiming at each video acquisition device, determining the gateway device of which the corresponding network address and the network address of the video acquisition device are positioned in the same address segment based on the network address of the video acquisition device and the network address corresponding to each gateway device, and establishing the corresponding relation between the video acquisition device and the determined gateway device.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the method steps provided from the perspective of the cloud server or the method steps provided from the perspective of the target gateway device when executing the program stored in the memory 903.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above-mentioned video access methods.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the video access methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, device, and system embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (17)
1. A video access method applied to a target gateway device, the method comprising:
determining a target operation to be executed for a target acquisition device; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the corresponding relationship is configured with a Software Development Kit (SDK) for the corresponding video acquisition equipment;
and executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
2. The method of claim 1, wherein performing the target operation on the target acquisition device using the SDK for the target acquisition device comprises:
and logging in the target acquisition equipment by using the SDK aiming at the target acquisition equipment, and executing the target operation on the target acquisition equipment.
3. The method of claim 1 or 2, wherein the determining a target operation to be performed for a target acquisition device comprises:
receiving an operation request aiming at target acquisition equipment issued by a cloud server;
determining a target operation to be executed, which is indicated by the operation request;
the method further comprises the following steps:
and feeding back a response result to the cloud server, wherein the response result is an execution result of the target gateway device executing the target operation.
4. The method according to claim 3, wherein before receiving the operation request for the target acquisition device issued by the cloud server, the method further comprises:
acquiring a state query request which is issued by a cloud server and aims at the target acquisition equipment; the state query request is issued by the cloud server before the operation request is issued to the target gateway device;
acquiring equipment state information of the target acquisition equipment from a local memory; the local memory records equipment state information of video acquisition equipment corresponding to the target gateway device;
and feeding back the acquired equipment state information to the cloud server, so that the cloud server issues an operation request aiming at the target acquisition equipment to the target gateway device when detecting that the equipment state information represents an online state.
5. The method of claim 4, further comprising:
periodically determining storage information of the corresponding video acquisition equipment based on the SDK aiming at the corresponding video acquisition equipment, storing the storage information of the corresponding video acquisition equipment into the local memory, and reporting the storage information to the cloud server; wherein the stored information comprises at least device state information;
and after restarting, pulling the storage information of the video acquisition equipment corresponding to the target gateway device from the cloud server, and storing the storage information in the local memory.
6. A video access method is applied to a cloud server, and comprises the following steps:
determining target acquisition equipment to be operated and target operation to be operated aiming at the target acquisition equipment;
determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment;
issuing an operation request aiming at the target acquisition equipment to the target gateway device, wherein the operation request is used for indicating the target acquisition equipment to execute the target operation;
receiving a response result fed back by the target gateway device; and the response result is an execution result of the target gateway device executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
7. The method of claim 6, wherein before issuing the operation request for the target acquisition device to the target gateway apparatus, the method further comprises:
acquiring equipment state information of the target acquisition equipment; the device state information of the target acquisition device is detected and reported by the target gateway device based on the SDK aiming at the target acquisition device;
and when the equipment state information of the target acquisition equipment represents the online state, issuing an operation request aiming at the target acquisition equipment to the target gateway device.
8. The method of claim 7, wherein the obtaining device status information of the target acquisition device comprises:
issuing a state query request aiming at the target acquisition equipment to the target gateway device;
and receiving the equipment state information of the target acquisition equipment fed back by the target gateway device.
9. The method according to any one of claims 6 to 8, wherein the issuing of the operation request for the target collection device to the target gateway apparatus includes:
issuing an operation request aiming at the target acquisition equipment to the target gateway device through a target calculation example; wherein the target computing instance is a processing process allocated to the target gateway device in advance.
10. The method of claim 9, further comprising:
after the target computing instance is distributed to the target gateway device, computing resources are distributed to the target computing instance according to a load balancing principle;
accordingly, the target computing instance sends the operation request to the target gateway device based on the allocated computing resources.
11. The method of claim 9, wherein the allocating the target computing instance to the target gateway device comprises:
after the target gateway device is registered to the cloud server, performing hash operation on the gateway ID of the target gateway device to obtain a target hash value;
and determining the calculation example corresponding to the target hash value from the corresponding relation between the hash value and the calculation example as the target calculation example.
12. The method according to any one of claims 6 to 8, wherein the establishing manner of the corresponding relationship between the video capture device and the gateway apparatus includes:
and aiming at each video acquisition device, determining the gateway device of which the corresponding network address and the network address of the video acquisition device are positioned in the same address segment based on the network address of the video acquisition device and the network address corresponding to each gateway device, and establishing the corresponding relation between the video acquisition device and the determined gateway device.
13. The video access system is characterized by comprising a cloud server and at least one gateway device;
the cloud server is used for determining target acquisition equipment to be operated and target operation to be executed aiming at the target acquisition equipment; determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; issuing an operation request aiming at the target acquisition equipment to the target gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment; the operation request is used for indicating the target acquisition equipment to execute the target operation;
the target gateway device is used for executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment after receiving the operation request, and feeding back a response result to the cloud server; wherein the response result is an execution result of the target gateway device executing the target operation;
and the cloud server is also used for receiving a response result fed back by the target gateway device.
14. A video access apparatus, applied to a target gateway apparatus, the apparatus comprising:
the operation determining module is used for determining target operation to be executed aiming at the target acquisition equipment; the target acquisition equipment is video acquisition equipment corresponding to the target gateway device in a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device in the corresponding relationship is configured with a Software Development Kit (SDK) for the corresponding video acquisition equipment;
and the operation execution module is used for executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
15. A video access device applied to a cloud server side is characterized by comprising:
the information determining module is used for determining target acquisition equipment to be operated and target operation to be operated aiming at the target acquisition equipment;
the device determining module is used for determining a gateway device corresponding to the target acquisition equipment as a target gateway device based on a pre-established corresponding relation between the video acquisition equipment and the gateway device; each gateway device is provided with a Software Development Kit (SDK) aiming at the corresponding video acquisition equipment;
a request issuing module, configured to issue an operation request for the target acquisition device to the target gateway apparatus, where the operation request is used to instruct the target acquisition device to perform the target operation;
a result receiving module, configured to receive a response result fed back by the target gateway device; and the response result is an execution result of the target gateway device executing the target operation on the target acquisition equipment by using the SDK aiming at the target acquisition equipment.
16. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5, or the method steps of any one of claims 6 to 12, when executing a program stored in a memory.
17. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 1-5 or the method steps of any of the claims 6-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011523838.0A CN112714161A (en) | 2020-12-22 | 2020-12-22 | Video access method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011523838.0A CN112714161A (en) | 2020-12-22 | 2020-12-22 | Video access method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112714161A true CN112714161A (en) | 2021-04-27 |
Family
ID=75545014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011523838.0A Pending CN112714161A (en) | 2020-12-22 | 2020-12-22 | Video access method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112714161A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113691879A (en) * | 2021-10-25 | 2021-11-23 | 通号通信信息集团有限公司 | Video data processing method, electronic device, and computer-readable storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523235A (en) * | 2011-12-31 | 2012-06-27 | 四川九洲电器集团有限责任公司 | Method for self-adaptive support of more pieces of monitoring equipment |
CN104660997A (en) * | 2015-02-12 | 2015-05-27 | 江苏物联网研究发展中心 | Service oriented multi-source heterogeneous video surveillance adaptation method and system |
CN105491337A (en) * | 2015-12-10 | 2016-04-13 | 公安部交通管理科学研究所 | Universal network video monitoring equipment access method and apparatus based on SDK abstract layer |
CN105721831A (en) * | 2016-01-28 | 2016-06-29 | 安徽四创电子股份有限公司 | Method for designing video monitoring client side based on multi-process architecture |
CN109218393A (en) * | 2018-07-24 | 2019-01-15 | 百度在线网络技术(北京)有限公司 | A kind of implementation method of push, device, equipment and computer storage medium |
CN109862605A (en) * | 2019-01-22 | 2019-06-07 | 上海连尚网络科技有限公司 | A kind of networking methods and equipment for terminal device |
CN110022307A (en) * | 2019-03-08 | 2019-07-16 | 视联动力信息技术股份有限公司 | A kind of control method of monitoring device and monitoring access server |
CN110347445A (en) * | 2019-07-12 | 2019-10-18 | 财付通支付科技有限公司 | SDK call method, device, server and storage medium |
CN110969740A (en) * | 2019-12-12 | 2020-04-07 | 浩云科技股份有限公司 | Access method of access control management system to different types of access control equipment and access control system |
CN111610965A (en) * | 2020-05-20 | 2020-09-01 | 浩云科技股份有限公司 | Standard SDK (software development kit) making method and device of access control platform |
-
2020
- 2020-12-22 CN CN202011523838.0A patent/CN112714161A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523235A (en) * | 2011-12-31 | 2012-06-27 | 四川九洲电器集团有限责任公司 | Method for self-adaptive support of more pieces of monitoring equipment |
CN104660997A (en) * | 2015-02-12 | 2015-05-27 | 江苏物联网研究发展中心 | Service oriented multi-source heterogeneous video surveillance adaptation method and system |
CN105491337A (en) * | 2015-12-10 | 2016-04-13 | 公安部交通管理科学研究所 | Universal network video monitoring equipment access method and apparatus based on SDK abstract layer |
CN105721831A (en) * | 2016-01-28 | 2016-06-29 | 安徽四创电子股份有限公司 | Method for designing video monitoring client side based on multi-process architecture |
CN109218393A (en) * | 2018-07-24 | 2019-01-15 | 百度在线网络技术(北京)有限公司 | A kind of implementation method of push, device, equipment and computer storage medium |
CN109862605A (en) * | 2019-01-22 | 2019-06-07 | 上海连尚网络科技有限公司 | A kind of networking methods and equipment for terminal device |
CN110022307A (en) * | 2019-03-08 | 2019-07-16 | 视联动力信息技术股份有限公司 | A kind of control method of monitoring device and monitoring access server |
CN110347445A (en) * | 2019-07-12 | 2019-10-18 | 财付通支付科技有限公司 | SDK call method, device, server and storage medium |
CN110969740A (en) * | 2019-12-12 | 2020-04-07 | 浩云科技股份有限公司 | Access method of access control management system to different types of access control equipment and access control system |
CN111610965A (en) * | 2020-05-20 | 2020-09-01 | 浩云科技股份有限公司 | Standard SDK (software development kit) making method and device of access control platform |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113691879A (en) * | 2021-10-25 | 2021-11-23 | 通号通信信息集团有限公司 | Video data processing method, electronic device, and computer-readable storage medium |
CN113691879B (en) * | 2021-10-25 | 2022-03-15 | 通号通信信息集团有限公司 | Video data processing method, electronic device, and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106489251B (en) | The methods, devices and systems of applied topology relationship discovery | |
CN108429721B (en) | Identification method and device for web crawler | |
US20190158626A1 (en) | Method, apparatus and computer readable storage medium for processing service | |
CN112989330B (en) | Container intrusion detection method, device, electronic equipment and storage medium | |
CN112965879A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN112506755B (en) | Log acquisition method, device, computer equipment and storage medium | |
CN111562889B (en) | Data processing method, device, system and storage medium | |
CN111258851A (en) | Cluster alarm method, device, setting and storage medium | |
CN111405052A (en) | P2P penetration method based on port prediction, electronic device and medium | |
CN110430070B (en) | Service state analysis method, device, server, data analysis equipment and medium | |
CN115766734A (en) | Visual detection method and system based on cloud service | |
CN115102877A (en) | Virtual network card network detection method, device, equipment and medium | |
CN112714161A (en) | Video access method, device and system | |
US20170004012A1 (en) | Methods and apparatus to manage operations situations in computing environments using presence protocols | |
CN114090268B (en) | Container management method and container management system | |
CN107766232B (en) | Plug-in management method and device | |
CN114356456A (en) | Service processing method, device, storage medium and electronic equipment | |
CN112950447B (en) | Resource scheduling method, device, server and storage medium | |
CN113553243A (en) | Remote error detection method | |
WO2017096791A1 (en) | Diagnosis test message processing method and device | |
CN112261051B (en) | User registration method, device and system | |
CN117176613B (en) | Data acquisition method and device | |
CN114884987B (en) | Method, device and storage medium for acquiring equipment state information | |
CN113301154B (en) | Public cloud resource creation method and device, storage medium and electronic equipment | |
CN109951739B (en) | Video service processing method and device 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210427 |
|
RJ01 | Rejection of invention patent application after publication |