WO2018166415A1 - Cloud storage system, media data storage method and system - Google Patents
Cloud storage system, media data storage method and system Download PDFInfo
- Publication number
- WO2018166415A1 WO2018166415A1 PCT/CN2018/078685 CN2018078685W WO2018166415A1 WO 2018166415 A1 WO2018166415 A1 WO 2018166415A1 CN 2018078685 W CN2018078685 W CN 2018078685W WO 2018166415 A1 WO2018166415 A1 WO 2018166415A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- media data
- collection device
- image collection
- network address
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 107
- 238000013500 data storage Methods 0.000 title claims abstract description 57
- 238000007726 management method Methods 0.000 claims description 146
- 238000012545 processing Methods 0.000 claims description 86
- 239000000284 extract Substances 0.000 claims description 14
- 230000005540 biological transmission Effects 0.000 claims description 6
- 230000008569 process Effects 0.000 description 17
- 238000004458 analytical method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 7
- 238000004590 computer program Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
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
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
-
- 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
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1061—Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
-
- 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
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
Definitions
- the present application relates to the field of video surveillance technologies, and in particular, to a cloud storage system, a media data storage method, and a system.
- the media data collected by the device includes but is not limited to pictures.
- the specific media data storage process is: after the image collection device registers with the platform server responsible for managing the image collection device, the platform server actively collects the media data collected by the image collection device, and then the platform server stores the data to the cloud.
- the system requests the storage resource, and after requesting the storage resource, writes the media data collected from the image collection device to the cloud storage system, thereby completing the storage of the media data.
- the media data storage process requires the platform server to perform the transfer
- the media data storage process is in two stages (ie, the platform server collects the media data from the image collection device, and the platform server writes the collected media data to the cloud storage system). All of them need to occupy network bandwidth resources, which leads to more consumption of network bandwidth resources.
- the uploading efficiency is undoubtedly low.
- the purpose of the embodiments of the present application is to provide a cloud storage system, a media data storage method, and a system, to reduce network bandwidth resource consumption and improve media data upload efficiency.
- the specific technical solutions are as follows:
- the embodiment of the present application provides a media data storage method, which is applied to an image collection device, where the first network address is pre-stored in the image collection device, and the first network address is an external access of the cloud storage system. Address; the method includes:
- the cloud storage system And requesting, by the cloud storage system, a second network address, where the second network address is a network address of the target storage node, where the target storage node is: the cloud storage system is a storage node allocated by the image collection device for storing media data of the image collection device;
- the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system.
- the target storage node After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system.
- the target storage node After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system.
- the embodiment of the present application provides a media data storage method, which is applied to a cloud storage system, where the method includes:
- the image collection device uploads target media data to be stored to the cloud based on the second network address a storage system, wherein the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system is allocated by the image collection device for storing the image collection device. a storage node for media data;
- the embodiment of the present application provides a media data storage system, including: an image collection device and a cloud storage system, where the image collection device pre-stores a first network address, where the first network address is cloud storage.
- the external access address of the system including:
- the image collection device is configured to send, according to the first network address, a storage node allocation request to the cloud storage system, obtain a second network address fed back by the cloud storage system, and obtain the second network address. And uploading the target media data to be stored to the cloud storage system, where the second network address is a network address of the target storage node, and the target storage node is: a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;
- the cloud storage system is configured to receive a storage node allocation request sent by the image collection device, and feed back the second network address to the image collection device; and store the target media data uploaded by the image collection device; The target media data is stored in the target storage node in the cloud storage system.
- an embodiment of the present application further provides an image collection device, including: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, the processor and the The memory is disposed on the circuit board; the power supply circuit is configured to supply power to each circuit or device; the memory is used to store executable program code; and the processor executes the first aspect of the embodiment of the present application by running executable program code stored in the memory The media data storage method provided.
- the embodiment of the present application further provides a cloud storage system, including: a management node and a storage node;
- the management node is configured to receive a storage node allocation request sent by the image collection device, and feed back a second network address to the image collection device, so that: after obtaining the second network address, the image collection device is based on the Transmitting the target media data to be stored to the cloud storage system, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself,
- the first network address is an external access address of the management node
- the second network address is a network address of the target storage node
- the target storage node is: the cloud storage system is allocated by the image collection device, a storage node for storing media data of the image capture device;
- the target storage node is configured to store the target media data uploaded by the image collection device.
- the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the first aspect of the embodiment of the present application is implemented.
- the provided media data storage method steps
- the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the second aspect of the embodiment of the present application is implemented.
- the provided media data storage method steps
- the image collection device actively requests the cloud storage system to obtain the second network address of the target storage node, and after obtaining the second network address, stores the media data based on the second network address.
- Target storage node stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- FIG. 1 is a flowchart of a method for storing media data according to a first aspect of the present application
- FIG. 2 is another flowchart of a method for storing media data according to a first aspect of the present application
- FIG. 3 is still another flowchart of a method for storing media data according to a first aspect of the present application
- FIG. 4 is a flowchart of a method for storing media data according to a second aspect of the embodiments of the present application.
- FIG. 5 is another flowchart of a method for storing media data according to a second aspect of the present application.
- FIG. 6 is still another flowchart of a method for storing media data according to a second aspect of the present application.
- FIG. 7 is a schematic diagram of storage manners of media data and intelligent data in an embodiment of the present application.
- FIG. 8 is a sequence diagram of a media data storage method according to an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a media data storage system according to an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of an application example of a media data storage system according to an embodiment of the present disclosure.
- FIG. 11 is a schematic structural diagram of an image collection device according to an embodiment of the present application.
- FIG. 12 is a schematic structural diagram of a cloud storage system according to an embodiment of the present disclosure.
- the embodiment of the present application provides a media data storage method from the perspective of an image capture device.
- the image capturing device refers specifically to a device having an image capturing function.
- the image capturing device may be a capture camera or a network camera, of course, but is not limited thereto.
- the capture machine specifically refers to a photographic equipment that can be started in an instant, completes the photography parameter setting and performs high-speed shooting, and the lens is mostly a fixed focus lens or a medium focal length lens with a small zoom range.
- the media data collected by the image collection device may include, but is not limited to, a picture.
- the media data collected by the image collection device is stored by the cloud storage system, and in the storage process, the image collection device directly saves the media data to the cloud storage.
- media data is not transferred through any relay device during the media data storage process.
- the image collection device pre-stores a first network address, where the first network address is an external access address of the cloud storage system.
- the cloud storage system can include at least one management node and at least one storage node, wherein the management node is used to manage the storage node, and the storage node is used to store data, wherein the specific physical form of the storage node can be Server form.
- the first network address may be an IP address and a port.
- the cloud storage system may have a plurality of nodes.
- the first network address may be a virtual network address or an actual network address of a node that provides external access in the cloud storage system.
- the first network address may be saved in the configuration file of the image collection device through the WEB configuration of the image capture device; of course, the image capture device may be directly logged in to the image capture device, and the configuration file of the image capture device may be manually modified. Record the first network address.
- a cloud storage system usually provides services to a plurality of nodes through a cluster.
- the first network address is a virtual network address
- the virtual network address can be provided by using a cluster technology.
- a cluster consisting of three servers A, B, and C; assuming that the actual IP of server A is 192.168.1.10, the actual IP of server B is 192.168.1.11, and the actual IP of server C is 10.192.1.12, then Through the clustering technology, a virtual IP and port are provided to provide external services.
- the virtual IP is 10.192.1.100 and the port is 6021.
- the image collecting device only needs to configure the virtual IP and port through the WEB of the image capturing device to configure the image.
- the capture device can be saved, and the image capture device reads from the configuration file when the virtual IP and port are needed; of course, the virtual IP and port can be configured without the image capture device WEB setting, but can be directly backstage. Log in to the image capture device and manually modify the profile of the image capture device to record the virtual IP and port.
- a media data storage method provided by an embodiment of the present application is applied to an image collection device, and the method may include the following steps:
- the second network address is requested by the cloud storage system according to the first network address, where the second network address is a network address of the target storage node, where the target storage node is allocated by the cloud storage system to the image collection device.
- the image collection device can store its own media data in the cloud storage system in real time or periodically, and since the image acquisition device only stores the external access address of the cloud storage system, regardless of real-time or timing, Both need to first request the cloud storage system to allocate a target storage node for the image collection device.
- the image collection device may send a storage node allocation request to the cloud storage system after establishing a communication connection with the cloud storage system based on the first network address;
- the cloud storage system may select a target storage node from the storage node included in the cloud storage system, and feed back to the image collection device the actual network address of the target storage node, that is, the second network address, where the second network address Includes IP address and port.
- the cloud storage system may select a target storage node by using a load balancing policy, which is of course not limited thereto.
- the image storage device may upload the media data to the target storage node multiple times once the target storage node determines. Based on the idea of uploading data to the same node multiple times, the triggering time for requesting the second network address from the cloud storage system may be set according to the specific application, for example, the image capturing device starts up each time, or reaches a predetermined time. Point, and so on.
- the image collection device may upload the target media data to be stored to the cloud storage system in real time or periodically based on the second network address, and the target media data is stored in the cloud.
- the target storage node in the storage system may refer to that the image collection device performs storage immediately after collecting the media data; and the so-called timing storage may refer to that the image collection device does not immediately perform storage after collecting the media data, but achieves the reservation. At the time of the point, all media data that is not currently stored is stored. It should be noted that the target media data described in the embodiment of the present application is media data collected by the image collection device and to be stored.
- the target storage node stores a specific storage format of the media data uploaded by the image collection device, which is not limited in the embodiment of the present application.
- the image collection device actively requests the cloud storage system to obtain the second network address of the target storage node, and after obtaining the second network address, stores the media data based on the second network address.
- Target storage node stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the media data provided by the embodiment of the present application is provided in the first aspect.
- the storage method may further include the steps of:
- S103 Receive target storage information that is fed back by the cloud storage system, where the target storage information is information determined based on a storage location corresponding to the target media data.
- S104 Save a target URL (Uniform Resource Locator) corresponding to the target media data to a platform server corresponding to the image collection device, where the target URL is information determined based on the target storage information.
- a target URL Uniform Resource Locator
- the cloud storage system may determine the target storage information based on the storage location corresponding to the target media data, and then target the target.
- the storage information is fed back to the image collection device, so that the image collection device saves the target URL corresponding to the target media data to the platform server corresponding to the image collection device, so that the subsequent platform server or browser can access the target URL.
- Target media data wherein the access manner may include: downloading, deleting, or locking.
- the storage location corresponding to the target media data may be a disk identifier and a disk offset of the disk where the target media data is located, and an identifier of the target media data
- the target storage information may be the target URL.
- the storage location corresponding to the target media data may directly send the storage location to the platform server, and then generate, by the platform server, the target media data according to the storage location.
- the target URL is saved and stored; of course, the image collection device may also generate a target URL corresponding to the target media data based on the storage location, and the image collection device sends the target URL to the platform server, so that the platform server directly stores the target URL.
- Target URL the target URL
- the target storage information is the target URL
- the cloud storage system when the target storage information is the target URL, that is, the cloud storage system generates a target URL corresponding to the target media data based on the storage location corresponding to the target media data, so that the image collection device receives the target URL.
- the target URL can be forwarded to the platform server, and the target URL is stored by the platform server.
- the specific implementation manner of assembling the storage location corresponding to the target media data into the target URL is not limited herein, and the target URL may further include the first network address for effective access.
- the target URL stored by the platform server, the browser as the access end or the platform server can access the target media data, and the media data storage method provided by the cloud storage system from the perspective of the specific access process The description is made in the embodiment.
- the image collection device may have an intelligent analysis function, so that the image collection device can perform intelligent analysis on the media data, and then store the intelligent data obtained by the intelligent analysis together with the corresponding media data into the cloud storage system.
- the cloud storage system corresponds to the intelligent data corresponding to the storage media data and the media data, thereby improving the richness of the data stored in the cloud storage system and the richness of the data accessible by the subsequent access terminals.
- the step of uploading the target media data to be stored to the cloud storage system based on the second network address may include:
- the target media data and the target smart data are stored in a target storage node in the cloud storage system
- the target The intelligent data is data extracted by the image acquisition device from the target media data.
- the data type of the intelligent data may include, but is not limited to, a license plate number, a vehicle color, a face modeling model data, a picture capture time information, a picture lane location information, and the like.
- the target media data when the target media data is a picture including face information, the target intelligent data corresponding to the target media data may be at least one of face modeling model data and picture capture time information, wherein the face modeling data Specific content includes but is not limited to: face information.
- the target media data is a picture including vehicle information
- the target intelligent data corresponding to the target media data may be at least one of a license plate number, a vehicle color, a picture capture time information, and a picture lane geographical position information.
- the image collection device may perform intelligent analysis on the media data, and save the smart data obtained by the intelligent analysis together with the URL of the corresponding media data to the image collection device.
- the platform server corresponds to the intelligent data corresponding to the storage media data and the media data, so that the richness of the data stored by the platform server and the richness of the subsequently available data.
- the step of saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device may include:
- the target URL corresponding to the target media data and the target smart data are saved to the platform server corresponding to the image collection device, wherein the target smart data is extracted by the image collection device from the target media data.
- the method for storing media data provided by the first aspect of the present disclosure may further include the following steps:
- the target multimedia data is retransmitted to the cloud storage system according to a predetermined retransmission policy.
- the so-called target media data uploading failure may be: receiving an upload failure message fed back by the cloud storage system, or not receiving the target storage information fed back by the cloud storage system within a predetermined time period.
- the image collecting device since the image collecting device is in passive uploading, when the target media data fails to upload, it can only wait for the next uploading opportunity, which may cause a backlog of media data, especially when the backend storage node fails.
- the upload fails you cannot quickly switch to other back-end storage nodes. You can only wait until the next acquisition time to perform the switchover, which will undoubtedly cause the image collection device to accumulate too much media data.
- the uploading since the image collection device actively uploads, when the target media data fails to upload, the uploading may be performed according to the predetermined retransmission policy to prevent the target media data from being backlogged.
- the step of retransmitting the target multimedia data to the cloud storage system according to the predetermined retransmission policy may include:
- the target multimedia data when the target media data fails to be uploaded, the target multimedia data may be uploaded to the cloud storage system based on the second network address to solve the network cause. The upload failed.
- the step of retransmitting the target multimedia data to the cloud storage system according to the predetermined retransmission policy may include:
- the cloud storage system may be requested to the new target storage node, and then the target media data is obtained based on the network address of the new target storage node. Re-upload to the cloud storage system to resolve upload failures due to network reasons and node failures.
- the foregoing two specific implementation manners may be used in combination.
- the first specific implementation manner described above when the first upload of the target media data fails, the first specific implementation manner described above may be adopted.
- the retransmission mode is given, and when the target media data fails to be uploaded for the first time, the retransmission mode given by the second specific implementation manner described above may be adopted.
- the upload failure message fed back by the cloud storage system if the upload failure message fed back by the cloud storage system is received, it is usually indicated that the cloud storage system receives the target media data but the data is incorrect. In this case, the first specific implementation may be adopted.
- the cloud storage system may not receive the target media data due to network reasons, or may be unable to be caused by the target storage node failure.
- the target media data is stored.
- the retransmission can be implemented in combination with the first specific implementation manner and the second specific implementation manner to ensure data uploading efficiency.
- a media data storage method provided by the first aspect of the embodiments of the present application is described below in conjunction with a specific embodiment.
- the cloud storage system includes at least one management node and at least one storage node, wherein the management node is used to manage each storage node, and each storage node is used to store data.
- the first network address is specifically configured as an external access address of the management node in the cloud storage system, where the specific format and specific configuration manner of the first network address are used.
- the image capturing device may be a capture camera or a network camera, which is of course not limited thereto.
- the media data collected by the image acquisition device may include, but is not limited to, a picture.
- a media data storage method provided in the first aspect of the present application is applied to an image collection device, and the method may include the following steps:
- the image collection device After establishing a tcp (Transmission Control Protocol) connection with the management node based on the first network address, the image collection device sends a first http (Hyper Text Transfer Protocol) for requesting the storage node to the management node.
- a hypertext transfer protocol request message such that: the management node determines a target storage node corresponding to the image collection device, and after the target storage node determines, feeds back to the image collection device the first network address carrying the second network address Http reply message;
- the image collection device may first detect whether a tcp connection is currently established with the management node, and detects that the management node is not currently established.
- a tcp connection is established with the management node based on the first network address, and then, after the tcp connection is established, the request packet is sent to the management node.
- the TCP/IP protocol provides a reliable connection service, and a three-way handshake is used to establish a connection. Therefore, the tcp connection established by the image collection device and the management node is a connection established by using a three-way handshake.
- the specific implementation process of establishing a tcp connection by using a three-way handshake is not described here.
- the TCP/IP protocol is short for Transmission Control Protocol/Internet Protocol, and the Chinese translation is called Transmission Control Protocol/Internet Protocol.
- the image collection device may initiate an http request to the management node, that is, send a first http request message for requesting the storage node to the management node; After receiving the first http request message, the management node determines a target storage node corresponding to the image collection device, and after determining the target storage node, feeds back to the image collection device that the second network address is carried. An http reply message.
- the management node may determine, from among the storage nodes, a target storage node corresponding to the image collection device.
- the management node may adopt a load balancing policy when selecting the target storage node, which is not limited thereto.
- the standards referenced by the load balancing policy include, but are not limited to, the storage space occupancy of the storage node, or , the current load of the storage node, and so on.
- the first http request message may carry information such as an encoder ID of the image capturing device, a system time of the image capturing device, and the like. It can be understood that the system time of the image collection device can reflect the timeliness of the first http request message.
- the management node receives the first http request message, the system can detect the first time through the system time in the first http request message. Whether an http request message has timed out, if it times out, it may not respond to the first http request message.
- the cloud storage system since there are several storage nodes in the cloud storage system, and the cloud storage system is not only used to store media data of each image collection device, multiple virtual resource pools can be constructed, and each virtual resource pool is used. For storing specific types of data content.
- the storage node in the cloud storage system may belong to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, the target virtual resource pool. a virtual resource pool for storing media data of the image capture device;
- the first http request message carries the target ID information
- the step of determining, by the management node, the target storage node corresponding to the image collection device may include:
- the management node extracts the target ID information from the first http request message
- the management node may select a target storage node corresponding to the image collection device from the target virtual resource pool corresponding to the target ID information. It should be emphasized that the management node may select a target storage node by using a load balancing policy, which is of course not limited thereto.
- the ID information of the virtual resource pool is unique in the cloud storage system.
- the virtual resource pool and the storage node may belong to a many-to-many relationship, that is, one virtual resource pool may belong to multiple storage nodes, and different storage spaces of one storage node may belong to different virtual environments. Resource pool.
- the virtual resource pool and the storage node may belong to a one-to-one correspondence, that is, one storage node may uniquely correspond to one virtual resource pool.
- the virtual resource pool and the storage node may belong to a many-to-many relationship
- the cloud storage system includes three storage nodes, and each storage node has a storage space of 500 G, wherein The storage look-ahead space of each storage node is divided into virtual resource pools.
- the virtual resource pool A includes a storage space of 500G in the storage node 1, a storage space of 100G in the storage node 2, and a 100G in the storage node 3.
- the virtual resource pool B includes a storage space of 400G in the storage node 2 and a storage space of 200G in the storage node 3, the virtual resource pool C includes a storage space of 200G in the storage node 3; and, the set data
- the storage relationship is: the virtual resource pool A corresponds to the image collection device 1-100, the virtual resource pool B corresponds to the image collection device 101-200, and the virtual resource pool C corresponds to the image collection device 201-300.
- the image acquisition device 100 is pre-configured with the external access address of the cloud storage system, that is, the first network address, and the ID information of the virtual resource pool A is pre-configured, and further, when the image is
- the collection device 100 requests the target storage node from the management node
- the first http request message sent to the management node carries the ID information of the virtual resource pool A
- the management node receives the first http request message, according to the The load balancing policy selects a target storage node corresponding to the image capturing device 100 from the storage nodes 1-3 included in the virtual resource pool A.
- the virtual resource pool and the storage node may belong to a one-to-one correspondence.
- the cloud storage system includes 10 storage nodes, where the storage nodes 1-3 are divided into a virtual resource pool.
- the resource pool is named virtual resource pool A; the storage node 4-6 is divided into a virtual resource pool, which is named virtual resource pool B; the storage node 7-10 is divided into a virtual resource pool.
- the virtual resource pool is named as the virtual resource pool C; and the set data storage relationship is: the virtual resource pool A corresponds to the image collection device 1-100, and the virtual resource pool B corresponds to the image collection device 101-200.
- the resource pool C corresponds to the image collection devices 201-300.
- the image acquisition device 100 is pre-configured with the external access address of the cloud storage system, that is, the first network address, and the ID information of the virtual resource pool A is pre-configured, and further, when the image is
- the collection device 100 requests the target storage node from the management node
- the first http request message sent to the management node carries the ID information of the virtual resource pool A
- the management node receives the first http request message, according to the The load balancing policy selects a target storage node corresponding to the image capturing device 100 from the storage nodes included in the virtual resource pool A.
- the first http reply message may further carry the system time of the management node, where the system time of the management node can reflect the timeliness of the first http response message, and after the image collecting device receives the first http reply message, The first http reply message may be timed out by the system time in the first http reply message. If the timeout occurs, the first http reply message may be discarded, and the sending to the management node for requesting the storage node may be re-executed.
- the first http request message step.
- the image collecting device uploads media data to the target storage node
- the image capturing device may first detect whether a tcp connection is currently established with the target storage node, and detects that the target storage node is not currently associated with the target storage node.
- a tcp connection is established with the target storage node based on the second network address, and after the tcp connection is established, the media data is uploaded to the target storage node.
- the second http request message may not only carry the target media data, but also may carry the encoder ID of the image collection device, the target ID information of the target virtual resource pool, the time stamp of the target media data, the system time of the image collection device, and the like. .
- the encoder ID of the image collection device is used to identify the image collection device; and for the target ID information of the target resource pool, in the case where the virtual resource pool and the storage node belong to a many-to-many relationship, the target storage The node may determine, according to the target ID information of the target virtual resource pool, which storage space the target media data needs to be written; the time stamp of the target media data may be used to identify the target media data, and the system time of the image collection device may be verified. Whether the second http request message times out.
- the TCP protocol provides a reliable connection service, and a three-way handshake is used to establish a connection. Therefore, the tcp connection established by the image collection device and the target storage node is a connection established by using a three-way handshake, where The specific implementation process of establishing a tcp connection by using a three-way handshake is not described here.
- the image collection device can upload the target media data and the target smart data to be stored to the cloud storage system when the smart analysis function is provided.
- the second http request message carries the target intelligent data. So that the target cloud storage system can correspondingly store the target media data and the target smart data.
- the target smart data may be located at the end of the target media data, and the target smart data is identified by a specific identifier, so that the cloud storage system may identify the specific identifier based on the specific identifier.
- Target intelligent data, and the target intelligent data is stored corresponding to the target media data.
- S304 Receive a second http reply message fed back by the target storage node, where the second http reply message carries the target storage information.
- the target storage information is information determined based on a storage location corresponding to the target media data.
- the target storage node may determine the target storage information based on the storage location of the target media data, and then construct a second http reply message carrying the target storage information, and send the message to the image collection device.
- the image collecting device may extract the target storage information from the second http reply message.
- the target URL is the information determined based on the target storage information, and the relationship between the target URL and the target storage information may refer to the content of the foregoing embodiment, and details are not described herein.
- the second http reply message may further include: timestamp information of the target media data, and further, the image collecting device may send the timestamp information of the target media data to the platform server, where the platform server stores the target media data. The correspondence between the timestamp information and the target URL.
- the target intelligent data may be extracted from the target media data, and the target URL and the target smart data corresponding to the target media data are saved to a platform corresponding to the image collection device. server.
- the target storage information is a storage location corresponding to the target media data
- the image collection device may directly send the storage location and the target intelligent data to the platform server, and the platform server generates the storage location based on the storage location.
- the image capturing device may also generate a target URL corresponding to the target media data based on the storage location, and the image collecting device
- the target URL and the target intelligent data are sent to the platform server such that the platform server directly stores the target URL and the target smart data.
- the target storage information is the target URL, that is, the cloud storage system generates a target URL corresponding to the target media data based on the storage location corresponding to the target media data, so that the image collection device receives the target URL.
- the target URL and the target smart data may be sent to the platform server, and the target URL and the target smart data are correspondingly stored by the platform server.
- the second http request message may be of a long connection type, that is, setting connection:keep-alive in the HTTP protocol, so that after the target media data is uploaded, the image capturing device does not need to close the tcp. Connection, the next time the media data is uploaded, the tcp connection is directly multiplexed.
- the long and short connections of HTTP are essentially TCP long connections and short connections. That is, after the second network address is requested, when the target media data to be stored is uploaded for the first time, it is necessary to first establish a tcp connection with the target storage node based on the second network address, and further, after the tcp connection is established. The data is uploaded to the target storage node.
- the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the embodiment of the present application provides a media data storage method from the perspective of a cloud storage system.
- the cloud storage system may include at least one management node and at least one storage node, where the management node is used to manage the storage node, and the storage node is used to store data, wherein the specific physical form of the storage node may be Server form.
- the cloud storage system may correspond to an external access address, that is, a first network address, and the first network address is pre-stored in the image collection device.
- the first network address may be an IP address and a port number.
- a media data storage method provided by an embodiment of the present application is applied to a cloud storage system, and the method may include the following steps:
- S401 Receive a storage node allocation request sent by the image collection device, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself;
- the image collection device may send a storage node allocation request to the cloud storage system after establishing a communication connection with the cloud storage system based on the first network address;
- the cloud storage system can receive the storage node allocation request, and then perform a subsequent node allocation process.
- the image storage device may upload the media data to the target storage node multiple times once the target storage node determines.
- the triggering time for requesting the second network address from the cloud storage system may be set according to the specific application, that is, the timing of sending the storage node allocation request to the cloud storage system, for example, :
- the trigger timing can be started each time the image capture device is turned on, or reaches a predetermined time point, and so on.
- the second network address is fed back to the image collection device, so that: after obtaining the second network address, the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address;
- the second network address is a network address of the target storage node, and the target storage node is a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;
- the cloud storage system may select the target storage node from each storage node, and after the target storage node determines, feed back the second network address, that is, the target, to the image collection device.
- the network address of the storage node may be used.
- the image collection device may upload the target media data to be stored to the cloud storage system based on the second network address.
- the cloud storage system may select a target storage node by using a load balancing policy, which is of course not limited thereto.
- the image collection device may upload the target media data to be stored to the cloud storage system in real time or periodically based on the second network address, where the real-time storage and timing are performed.
- the storage For the definition of the storage, reference may be made to the above embodiments, and details are not described herein.
- the target media data uploaded by the image collection device is stored.
- the target media data is stored in the target storage node in the cloud storage system.
- the target storage node stores a specific storage format of the media data uploaded by the image collection device, which is not limited in the embodiment of the present application.
- the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the image collection device may have an intelligent analysis function, so that the image collection device can perform intelligent analysis on the media data, and then store the intelligent data obtained by the intelligent analysis together with the corresponding media data into the cloud storage system. , thereby increasing the richness of data stored in the cloud storage system and the richness of data accessible by subsequent access terminals.
- the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address, and may include:
- the image collection device uploads the target media data and the target smart data to be stored to the cloud storage system based on the second network address; wherein the target smart data is extracted by the image collection device from the target media data The data;
- the step of storing the target media data uploaded by the image collection device comprises:
- a media data storage method provided by the second aspect of the present application may further include the following steps:
- S404 The target storage information is fed back to the image collection device, so that after the image collection device receives the target storage information, the target URL corresponding to the target media data is saved to the platform server corresponding to the image collection device.
- the target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
- the cloud storage system may determine the target storage information based on the storage location corresponding to the target media data, and then The target storage information is fed back to the image collection device, so that the image collection device saves the target URL corresponding to the target media data to the platform server corresponding to the image collection device, so that the subsequent platform server or browser can access the target URL.
- the target media data wherein the access manner may include: downloading, deleting, or locking.
- the storage location corresponding to the target media data may be a disk identifier and a disk offset of the disk where the target media data is located, and an identifier of the media data, and the target storage information may be the target URL, or the target media.
- the storage location corresponding to the data For the conversion relationship between the storage location of the target media data, the target storage information, and the target URL, refer to the foregoing embodiment, and details are not described herein.
- a media data storage method provided by the second aspect of the embodiments of the present application is described below in conjunction with a specific embodiment.
- the cloud storage system includes at least one management node and at least one storage node, wherein the management node is used to manage each storage node, and the management node may be a node independent of the storage node, or may be in a plurality of storage nodes.
- a node that is, a storage node acts as both a storage node and a management node.
- the first network address is specifically configured as an external access address of the management node in the cloud storage system, where the specific format and specific configuration manner of the first network address are used. The above embodiments are not described herein.
- a media data storage method provided by the second embodiment of the present application is applied to a cloud storage system, and the method may include the following steps:
- the tcp connection between the management node and the image collection device is: the image collection device requests the establishment of the management node based on the first network address.
- the first http request message may carry information such as an encoder ID of the image capturing device, a system time of the image capturing device, and the like. It can be understood that the system time of the image collection device can reflect the timeliness of the first http request message.
- the management node receives the first http request message, the system can detect the first time through the system time in the first http request message. Whether an http request message has timed out, if it times out, it may not respond to the first http request message.
- the image collecting device actively establishes a tcp connection with the management node, and the timing of establishing a triggering time of the tcp connection, that is, the timing of requesting the second network address from the cloud storage system, refer to the foregoing solution provided from the perspective of the image collecting device. The content in this article will not be repeated here.
- the TCP protocol provides a reliable connection service in the TCP/IP protocol, a three-way handshake is used to establish a connection.
- the tcp connection established by the image collection device and the management node is a connection established by using a three-way handshake, wherein The three-way handshake establishes a specific implementation process of a tcp connection, and will not be described here.
- the management node determines a target storage node corresponding to the image collection device.
- the management node may determine, from among the storage nodes, a target storage node corresponding to the image collection device. In addition, the management node selects the target storage node, and may adopt a load balancing policy, where the standards referenced by the load balancing policy include, but are not limited to, the storage space occupancy of the storage node, or the current load of the storage node. Quantity, and so on.
- the cloud storage system since there are several storage nodes in the cloud storage system, and the cloud storage system is not only used to store media data of each image collection device, multiple virtual resource pools can be constructed, and each virtual resource pool is used. For storing specific types of data content.
- the storage node in the cloud storage system may belong to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, the target virtual resource pool. a virtual resource pool for storing media data of the image capture device;
- the first http request message carries the target ID information
- the step of determining, by the management node, the target storage node corresponding to the image collection device comprises:
- the management node extracts the target ID information from the first http request message
- the ID information of the virtual resource pool is unique in the cloud storage system.
- the virtual resource pool and the storage node may belong to a many-to-many relationship, that is, one virtual resource pool may belong to multiple storage nodes, and different storage spaces of one storage node may belong to different virtual environments. Resource pool.
- the virtual resource pool and the storage node may belong to a one-to-one correspondence, that is, one storage node may uniquely correspond to one virtual resource pool.
- the management node may select a target storage node corresponding to the image collection device from the target virtual resource pool corresponding to the target ID information. It should be noted that the management node may select a target storage node by using a load balancing policy, which is of course not limited thereto.
- the management node After determining the target storage node, the management node feeds back, by the image collection device, a first http reply message carrying a second network address.
- the second network address is a network address of the target storage node.
- the first http reply message may further carry the system time of the management node, where the system time of the management node can reflect the timeliness of the first http response message, and after the image collecting device receives the first http reply message, The first http reply message may be timed out by the system time in the first http reply message. If the timeout occurs, the first http reply message may be discarded, and the sending to the management node for requesting the storage node may be re-executed.
- the first http request message step.
- the second http request message carries the target media data to be stored, and the tcp connection between the target storage node and the image collection device is: the image collection device requests to establish the target storage node based on the second network address.
- the target storage node extracts the target media data from the second http request message, and stores the target media data.
- the image collection device may construct a second http request message with the target media data to be stored, and then send the second http request message to the target storage node after the tcp connection is established;
- the target storage node extracts the target media data from the second http request message, and stores the target media data.
- the second http request message may not only carry the target media data, but also may carry the encoder ID of the image collection device, the target ID information of the target virtual resource pool, the time stamp of the target media data, the system time of the image collection device, and the like.
- the encoder ID of the image collection device is used to identify the image collection device; and for the target ID information of the target resource pool, in the case where the virtual resource pool and the storage node belong to a many-to-many relationship, the target storage The node may determine, according to the target ID information of the target virtual resource pool, which storage space the target media data needs to be written; the time stamp of the target media data may be used to identify the target media data, and the system time of the image collection device may be verified.
- the second http request message may also carry the target smart data, thereby making the target
- the cloud storage system may correspondingly store the target media data and the target smart data.
- the target smart data may be located at the end of the target media data, and the target smart data is identified by a specific identifier, so that the cloud storage system may identify the specific identifier based on the specific identifier.
- Target intelligent data, and the target intelligent data is stored corresponding to the target media data.
- the target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries the target storage information.
- the target storage information is information determined based on a storage location corresponding to the target media data.
- the user may determine the target storage information based on the storage location of the target media data, and then construct the target storage information.
- the second http reply message is sent to the image collection device; correspondingly, after receiving the second http reply message fed back by the target storage node, the image collection device may extract the target storage information from the second http reply message. And saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device, where the target URL is information determined based on the target storage information.
- the second http reply message may further include: timestamp information of the target media data, and further, the image collecting device may send the timestamp information of the target media data to the platform server, where the platform server stores the target media data.
- the correspondence between the timestamp information and the target URL For the specific content and relationship of the storage location corresponding to the target storage information and the target media data, reference may be made to the content of the foregoing embodiment, and details are not described herein. For the same, the relationship between the target URL and the target storage information can be referred to the content of the foregoing embodiment, and details are not described herein.
- the second http request message may be of a long connection type, that is, setting connection:keep-alive in the HTTP protocol, so that after the target media data is uploaded, the image capturing device does not need to close the tcp. Connection, the next time the media data is uploaded, the tcp connection is directly multiplexed.
- the long and short connections of HTTP are essentially TCP long connections and short connections. That is, after the second network address is requested, when the target media data to be stored is uploaded for the first time, it is necessary to first establish a tcp connection with the target storage node based on the second network address, and further, after the tcp connection is established. And uploading data to the target storage node; and when uploading the target media data to be stored, since the tcp connection is not disconnected after the last uploading process, the data can be directly uploaded to the target storage node.
- the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the media data storage method provided in the second aspect of the embodiment of the present application may further include the following steps:
- the media data processing request is redirected to the target storage node to perform processing operations corresponding to the media data processing request by the target storage node.
- the cloud storage system needs to redirect the media data processing request to the target storage node after receiving the media data processing request sent by the access terminal based on the target URL.
- the target storage node performs a processing operation corresponding to the media data processing request.
- the access terminal when the access terminal is a browser, the user can copy the target URL to the address input box of the browser, so that the browser issues a media data processing request.
- the access terminal is a platform server, since the platform server stores the target URL, when the target media data needs to be accessed, the platform server can directly issue a media data processing request based on the target URL.
- the media data processing request may be any one of a download request, a lock request, and a delete request.
- the processing operation corresponding to the media data processing request is a download operation; and when the media data processing request is a lock request, the processing corresponding to the media data processing request The operation is a lock operation; when the media data processing request is a delete request, the processing operation corresponding to the media data processing request is a delete operation.
- the first network address is specifically an external access address of the management node in the cloud storage system;
- the target URL includes the first network address;
- the step of receiving the media data processing request sent by the access terminal based on the target URL may include:
- the management node After establishing a tcp connection with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data; wherein the third http request message is formed based on the target URL; the management node and the management node
- the tcp connection between the access terminals is: the access end requests the establishment of the management node based on the first network address in the target URL;
- the step of redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node may include:
- the management node parses the third http request message to obtain the target URL
- the accessing end establishes a tcp connection with the target storage node based on the second network address in the third http reply message, and then The target storage node sends the third http request message, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
- the correspondence between the node identifier of the storage node and the disk identifier of the disk included in the storage node may be established in advance, so that when the management node parses the target URL, it may be determined based on the correspondence relationship.
- the node identifier corresponding to the disk identifier is included in the target URL, and the determined node identifier is the node identifier of the target storage node, thereby determining the target storage node corresponding to the target URL.
- the target media data stored in the target storage node has a correspondence with the target intelligent data; wherein the target smart data is extracted from the target media data;
- the performing, by the target storage node, the processing operation corresponding to the third http request message to the target media data may include:
- the target storage node performs a processing operation corresponding to the third http request message for the target media data and the target smart data.
- the image collection device may send the target media data and the target intelligent data to the cloud storage system, so that the target storage node in the cloud storage system may correspondingly store the target media data and the target intelligence.
- Data may intelligently analyze the data content of the target media data in the background to obtain the corresponding target media data.
- Target intelligence data may be generated.
- the target storage node obtains the target media data and the target smart data
- the target smart data and the target media data may be bound together, that is, the target smart data and the target media data have a corresponding relationship, so that the target is found. With the media data, the corresponding target intelligent data can be found.
- the two types of data are stored in the following way: the smart data is stored next to the target media data.
- the target media data uploaded by the image acquisition device is picture 1 and picture 2
- picture 1 corresponds to smart data 1
- picture 2 corresponds to intelligent data 2
- picture 1-2 and intelligent data 1-2 are on the disk of the target storage node
- the specific storage method can be as shown in FIG. 7.
- the target storage node may feed back the target smart data while feeding back the target media data, so that the access terminal may display the target media data, and use the target intelligent data for searching or identifying, etc. business.
- the target storage node may delete the target smart data while deleting the target media data.
- the target storage node can lock the target smart data while locking the target media data.
- the timing diagram shown in FIG. 8 is a flow of the media data storage method provided by the embodiment of the present application from the perspective of the interaction of the capture machine, the management node, the target storage node, and the platform server.
- the schematic diagram, wherein the media data is a picture captured by a capture machine.
- the management node feeds back the first http reply message to the capture machine, and can immediately disconnect the tcp connection, or can not immediately disconnect the tcp connection, and whether to immediately disconnect depends mainly on the first http request.
- the tcp connection can be disconnected immediately, or the tcp connection is not immediately disconnected, and whether the immediate disconnection is mainly depends on the second Whether the http request message is of a long connection type.
- the capture machine after receiving the target storage information, the capture machine directly forwards the target storage message to the platform server, and the platform server generates a target URL based on the target storage information, of course, the capture machine can also After the target URL is generated based on the target storage information, the target URL is directly sent to the platform server, where the target storage information may be a target URL or a storage location of the target media data.
- the embodiment of the present application further provides a media data storage system.
- the media data storage system includes: an image collection device 910 and a cloud storage system 920.
- the image collection device 910 is pre-stored with a first network address, where the first network address is an external access address of the cloud storage system 920;
- the image collection device 910 is configured to send a storage node allocation request to the cloud storage system to obtain a second network address fed back by the cloud storage system based on the first network address, and after obtaining the second network address, based on the The second network address is used to upload the target media data to be stored in the cloud storage system 920.
- the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system 920 collects the image. a storage node allocated by the device for storing media data of the image collection device 910;
- the cloud storage system 920 is configured to receive the storage node allocation request sent by the image collection device 910, and feed back the second network address to the image collection device 910; and store the target media data uploaded by the image collection device 910; The target media data is stored in the target storage node in the cloud storage system.
- the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the media data storage system may further include: a platform server corresponding to the image collection device;
- the cloud storage system 920 is further configured to feed back the target storage information to the image collection device 910 after storing the target media data uploaded by the image collection device 910;
- the image collection device 910 is further configured to receive the target storage information, and save the target URL corresponding to the target media data to a platform server corresponding to the image collection device 910;
- the target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
- the first network address is specifically an external access address of the management node in the cloud storage system
- the image collection device 910 sends a storage node allocation request to the cloud storage system based on the first network address, and obtains a second network address that is fed back by the cloud storage system, specifically:
- the image collection device 910 After the tcp connection is established with the management node based on the first network address, the image collection device 910 sends a first http request message for requesting the storage node to the management node, and further receives the first http feedback from the management node. Replying to the message and extracting the second network address from the first http reply message;
- the cloud storage system 920 receives the storage node allocation request sent by the image collection device 910, and feeds back the second network address to the image collection device 910, specifically:
- the management node After establishing a tcp connection with the image collection device 910, the management node receives a first http request message sent by the image collection device 910 for requesting allocation of a storage node, and determines a target storage node corresponding to the image collection device, and determines After the target storage node, the image acquisition device 910 feeds back a first http reply message carrying the second network address.
- the storage node in the cloud storage system 920 belongs to at least one virtual resource pool, and the image collection device further stores, in advance, target ID information of the target virtual resource pool, where the target virtual resource pool is used for storing the image collection.
- the first http request message carries the target ID information
- the management node determines a target storage node corresponding to the image collection device, specifically:
- the management node extracts the target ID information from the first http request message
- the target storage node corresponding to the image collection device 910 is selected from the storage node corresponding to the target virtual resource pool having the target ID information. Specifically, the image collection device 910 uploads the target media data to be stored to the cloud storage system 920 based on the second network address, specifically:
- the cloud storage system 920 stores the target media data uploaded by the image collection device, specifically:
- the target storage node After the tcp connection is established with the image collection device, the target storage node receives the second http request message sent by the image collection device.
- the cloud storage system 920 feeds back the target storage information to the image collection device, specifically:
- the target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries the target storage information;
- the image collection device 910 receives the target storage information, specifically:
- the image collection device 910 receives the second http reply message fed back by the target storage node
- the image collection device 910 uploads the target media data to be stored to the cloud storage system based on the second network address, specifically: the target media data and the target to be stored based on the second network address.
- the smart data is uploaded to the cloud storage system 920, wherein the target smart data is data extracted by the image collecting device from the target media data;
- the cloud storage system 920 stores the target media data uploaded by the image collection device 910, specifically:
- the target media data and the target smart data uploaded by the image collection device 910 are stored, wherein the target media data and the target smart data are stored in a target storage node in the cloud storage system.
- the image collection device 910 saves the target URL corresponding to the target media data to the platform server corresponding to the image collection device, specifically:
- the cloud storage system 920 is further configured to:
- the media data processing request is redirected to the target storage node to perform processing operations corresponding to the media data processing request by the target storage node.
- the first network address is specifically an external access address of the management node in the cloud storage system 920;
- the target URL includes the first network address;
- the cloud storage system 920 receives the media data processing request sent by the access terminal based on the target URL, specifically:
- the management node After establishing a tcp connection with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data; wherein the third http request message is formed based on the target URL; the management node and the management node
- the tcp connection between the access terminals is: the access end requests the establishment of the management node based on the first network address in the target URL;
- the cloud storage system 920 redirects the media data processing request to the target storage node, so that the target storage node performs a processing operation corresponding to the media data processing request, specifically:
- the management node parses the third http request message to obtain the target URL
- the accessing end establishes a tcp connection with the target storage node based on the second network address in the third http reply message, and then The target storage node sends the third http request message, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
- the target media data stored in the target storage node has a correspondence with the target smart data; wherein the target smart data is extracted by the target storage node from the target media data;
- the target storage node performs a processing operation corresponding to the third http request message on the target media data, specifically:
- the target storage node performs a processing operation corresponding to the third http request message for the target media data and the target smart data.
- the image collection device 910 is further configured to:
- the target multimedia data is retransmitted to the cloud storage system 920 according to a predetermined retransmission policy.
- the image collection device 910 retransmits the target multimedia data to the cloud storage system according to a predetermined retransmission policy, specifically:
- the image collection device retransmits the target multimedia data to the cloud storage system according to a predetermined retransmission policy, specifically:
- FIG. 10 is a schematic structural diagram of an application example of the media data storage system provided by the embodiment of the present application.
- the media data storage system provided by the embodiment of the present application includes a platform server, a capture machine, and a cloud storage system, where the cloud storage system includes a plurality of storage nodes and management nodes, and the storage nodes are divided into virtual Specifically, the basic process of storing pictures through the media data storage system shown in FIG. 10 is: (1) the capture machine captures the image and writes the image to the cloud storage system; (2) the cloud storage system returns the URL address of the image storage.
- the capture machine returns the URL address of the image storage to the platform server; (4) The platform server writes the URL address of the image stored by the capture machine to the database. It can be seen that the media data storage system in FIG. 10 adopts the direct storage mode when storing pictures, thereby avoiding the platform server being dumped to the cloud storage system, thereby reducing the consumption of network bandwidth resources and improving the efficiency of uploading media data.
- the embodiment of the present application further provides an image capturing device.
- the image capturing device may include: a housing 1110, a processor 1120, a memory 1130, and a circuit.
- a board 1140 and a power supply circuit 1150 wherein the circuit board 1140 is disposed inside a space surrounded by the housing 1110, the processor 1120 and the memory 1130 are disposed on the circuit board 1140;
- the power supply circuit 1150 is configured to supply power to each circuit or device;
- 1130 is configured to store executable program code;
- the processor 1120 executes the media data storage method by executing the executable program code stored in the memory 1130; wherein the executing the media data storage method may include:
- the target storage node is: a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;
- the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system.
- the target storage node After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system.
- the target storage node After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system.
- the image collection device is a device having a camera function.
- the image capture device may be a capture camera or a network camera, which is of course not limited thereto.
- the media data collected by the image collection device includes, but is not limited to, a picture.
- the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the method further includes:
- Target storage information is information determined based on a storage location corresponding to the target media data
- the target URL is information determined based on the target storage information.
- the first network address is specifically an external access address of a management node in the cloud storage system
- the step of requesting, by the cloud storage system, the second network address, based on the first network address includes:
- the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, where the target virtual resource pool is used for storage.
- a virtual resource pool of media data of the image capture device
- the first http request message carries the target ID information
- the step of determining, by the management node, the target storage node corresponding to the image collection device comprises:
- the management node extracts the target ID information from the first http request message
- the step of uploading the target media data to be stored to the cloud storage system based on the second network address includes:
- the step of receiving the target storage information that is fed back by the cloud storage system includes:
- the step of uploading the target media data to be stored to the cloud storage system based on the second network address includes:
- Target media data and target smart data to be stored to the cloud storage system based on the second network address, wherein the target media data and the target smart data are stored in a target in the cloud storage system a storage node, the target intelligent data being data extracted by the image collection device from the target media data.
- the step of saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device includes:
- the media data storage method further includes:
- the target multimedia data is retransmitted to the cloud storage system according to a predetermined retransmission policy.
- the step of retransmitting the target multimedia data to the cloud storage system according to a predetermined retransmission policy includes:
- the step of retransmitting the target multimedia data to the cloud storage system according to a predetermined retransmission policy includes:
- the target storage information is the target URL; or the target storage information is the storage location.
- the embodiment of the present application further provides a cloud storage system.
- the cloud storage system includes: a management node 1210 and a storage node 1220;
- the management node is configured to receive a storage node allocation request sent by the image collection device, and feed back a second network address to the image collection device, so that: after obtaining the second network address, the image collection device is based on the Transmitting the target media data to be stored to the cloud storage system, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself,
- the first network address is an external access address of the management node
- the second network address is a network address of the target storage node
- the target storage node is: the cloud storage system is allocated by the image collection device, a storage node for storing media data of the image capture device;
- the target storage node is configured to store the target media data uploaded by the image collection device.
- the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
- the target storage node is further configured to: after storing the target media data uploaded by the image collection device, feed back the target storage information to the image collection device, so that: the image collection device receives the location After the target storage information is stored, the target URL corresponding to the target media data is saved to a platform server corresponding to the image collection device;
- the target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
- the management node receives the storage node allocation request sent by the image collection device, specifically:
- the management node After the Tcp connection is established with the image collection device, the management node receives a first http request message sent by the image collection device for requesting allocation of a storage node, where the management node and the image collection device
- the tcp connection is: the image collection device requests the establishment of the management node based on the first network address;
- the management node feeds back the second network address to the image collection device, specifically:
- the first http reply message carrying the second network address is fed back to the image collection device.
- the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, where the target virtual resource pool is used for storage.
- a virtual resource pool of media data of the image capture device
- the first http request message carries the target ID information
- the management node determines a target storage node corresponding to the image collection device, specifically:
- the management node extracts the target ID information from the first http request message
- the target storage node stores the target media data uploaded by the image collection device, specifically:
- the tcp connection between the target storage node and the image collection device is: the image collection device requests to establish the target storage node based on the second network address;
- the target storage node feeds back the target storage information to the image collection device, specifically:
- the target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries target storage information.
- the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address, including:
- the image collection device uploads the target media data and the target smart data to be stored to the cloud storage system based on the second network address; wherein the target smart data is the image collection device from the target media Data extracted from the data;
- the target storage node stores the target media data uploaded by the image collection device, specifically:
- the target storage node stores the target media data and the target smart data uploaded by the image collection device, wherein the target media data and the target smart data are stored in the target in the cloud storage system Storage node.
- the management node is further configured to: receive a media data processing request sent by the access terminal based on the target URL; where the access end is the platform server or a browser, where the browser is based The target URL is obtained from the platform server;
- the target URL includes the first network address
- the management node receives a media data processing request sent by the access terminal based on the target URL, specifically:
- the management node After the Tcp connection is established with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data, where the third http request message is formed based on the target URL.
- the tcp connection between the management node and the access terminal is: the access end requests the establishment of the management node based on the first network address in the target URL;
- the management node redirects the media data processing request to the target storage node, so that the target storage node performs a processing operation corresponding to the media data processing request, specifically:
- the management node parses the third http request message to obtain the target URL
- a third http reply message carrying the second network address, so that: the access end establishes with the target storage node based on a second network address in the third http reply message
- the third http request message is sent to the target storage node, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
- the target media data stored in the target storage node has a correspondence with the target smart data; wherein the target smart data is data extracted from the target media data;
- the target storage node performs a processing operation corresponding to the third http request message on the target media data, specifically:
- the target storage node performs a processing operation corresponding to the third http request message to the target media data and the target smart data.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Provided in the embodiments of the present application are a cloud storage system, a media data storage method and system. A media data storage method is applied to an image acquisition device. Said method comprises: requesting a cloud storage system for a second network address on the basis of a pre-stored first network address; the second network address being the network address of a target storage node, the target storage node being a storage node allocated by the cloud storage system to the image acquisition device for storing media data of the image acquisition device; after obtaining the second network address, uploading, on the basis of the second network address, target media data to be stored onto the cloud storage system; the target media data being stored in the target storage node of the cloud storage system. Hence, in this solution, the media data of the image acquisition device is stored directly, rather than transferred by a platform server to a backend storage node, thereby reducing the consumption of network bandwidth resources and improving the efficiency of uploading media data.
Description
本申请要求于2017年3月16日提交中国专利局、申请号为201710157916.1发明名称为“云存储系统、媒体数据存储方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application entitled "Cloud Storage System, Media Data Storage Method and System" by the Chinese Patent Office, filed on March 16, 2017, the entire disclosure of which is incorporated herein by reference. In the application.
本申请涉及视频监控技术领域,特别是涉及云存储系统、媒体数据存储方法及系统。The present application relates to the field of video surveillance technologies, and in particular, to a cloud storage system, a media data storage method, and a system.
随着时代和科技的发展,视频监控系统作用凸显。而图像采集设备作为视频监控系统的重要组成部分,已经遍布大街小巷。对于视频监控领域而言,图像采集设备本身质量的好坏起到相当重要的作用;同样的,对于图像采集设备所采集的媒体数据的存储也是视频监控中至关重要的环节,其中,图像采集设备所采集的媒体数据包括但不局限于图片。With the development of the times and technology, the role of video surveillance systems has become prominent. Image acquisition equipment, as an important part of the video surveillance system, has spread all over the streets. For the video surveillance field, the quality of the image acquisition device itself plays a very important role; similarly, the storage of the media data collected by the image acquisition device is also a crucial link in video surveillance, in which image acquisition The media data collected by the device includes but is not limited to pictures.
相关技术中,具体的媒体数据存储过程为:图像采集设备向负责管理图像采集设备的平台服务器注册完成后,该平台服务器主动收集图像采集设备所采集的媒体数据,然后,该平台服务器向云存储系统请求存储资源,并在请求得到存储资源后,将从图像采集设备处所收集的媒体数据写入云存储系统中,进而完成媒体数据的存储。In the related art, the specific media data storage process is: after the image collection device registers with the platform server responsible for managing the image collection device, the platform server actively collects the media data collected by the image collection device, and then the platform server stores the data to the cloud. The system requests the storage resource, and after requesting the storage resource, writes the media data collected from the image collection device to the cloud storage system, thereby completing the storage of the media data.
但是,由于媒体数据存储过程需要平台服务器进行中转,因此,媒体数据存储过程两个阶段(即平台服务器从图像采集设备中收集媒体数据,以及平台服务器将所收集的媒体数据写入云存储系统)均需要占用网络带宽资源,这样导致网络带宽资源消耗较多;同时,对于图像采集设备中海量的媒体数据而言,无疑上传效率不高。However, since the media data storage process requires the platform server to perform the transfer, the media data storage process is in two stages (ie, the platform server collects the media data from the image collection device, and the platform server writes the collected media data to the cloud storage system). All of them need to occupy network bandwidth resources, which leads to more consumption of network bandwidth resources. At the same time, for massive media data in image acquisition devices, the uploading efficiency is undoubtedly low.
发明内容Summary of the invention
本申请实施例的目的在于提供云存储系统、媒体数据存储方法及系统,以降低网络带宽资源的消耗以及提高媒体数据上传效率。具体技术方案如下:The purpose of the embodiments of the present application is to provide a cloud storage system, a media data storage method, and a system, to reduce network bandwidth resource consumption and improve media data upload efficiency. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种媒体数据存储方法,应用于图像采集设备,所述图像采集设备中预先存储有第一网络地址,所述第一网络地址为云存储系统的对外访问地址;所述方法包括:In a first aspect, the embodiment of the present application provides a media data storage method, which is applied to an image collection device, where the first network address is pre-stored in the image collection device, and the first network address is an external access of the cloud storage system. Address; the method includes:
基于所述第一网络地址,向所述云存储系统请求得到第二网络地址;其 中,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备分配的、用于存储所述图像采集设备的媒体数据的存储节点;And requesting, by the cloud storage system, a second network address, where the second network address is a network address of the target storage node, where the target storage node is: the cloud storage system is a storage node allocated by the image collection device for storing media data of the image collection device;
在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system. The target storage node.
第二方面,本申请实施例提供了一种媒体数据存储方法,应用于云存储系统;所述方法包括:In a second aspect, the embodiment of the present application provides a media data storage method, which is applied to a cloud storage system, where the method includes:
接收图像采集设备发送的存储节点分配请求,其中,所述存储节点分配请求为所述图像采集设备基于存储于自身的第一网络地址所发送的,所述第一网络地址为云存储系统的对外访问地址;Receiving a storage node allocation request sent by the image collection device, where the storage node allocation request is sent by the image collection device based on a first network address stored in the first network address, and the first network address is external to the cloud storage system. address;
向所述图像采集设备反馈第二网络地址,以使得:所述图像采集设备在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;Retrieving the second network address to the image collection device, so that: after obtaining the second network address, the image collection device uploads target media data to be stored to the cloud based on the second network address a storage system, wherein the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system is allocated by the image collection device for storing the image collection device. a storage node for media data;
并且,存储所述图像采集设备上传的所述目标媒体数据;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。And storing the target media data uploaded by the image collection device; wherein the target media data is stored in the target storage node in the cloud storage system.
第三方面,本申请实施例提供了一种媒体数据存储系统,包括:图像采集设备和云存储系统,所述图像采集设备中预先存储有第一网络地址,所述第一网络地址为云存储系统的对外访问地址;In a third aspect, the embodiment of the present application provides a media data storage system, including: an image collection device and a cloud storage system, where the image collection device pre-stores a first network address, where the first network address is cloud storage. The external access address of the system;
所述图像采集设备用于基于所述第一网络地址,向所述云存储系统发送存储节点分配请求,获得所述云存储系统反馈的第二网络地址;并且,在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;The image collection device is configured to send, according to the first network address, a storage node allocation request to the cloud storage system, obtain a second network address fed back by the cloud storage system, and obtain the second network address. And uploading the target media data to be stored to the cloud storage system, where the second network address is a network address of the target storage node, and the target storage node is: a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;
所述云存储系统用于接收所述图像采集设备发送的存储节点分配请求,向所述图像采集设备反馈所述第二网络地址;并且,存储所述图像采集设备上传的所述目标媒体数据;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。The cloud storage system is configured to receive a storage node allocation request sent by the image collection device, and feed back the second network address to the image collection device; and store the target media data uploaded by the image collection device; The target media data is stored in the target storage node in the cloud storage system.
第四方面,本申请实施例还提供了一种图像采集设备,包括:壳体、处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为各个电路或器件供电;存储器用于存储可执行程序代码;处理器通过运行存储器中存储的可执行程序代码,以执行本申请实施例第一方面所提供的媒体数据存储方法。In a fourth aspect, an embodiment of the present application further provides an image collection device, including: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, the processor and the The memory is disposed on the circuit board; the power supply circuit is configured to supply power to each circuit or device; the memory is used to store executable program code; and the processor executes the first aspect of the embodiment of the present application by running executable program code stored in the memory The media data storage method provided.
第五方面,本申请实施例还提供了一种云存储系统,包括:管理节点和存储节点;其中,In a fifth aspect, the embodiment of the present application further provides a cloud storage system, including: a management node and a storage node;
所述管理节点,用于接收图像采集设备发送的存储节点分配请求,向所述图像采集设备反馈第二网络地址,以使得:所述图像采集设备在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述存储节点分配请求为所述图像采集设备基于存储于自身的第一网络地址所发送的,所述第一网络地址为所述管理节点的对外访问地址,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;The management node is configured to receive a storage node allocation request sent by the image collection device, and feed back a second network address to the image collection device, so that: after obtaining the second network address, the image collection device is based on the Transmitting the target media data to be stored to the cloud storage system, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself, The first network address is an external access address of the management node, the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system is allocated by the image collection device, a storage node for storing media data of the image capture device;
所述目标存储节点,用于存储所述图像采集设备上传的所述目标媒体数据。The target storage node is configured to store the target media data uploaded by the image collection device.
第六方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例第一方面所提供的媒体数据存储方法步骤。In a sixth aspect, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the first aspect of the embodiment of the present application is implemented. The provided media data storage method steps.
第七方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例第二方面所提供的媒体数据存储方法步骤。In a seventh aspect, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the second aspect of the embodiment of the present application is implemented. The provided media data storage method steps.
本申请实施例所提供方案中,图像采集设备主动向云存储系统请求得到目标存储节点的第二网络地址,并在获得该第二网络地址后,基于该第二网络地址,存储媒体数据至该目标存储节点。可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。In the solution provided by the embodiment of the present application, the image collection device actively requests the cloud storage system to obtain the second network address of the target storage node, and after obtaining the second network address, stores the media data based on the second network address. Target storage node. It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
当然,实施本申请的任一产品或方法必不一定需要同时达到以上所述的所有优点。Of course, implementing any of the products or methods of the present application necessarily does not necessarily require all of the advantages described above to be achieved at the same time.
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings to be used in the embodiments or the related art description will be briefly described below. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为本申请实施例第一方面所提供的一种媒体数据存储方法的流程图;1 is a flowchart of a method for storing media data according to a first aspect of the present application;
图2为本申请实施例第一方面所提供的一种媒体数据存储方法的另一流程图;2 is another flowchart of a method for storing media data according to a first aspect of the present application;
图3为本申请实施例第一方面所提供的一种媒体数据存储方法的又一流程图;FIG. 3 is still another flowchart of a method for storing media data according to a first aspect of the present application;
图4为本申请实施例第二方面所提供的一种媒体数据存储方法的流程图;4 is a flowchart of a method for storing media data according to a second aspect of the embodiments of the present application;
图5为本申请实施例第二方面所提供的一种媒体数据存储方法的另一流程图;FIG. 5 is another flowchart of a method for storing media data according to a second aspect of the present application;
图6为本申请实施例第二方面所提供的一种媒体数据存储方法的又一流程图;FIG. 6 is still another flowchart of a method for storing media data according to a second aspect of the present application;
图7为本申请实施例中媒体数据与智能数据的存储方式示意图;FIG. 7 is a schematic diagram of storage manners of media data and intelligent data in an embodiment of the present application;
图8为本申请实施例所提供的媒体数据存储方法的时序图;FIG. 8 is a sequence diagram of a media data storage method according to an embodiment of the present application;
图9为本申请实施例所提供的一种媒体数据存储系统的结构示意图;FIG. 9 is a schematic structural diagram of a media data storage system according to an embodiment of the present application;
图10为本申请实施例所提供的一种媒体数据存储系统的应用实例的结构示意图;FIG. 10 is a schematic structural diagram of an application example of a media data storage system according to an embodiment of the present disclosure;
图11为本申请实施例所提供的一种图像采集设备的结构示意图;FIG. 11 is a schematic structural diagram of an image collection device according to an embodiment of the present application;
图12为本申请实施例所提供的一种云存储系统的结构示意图。FIG. 12 is a schematic structural diagram of a cloud storage system according to an embodiment of the present disclosure.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
第一方面,为了解决相关技术问题,从图像采集设备的角度,本申请实 施例提供了一种媒体数据存储方法。In a first aspect, in order to solve the related technical problem, the embodiment of the present application provides a media data storage method from the perspective of an image capture device.
其中,所谓图像采集设备具体指具有图像采集功能的设备。其中,在具体应用中,可选地,该图像采集设备可以为抓拍机,也可以为网络摄像机,当然并不限于此。可以理解的是,抓拍机具体指可以在瞬间启动,完成摄影参数设定并进行高速拍摄的摄影器材,其镜头多为定焦镜头或变焦范围较小的中焦段镜头。并且,图像采集设备所采集的媒体数据可以包括但不局限于图片。The image capturing device refers specifically to a device having an image capturing function. In the specific application, the image capturing device may be a capture camera or a network camera, of course, but is not limited thereto. It can be understood that the capture machine specifically refers to a photographic equipment that can be started in an instant, completes the photography parameter setting and performs high-speed shooting, and the lens is mostly a fixed focus lens or a medium focal length lens with a small zoom range. Moreover, the media data collected by the image collection device may include, but is not limited to, a picture.
需要强调的是,为了解决相关技术问题,本申请实施例中,通过云存储系统来存储图像采集设备所采集的媒体数据,并且,在存储过程中,图像采集设备将媒体数据直存至云存储系统中,即在媒体数据存储过程中不通过任何中转设备来中转媒体数据。基于该种处理思想,为了实现图像采集设备与云存储系统的通信,该图像采集设备中预先存储有第一网络地址,该第一网络地址为云存储系统的对外访问地址。可以理解的是,云存储系统可以包括至少一个管理节点和至少一个存储节点,其中,管理节点用于对存储节点进行管理,而存储节点用于存储数据,其中,存储节点的具体物理形态可以为服务器形态。It is to be noted that, in order to solve the related technical problem, in the embodiment of the present application, the media data collected by the image collection device is stored by the cloud storage system, and in the storage process, the image collection device directly saves the media data to the cloud storage. In the system, media data is not transferred through any relay device during the media data storage process. Based on the processing idea, in order to implement communication between the image collection device and the cloud storage system, the image collection device pre-stores a first network address, where the first network address is an external access address of the cloud storage system. It can be understood that the cloud storage system can include at least one management node and at least one storage node, wherein the management node is used to manage the storage node, and the storage node is used to store data, wherein the specific physical form of the storage node can be Server form.
具体的,该第一网络地址可以为IP地址和端口。而由于云存储系统可以具有若干节点,为了对外提供服务,可选地,该第一网络地址可以为虚拟网络地址,也可以为云存储系统中提供对外访问的节点的实际的网络地址。在具体应用中,可以通过图像采集设备的WEB配置将第一网络地址保存在图像采集设备的配置文件中;当然,也可以直接后台登录到该图像采集设备,手动修改图像采集设备的配置文件以记录该第一网络地址。Specifically, the first network address may be an IP address and a port. The cloud storage system may have a plurality of nodes. In order to provide services to the external network, the first network address may be a virtual network address or an actual network address of a node that provides external access in the cloud storage system. In a specific application, the first network address may be saved in the configuration file of the image collection device through the WEB configuration of the image capture device; of course, the image capture device may be directly logged in to the image capture device, and the configuration file of the image capture device may be manually modified. Record the first network address.
需要强调的是,在具体应用中,云存储系统内部通常由多个节点通过集群的方式对外提供服务,此时,第一网络地址为虚拟网络地址,并且,虚拟网络地址可以通过集群技术来提供。举例而言:由3台服务器A、B、C组建的集群;假设服务器A的实际IP是192.168.1.10,服务器B的实际IP是192.168.1.11,服务器C的实际IP是10.192.1.12,那么,通过集群技术,提供一个虚拟IP和端口对外提供服务,如虚拟IP是10.192.1.100,端口是6021;这样,图像采集设备只需要将该虚拟IP和端口通过图像采集设备的WEB配置,配置到图像采集设备中保存即可,而图像采集设备在需要使用该虚拟IP和端口时就从配置文件读取;当然,也可以不通过图像采集设备WEB设置来配置虚拟IP和端口,而是可以直接后台登录到图像采集设备,手动修改图像采集设备的配置文件以 记录该虚拟IP和端口。It should be emphasized that, in a specific application, a cloud storage system usually provides services to a plurality of nodes through a cluster. In this case, the first network address is a virtual network address, and the virtual network address can be provided by using a cluster technology. . For example: a cluster consisting of three servers A, B, and C; assuming that the actual IP of server A is 192.168.1.10, the actual IP of server B is 192.168.1.11, and the actual IP of server C is 10.192.1.12, then Through the clustering technology, a virtual IP and port are provided to provide external services. For example, the virtual IP is 10.192.1.100 and the port is 6021. In this way, the image collecting device only needs to configure the virtual IP and port through the WEB of the image capturing device to configure the image. The capture device can be saved, and the image capture device reads from the configuration file when the virtual IP and port are needed; of course, the virtual IP and port can be configured without the image capture device WEB setting, but can be directly backstage. Log in to the image capture device and manually modify the profile of the image capture device to record the virtual IP and port.
如图1所示,本申请实施例所提供的一种媒体数据存储方法,应用于图像采集设备,该方法可以包括如下步骤:As shown in FIG. 1 , a media data storage method provided by an embodiment of the present application is applied to an image collection device, and the method may include the following steps:
S101,基于第一网络地址,向云存储系统请求得到第二网络地址;其中,该第二网络地址为目标存储节点的网络地址,该目标存储节点为该云存储系统为该图像采集设备分配的、用于存储该图像采集设备的媒体数据的存储节点;S101. The second network address is requested by the cloud storage system according to the first network address, where the second network address is a network address of the target storage node, where the target storage node is allocated by the cloud storage system to the image collection device. a storage node for storing media data of the image collection device;
本实施例中,该图像采集设备可以实时或定时地将自身的媒体数据存储至云存储系统中,而由于图像采集设备中仅仅存储有云存储系统的对外访问地址,因此,无论实时还是定时,均需要首先请求云存储系统为该图像采集设备分配目标存储节点。In this embodiment, the image collection device can store its own media data in the cloud storage system in real time or periodically, and since the image acquisition device only stores the external access address of the cloud storage system, regardless of real-time or timing, Both need to first request the cloud storage system to allocate a target storage node for the image collection device.
为了请求云存储系统为该图像采集设备分配目标存储节点,该图像采集设备可以基于该第一网络地址与该云存储系统建立通信连接后,向该云存储系统发送存储节点分配请求;进而,该云存储系统可以从该云存储系统所包括的存储节点中选取出目标存储节点,并向该图像采集设备反馈该目标存储节点的实际的网络地址,即第二网络地址,其中,第二网络地址包括IP地址和端口。并且,该云存储系统在选取目标存储节点时,可以采用负载均衡策略进行选取,当然并不局限于此。In order to request the cloud storage system to allocate a target storage node to the image collection device, the image collection device may send a storage node allocation request to the cloud storage system after establishing a communication connection with the cloud storage system based on the first network address; The cloud storage system may select a target storage node from the storage node included in the cloud storage system, and feed back to the image collection device the actual network address of the target storage node, that is, the second network address, where the second network address Includes IP address and port. Moreover, the cloud storage system may select a target storage node by using a load balancing policy, which is of course not limited thereto.
需要说明的是,由于请求到的目标存储节点通常的存储容量较大,因此,目标存储节点一旦确定,该图像采集设备可以向该目标存储节点多次上传媒体数据。而基于该种多次向同一节点上传数据的思想,可以根据具体应用,来设定向云存储系统请求得到第二网络地址的触发时机,例如:图像采集设备每次启动,或者,达到预定时间点,等等。It should be noted that, since the target storage node of the requested storage capacity is generally large, the image storage device may upload the media data to the target storage node multiple times once the target storage node determines. Based on the idea of uploading data to the same node multiple times, the triggering time for requesting the second network address from the cloud storage system may be set according to the specific application, for example, the image capturing device starts up each time, or reaches a predetermined time. Point, and so on.
S102,在获得第二网络地址后,基于该第二网络地址,将待存储的目标媒体数据上传至该云存储系统;其中,该目标媒体数据存储于该云存储系统中的该目标存储节点。S102. After obtaining the second network address, upload the target media data to be stored to the cloud storage system based on the second network address, where the target media data is stored in the target storage node in the cloud storage system.
其中,在获得第二网络地址后,该图像采集设备可以基于该第二网络地址,实时或定时地将待存储的目标媒体数据上传至该云存储系统,并且,该目标媒体数据存储于该云存储系统中的该目标存储节点。其中,所谓实时存储,可以指该图像采集设备在采集到媒体数据后,立即执行存储;而所谓定时存储,可以指该图像采集设备在采集到媒体数据后,并非立即执行存储, 而是达到预定时间点时,将当前未存储的所有媒体数据进行存储。需要说明的是,本申请实施例中所述的目标媒体数据为图像采集设备所采集的且待存储的媒体数据。After the second network address is obtained, the image collection device may upload the target media data to be stored to the cloud storage system in real time or periodically based on the second network address, and the target media data is stored in the cloud. The target storage node in the storage system. The so-called real-time storage may refer to that the image collection device performs storage immediately after collecting the media data; and the so-called timing storage may refer to that the image collection device does not immediately perform storage after collecting the media data, but achieves the reservation. At the time of the point, all media data that is not currently stored is stored. It should be noted that the target media data described in the embodiment of the present application is media data collected by the image collection device and to be stored.
其中,该目标存储节点存储图像采集设备上传的媒体数据的具体存储形式,本申请实施例不做限定。The target storage node stores a specific storage format of the media data uploaded by the image collection device, which is not limited in the embodiment of the present application.
本申请实施例所提供方案中,图像采集设备主动向云存储系统请求得到目标存储节点的第二网络地址,并在获得该第二网络地址后,基于该第二网络地址,存储媒体数据至该目标存储节点。可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。In the solution provided by the embodiment of the present application, the image collection device actively requests the cloud storage system to obtain the second network address of the target storage node, and after obtaining the second network address, stores the media data based on the second network address. Target storage node. It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
可选地,在基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统之后,如图2所示,本申请实施例在第一方面所提供的一种媒体数据存储方法,还可以包括步骤:Optionally, after the target media data to be stored is uploaded to the cloud storage system based on the second network address, as shown in FIG. 2, the media data provided by the embodiment of the present application is provided in the first aspect. The storage method may further include the steps of:
S103,接收该云存储系统反馈的目标存储信息;其中,该目标存储信息为基于该目标媒体数据对应的存储位置所确定的信息;S103. Receive target storage information that is fed back by the cloud storage system, where the target storage information is information determined based on a storage location corresponding to the target media data.
S104,将该目标媒体数据对应的目标URL(Uniform Resource Locator,统一资源定位符)保存至该图像采集设备对应的平台服务器;其中,该目标URL为基于该目标存储信息所确定的信息。S104: Save a target URL (Uniform Resource Locator) corresponding to the target media data to a platform server corresponding to the image collection device, where the target URL is information determined based on the target storage information.
其中,云存储系统存储目标媒体数据后,为了用户通过平台服务器或浏览器后续访问该目标媒体数据,该云存储系统可以基于该目标媒体数据对应的存储位置来确定目标存储信息,进而将该目标存储信息反馈至该图像采集设备,以使得该图像采集设备将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器,这样,后续平台服务器或浏览器可以通过该目标URL访问该目标媒体数据,其中,访问方式可以包括:下载、删除或锁定等方式。After the cloud storage system stores the target media data, in order for the user to access the target media data through the platform server or the browser, the cloud storage system may determine the target storage information based on the storage location corresponding to the target media data, and then target the target. The storage information is fed back to the image collection device, so that the image collection device saves the target URL corresponding to the target media data to the platform server corresponding to the image collection device, so that the subsequent platform server or browser can access the target URL. Target media data, wherein the access manner may include: downloading, deleting, or locking.
在一种实现方式中,该目标媒体数据对应的存储位置可以为该目标媒体数据所在磁盘的磁盘标识和磁盘偏移,以及该目标媒体数据的标识等;而该目标存储信息可以为该目标URL,或者,该目标媒体数据对应的存储位置。其中,当该目标存储信息为该目标媒体数据对应的存储位置时,该图像采集设备可以直接将该存储位置发送至该平台服务器,进而由该平台服务器基于该存储位置生成该目标媒体数据对应的目标URL并保存;当然,该图像采集 设备也可以基于该存储位置生成该目标媒体数据对应的目标URL,进而该图像采集设备将该目标URL发送至该平台服务器,以使得该平台服务器直接存储该目标URL。另外,当该目标存储信息为该目标URL,也就是,云存储系统自行基于该目标媒体数据对应的存储位置生成该目标媒体数据对应的目标URL,这样,图像采集设备在收到该目标URL后,可以将该目标URL转发至该平台服务器,进而由该平台服务器存储该目标URL。In an implementation manner, the storage location corresponding to the target media data may be a disk identifier and a disk offset of the disk where the target media data is located, and an identifier of the target media data, and the target storage information may be the target URL. Or, the storage location corresponding to the target media data. When the target storage information is a storage location corresponding to the target media data, the image collection device may directly send the storage location to the platform server, and then generate, by the platform server, the target media data according to the storage location. The target URL is saved and stored; of course, the image collection device may also generate a target URL corresponding to the target media data based on the storage location, and the image collection device sends the target URL to the platform server, so that the platform server directly stores the target URL. Target URL. In addition, when the target storage information is the target URL, that is, the cloud storage system generates a target URL corresponding to the target media data based on the storage location corresponding to the target media data, so that the image collection device receives the target URL. The target URL can be forwarded to the platform server, and the target URL is stored by the platform server.
需要说明的是,将目标媒体数据对应的存储位置组装成目标URL的具体实现方式,在此不做限定,而为了有效访问,该目标URL中还可以包括该第一网络地址。并且,通过该平台服务器所存储的该目标URL,作为访问端的浏览器或该平台服务器可以访问该目标媒体数据,关于具体的访问过程,后续在云存储系统角度所提供的一种媒体数据存储方法的实施例中进行介绍。It should be noted that the specific implementation manner of assembling the storage location corresponding to the target media data into the target URL is not limited herein, and the target URL may further include the first network address for effective access. And, the target URL stored by the platform server, the browser as the access end or the platform server can access the target media data, and the media data storage method provided by the cloud storage system from the perspective of the specific access process The description is made in the embodiment.
可选地,该图像采集设备可以具有智能分析功能,这样,该图像采集设备可以对媒体数据进行智能分析,然后将智能分析后所得到的智能数据连同所对应的媒体数据存储至云存储系统中,以使得云存储系统对应存储媒体数据和媒体数据对应的智能数据,从而提高云存储系统所存储数据的丰富性以及后续访问端可访问数据的丰富性。基于该种处理思想,在一种具体实现方式中,所述基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统的步骤,可以包括:Optionally, the image collection device may have an intelligent analysis function, so that the image collection device can perform intelligent analysis on the media data, and then store the intelligent data obtained by the intelligent analysis together with the corresponding media data into the cloud storage system. The cloud storage system corresponds to the intelligent data corresponding to the storage media data and the media data, thereby improving the richness of the data stored in the cloud storage system and the richness of the data accessible by the subsequent access terminals. Based on the processing idea, in a specific implementation manner, the step of uploading the target media data to be stored to the cloud storage system based on the second network address may include:
基于该第二网络地址,将待存储的目标媒体数据和目标智能数据上传至该云存储系统,其中,该目标媒体数据和该目标智能数据存储于该云存储系统中的目标存储节点,该目标智能数据为该图像采集设备从该目标媒体数据中所提取到的数据。And uploading the target media data and the target smart data to be stored to the cloud storage system, where the target media data and the target smart data are stored in a target storage node in the cloud storage system, the target The intelligent data is data extracted by the image acquisition device from the target media data.
其中,智能数据的数据类型可以包括但不局限于:车牌号、车辆颜色、人脸建模模型数据、图片抓拍时间信息、图片车道地理位置信息,等等。具体的,当目标媒体数据为包含人脸信息的图片时,该目标媒体数据对应的目标智能数据可以为人脸建模模型数据和图片抓拍时间信息中的至少一种,其中,人脸建模数据的具体内容包括但不局限于:人脸信息。具体的,当目标媒体数据为包含车辆信息的图片时,该目标媒体数据对应的目标智能数据可以为车牌号、车辆颜色、图片抓拍时间信息和图片车道地理位置信息中的至少一种。The data type of the intelligent data may include, but is not limited to, a license plate number, a vehicle color, a face modeling model data, a picture capture time information, a picture lane location information, and the like. Specifically, when the target media data is a picture including face information, the target intelligent data corresponding to the target media data may be at least one of face modeling model data and picture capture time information, wherein the face modeling data Specific content includes but is not limited to: face information. Specifically, when the target media data is a picture including vehicle information, the target intelligent data corresponding to the target media data may be at least one of a license plate number, a vehicle color, a picture capture time information, and a picture lane geographical position information.
需要强调的是,上述所给出的目标智能数据的数据类型仅仅作为示例,并不应该构成对本申请实施例的限定。并且,本申请实施例并不对智能数据的提取方式进行限定。It should be emphasized that the data types of the target intelligent data given above are only examples, and should not be construed as limiting the embodiments of the present application. Moreover, the embodiment of the present application does not limit the manner of extracting intelligent data.
可选地,在该图像采集设备具有智能分析功能时,该图像采集设备可以对媒体数据进行智能分析,并将智能分析后所得到的智能数据连同所对应媒体数据的URL保存至该图像采集设备对应的平台服务器,以使得平台服务器对应存储媒体数据和媒体数据对应的智能数据,从而平台服务器所存储数据的丰富性以及后续可利用数据的丰富性。基于该种处理思想,在另一种具体实现方式中,所述将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器的步骤,可以包括:Optionally, when the image collection device has an intelligent analysis function, the image collection device may perform intelligent analysis on the media data, and save the smart data obtained by the intelligent analysis together with the URL of the corresponding media data to the image collection device. Corresponding platform server, so that the platform server corresponds to the intelligent data corresponding to the storage media data and the media data, so that the richness of the data stored by the platform server and the richness of the subsequently available data. Based on the processing idea, in another specific implementation manner, the step of saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device may include:
将该目标媒体数据对应的目标URL以及目标智能数据保存至该图像采集设备对应的平台服务器,其中,该目标智能数据为该图像采集设备从该目标媒体数据中所提取的。The target URL corresponding to the target media data and the target smart data are saved to the platform server corresponding to the image collection device, wherein the target smart data is extracted by the image collection device from the target media data.
可选地,本申请实施例在第一方面所提供的一种媒体数据存储方法,还可以包括步骤:Optionally, the method for storing media data provided by the first aspect of the present disclosure may further include the following steps:
当该目标媒体数据上传失败时,按照预定重传策略,将该目标多媒体数据重传至该云存储系统。When the target media data upload fails, the target multimedia data is retransmitted to the cloud storage system according to a predetermined retransmission policy.
其中,所谓的目标媒体数据上传失败可以指:接收到该云存储系统反馈的上传失败消息,或者,在预定时长内未接收到该云存储系统反馈的目标存储信息。The so-called target media data uploading failure may be: receiving an upload failure message fed back by the cloud storage system, or not receiving the target storage information fed back by the cloud storage system within a predetermined time period.
可以理解的是,相关技术中,由于图像采集设备处于被动上传,当目标媒体数据上传失败时,只能等待下次上传时机,可能会导致媒体数据积压,尤其当后端存储节点发生故障而导致上传失败时,无法快速切换到其他后端存储节点,只能等到下次采集时机才能执行切换,无疑将导致图像采集设备积压过多的媒体数据。而本申请实施例,由于图像采集设备主动上传,因此,当目标媒体数据上传失败时,可以按照预定重传策略进行再次上传,以避免目标媒体数据被积压。It can be understood that, in the related art, since the image collecting device is in passive uploading, when the target media data fails to upload, it can only wait for the next uploading opportunity, which may cause a backlog of media data, especially when the backend storage node fails. When the upload fails, you cannot quickly switch to other back-end storage nodes. You can only wait until the next acquisition time to perform the switchover, which will undoubtedly cause the image collection device to accumulate too much media data. In the embodiment of the present application, since the image collection device actively uploads, when the target media data fails to upload, the uploading may be performed according to the predetermined retransmission policy to prevent the target media data from being backlogged.
具体的,在第一种具体实现方式中,所述按照预定重传策略,将该目标多媒体数据重传至该云存储系统的步骤,可以包括:Specifically, in the first specific implementation, the step of retransmitting the target multimedia data to the cloud storage system according to the predetermined retransmission policy may include:
返回执行该基于该第二网络地址,将该目标多媒体数据上传至该云存储系统的步骤。Returning to the step of uploading the target multimedia data to the cloud storage system based on the second network address.
其中,在该第一种具体实现方式中,当该目标媒体数据上传失败时,可以重新执行基于该第二网络地址,将该目标多媒体数据上传至该云存储系统,以解决由于网络原因所导致的上传失败的问题。在第二种具体实现方式中,所述按照预定重传策略,将该目标多媒体数据重传至该云存储系统的步骤,可以包括:In the first specific implementation manner, when the target media data fails to be uploaded, the target multimedia data may be uploaded to the cloud storage system based on the second network address to solve the network cause. The upload failed. In the second specific implementation, the step of retransmitting the target multimedia data to the cloud storage system according to the predetermined retransmission policy may include:
返回执行该基于该第一网络地址,向该云存储系统请求得到第二网络地址的步骤。Returning to the step of requesting the cloud storage system to obtain a second network address based on the first network address.
其中,在该第二种具体实现方式中,当该目标媒体数据上传失败时,可以向云存储系统请求新的目标存储节点,进而基于该新的目标存储节点的网络地址,将该目标媒体数据重新上传至该云存储系统,以解决由于网络原因和节点故障任一原因所导致的上传失败的问题。In the second specific implementation manner, when the target media data upload fails, the cloud storage system may be requested to the new target storage node, and then the target media data is obtained based on the network address of the new target storage node. Re-upload to the cloud storage system to resolve upload failures due to network reasons and node failures.
需要强调的是,在具体应用中,为了保证重传效率,上述的两种具体实现方式可以结合使用,例如:当目标媒体数据第一次上传失败时,可以采用上述的第一种具体实现方式所给出的重传方式,而当目标媒体数据非第一次上传失败时,则可以采用上述的第二种具体实现方式所给出的重传方式。当然,在具体重传过程中,如果接收到该云存储系统反馈的上传失败消息,通常表明云存储系统接收到该目标媒体数据但是数据有误,此时,可以采用上述的第一种具体实现方式;而如果在预定时长内未接收到该云存储系统反馈的目标存储信息,可能是由于网络原因导致该云存储系统并未收到该目标媒体数据,也可能是由于目标存储节点故障导致无法存储该目标媒体数据,此时,可以结合上述的第一种具体实现方式和第二种具体实现方式来实现重传,以保证数据上传效率。It should be emphasized that in the specific application, in order to ensure the retransmission efficiency, the foregoing two specific implementation manners may be used in combination. For example, when the first upload of the target media data fails, the first specific implementation manner described above may be adopted. The retransmission mode is given, and when the target media data fails to be uploaded for the first time, the retransmission mode given by the second specific implementation manner described above may be adopted. Certainly, in the specific retransmission process, if the upload failure message fed back by the cloud storage system is received, it is usually indicated that the cloud storage system receives the target media data but the data is incorrect. In this case, the first specific implementation may be adopted. If the target storage information fed back by the cloud storage system is not received within the predetermined duration, the cloud storage system may not receive the target media data due to network reasons, or may be unable to be caused by the target storage node failure. The target media data is stored. In this case, the retransmission can be implemented in combination with the first specific implementation manner and the second specific implementation manner to ensure data uploading efficiency.
下面结合具体的实施例,对本申请实施例第一方面所提供的一种媒体数据存储方法进行介绍。A media data storage method provided by the first aspect of the embodiments of the present application is described below in conjunction with a specific embodiment.
其中,该云存储系统包括至少一个管理节点和至少一个存储节点,其中,该管理节点用于管理各个存储节点,各个存储节点用于存储数据。并且,该图像采集设备中预先配置有第一网络地址,该第一网络地址具体为该云存储系统中管理节点的对外访问地址,其中,关于第一网络地址的具体形式以及具体配置方式,参见上述实施例,在此不做赘述。The cloud storage system includes at least one management node and at least one storage node, wherein the management node is used to manage each storage node, and each storage node is used to store data. And the first network address is specifically configured as an external access address of the management node in the cloud storage system, where the specific format and specific configuration manner of the first network address are used. The above embodiments are not described herein.
可选地,该图像采集设备可以为抓拍机,也可以为网络摄像机,当然并不限于此。并且,该图像采集设备所采集的媒体数据可以包括但不局限于图 片。Optionally, the image capturing device may be a capture camera or a network camera, which is of course not limited thereto. Moreover, the media data collected by the image acquisition device may include, but is not limited to, a picture.
如图3所示,本申请实施例在第一方面所提供的一种媒体数据存储方法,应用于图像采集设备,该方法可以包括如下步骤:As shown in FIG. 3, a media data storage method provided in the first aspect of the present application is applied to an image collection device, and the method may include the following steps:
S301,该图像采集设备在基于该第一网络地址与该管理节点建立tcp(Transmission Control Protocol,传输控制协议)连接后,向该管理节点发送用于请求存储节点的第一http(Hyper Text Transfer Protocol,超文本传输协议)请求消息,以使得:该管理节点确定该图像采集设备对应的目标存储节点,并在该目标存储节点确定后,向该图像采集设备反馈携带有第二网络地址的第一http回复消息;S301. After establishing a tcp (Transmission Control Protocol) connection with the management node based on the first network address, the image collection device sends a first http (Hyper Text Transfer Protocol) for requesting the storage node to the management node. a hypertext transfer protocol request message, such that: the management node determines a target storage node corresponding to the image collection device, and after the target storage node determines, feeds back to the image collection device the first network address carrying the second network address Http reply message;
需要说明的是,当该图像采集设备向该管理节点请求分配目标存储节点时,该图像采集设备可以首先检测当前是否与该管理节点建立了tcp连接,并在检测到当前未与该管理节点建立tcp连接时,基于该第一网络地址,与该管理节点建立tcp连接,进而在tcp连接建立后,向管理节点发送请求报文。可以理解的是,由于在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接,因此,图像采集设备与该管理节点所建立的tcp连接为采用三次握手建立的连接,其中,采用三次握手建立一个tcp连接的具体实现过程,在此不做赘述。其中,TCP/IP协议为Transmission Control Protocol/Internet Protocol的简写,中文译名为传输控制协议/网际协议。It should be noted that, when the image collection device requests the management node to allocate the target storage node, the image collection device may first detect whether a tcp connection is currently established with the management node, and detects that the management node is not currently established. When tcp is connected, a tcp connection is established with the management node based on the first network address, and then, after the tcp connection is established, the request packet is sent to the management node. It can be understood that, in the TCP/IP protocol, the TCP protocol provides a reliable connection service, and a three-way handshake is used to establish a connection. Therefore, the tcp connection established by the image collection device and the management node is a connection established by using a three-way handshake. The specific implementation process of establishing a tcp connection by using a three-way handshake is not described here. Among them, the TCP/IP protocol is short for Transmission Control Protocol/Internet Protocol, and the Chinese translation is called Transmission Control Protocol/Internet Protocol.
进而,在该图像采集设备与该管理节点建立tcp连接后,该图像采集设备可以向该管理节点发起http请求,也就是,向该管理节点发送用于请求存储节点的第一http请求消息;进而,该管理节点在接收到该第一http请求消息后,确定该图像采集设备对应的目标存储节点,并在确定出该目标存储节点后,向该图像采集设备反馈携带有第二网络地址的第一http回复消息。Further, after the image acquisition device establishes a tcp connection with the management node, the image collection device may initiate an http request to the management node, that is, send a first http request message for requesting the storage node to the management node; After receiving the first http request message, the management node determines a target storage node corresponding to the image collection device, and after determining the target storage node, feeds back to the image collection device that the second network address is carried. An http reply message.
其中,该管理节点可以从若干存储节点中,确定出该图像采集设备对应的目标存储节点。并且,该管理节点在选取目标存储节点时,可以采用负载均衡策略,当然并不局限于此,其中,该负载均衡策略所参考的标准包括但不局限于:存储节点的存储空间占用率,或者,存储节点的当前负载量,等等。并且,第一http请求消息中可以携带有图像采集设备的编码器ID、图像采集设备的系统时间等信息。可以理解的是,图像采集设备的系统时间能够体现第一http请求消息的时效性,当该管理节点接收到第一http请求消息后,可以通过该第一http请求消息中的系统时间检测该第一http请求消息是否已超时,如果超时,则可以不对该第一http请求消息进行响应。The management node may determine, from among the storage nodes, a target storage node corresponding to the image collection device. In addition, the management node may adopt a load balancing policy when selecting the target storage node, which is not limited thereto. The standards referenced by the load balancing policy include, but are not limited to, the storage space occupancy of the storage node, or , the current load of the storage node, and so on. Moreover, the first http request message may carry information such as an encoder ID of the image capturing device, a system time of the image capturing device, and the like. It can be understood that the system time of the image collection device can reflect the timeliness of the first http request message. When the management node receives the first http request message, the system can detect the first time through the system time in the first http request message. Whether an http request message has timed out, if it times out, it may not respond to the first http request message.
可选地,由于云存储系统中的存储节点可以有若干个,且云存储系统不仅仅用于存储各个图像采集设备的媒体数据,因此,可以构建多个虚拟资源池,每个虚拟资源池用于存储特定类型的数据内容。基于该处理思想,本申请实施例中,该云存储系统中的存储节点可以属于至少一个虚拟资源池,该图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,该目标虚拟资源池为用于存储该图像采集设备的媒体数据的虚拟资源池;Optionally, since there are several storage nodes in the cloud storage system, and the cloud storage system is not only used to store media data of each image collection device, multiple virtual resource pools can be constructed, and each virtual resource pool is used. For storing specific types of data content. Based on the processing idea, in the embodiment of the present application, the storage node in the cloud storage system may belong to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, the target virtual resource pool. a virtual resource pool for storing media data of the image capture device;
该第一http请求消息携带该目标ID信息;The first http request message carries the target ID information;
相应的,该管理节点确定该图像采集设备对应的目标存储节点的步骤,可以包括:Correspondingly, the step of determining, by the management node, the target storage node corresponding to the image collection device may include:
该管理节点从该第一http请求消息中提取该目标ID信息;The management node extracts the target ID information from the first http request message;
从具有该目标ID信息的该目标虚拟资源池对应的存储节点中,选取该图像采集设备对应的目标存储节点。其中,该管理节点可以从该目标ID信息所对应的该目标虚拟资源池中,选取该图像采集设备对应的目标存储节点。需要强调的是,该管理节点在选取目标存储节点时,可以采用负载均衡策略进行选取,当然并不局限于此。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device. The management node may select a target storage node corresponding to the image collection device from the target virtual resource pool corresponding to the target ID information. It should be emphasized that the management node may select a target storage node by using a load balancing policy, which is of course not limited thereto.
需要说明的是,虚拟资源池的ID信息在云存储系统中具有唯一性。并且,在一种具体实现方式中,虚拟资源池和存储节点之间可以属于多对多关系,即一个虚拟资源池可以属于多个存储节点,而一个存储节点的不同存储空间可以属于不同的虚拟资源池。而在另一种具体实现方式中,虚拟资源池和存储节点可以属于一一对应关系,也就是,一个存储节点可以唯一对应一个虚拟资源池。It should be noted that the ID information of the virtual resource pool is unique in the cloud storage system. Moreover, in a specific implementation manner, the virtual resource pool and the storage node may belong to a many-to-many relationship, that is, one virtual resource pool may belong to multiple storage nodes, and different storage spaces of one storage node may belong to different virtual environments. Resource pool. In another specific implementation manner, the virtual resource pool and the storage node may belong to a one-to-one correspondence, that is, one storage node may uniquely correspond to one virtual resource pool.
其中,对于虚拟资源池和存储节点之间可以属于多对多关系的情况,举例而言:假设云存储系统包括3个存储节点,且每个存储节点所具有存储空间的大小为500G,其中,各个存储节点的存储看空间均被划分至虚拟资源池,具体的,虚拟资源池A包括存储节点1中的500G的存储空间、存储节点2中的100G的存储空间和存储节点3中的100G的存储空间,虚拟资源池B包括存储节点2中的400G的存储空间和存储节点3中的200G的存储空间,虚拟资源池C包括存储节点3中的200G的存储空间;并且,所设定的数据存储关系为:虚拟资源池A与图像采集设备1-100对应,虚拟资源池B与图像采集设备101-200对应,虚拟资源池C与图像采集设备201-300对应。基于这样的对应关系,对于图像采集设备100而言,其预先配置有云存储系统的对外访问地址,即第一网络地 址,并且,预先配置有该虚拟资源池A的ID信息,进而,当图像采集设备100向管理节点请求目标存储节点时,向该管理节点发送的第一http请求消息中携带有虚拟资源池A的ID信息,而该管理节点在接收到该第一http请求消息后,根据负载均衡策略,从该虚拟资源池A所包括的存储节点1-3中,选择该图像采集设备100对应的目标存储节点。For example, in the case that the virtual resource pool and the storage node may belong to a many-to-many relationship, for example, it is assumed that the cloud storage system includes three storage nodes, and each storage node has a storage space of 500 G, wherein The storage look-ahead space of each storage node is divided into virtual resource pools. Specifically, the virtual resource pool A includes a storage space of 500G in the storage node 1, a storage space of 100G in the storage node 2, and a 100G in the storage node 3. Storage space, the virtual resource pool B includes a storage space of 400G in the storage node 2 and a storage space of 200G in the storage node 3, the virtual resource pool C includes a storage space of 200G in the storage node 3; and, the set data The storage relationship is: the virtual resource pool A corresponds to the image collection device 1-100, the virtual resource pool B corresponds to the image collection device 101-200, and the virtual resource pool C corresponds to the image collection device 201-300. Based on the corresponding relationship, the image acquisition device 100 is pre-configured with the external access address of the cloud storage system, that is, the first network address, and the ID information of the virtual resource pool A is pre-configured, and further, when the image is When the collection device 100 requests the target storage node from the management node, the first http request message sent to the management node carries the ID information of the virtual resource pool A, and the management node receives the first http request message, according to the The load balancing policy selects a target storage node corresponding to the image capturing device 100 from the storage nodes 1-3 included in the virtual resource pool A.
其中,对于虚拟资源池和存储节点可以属于一一对应关系的情况,举例而言:假设云存储系统包括10个存储节点,其中,存储节点1-3被划分至一个虚拟资源池中,该虚拟资源池被命名为虚拟资源池A;存储节点4-6被划分至一个虚拟资源池中,该虚拟资源池被命名为虚拟资源池B;存储节点7-10被划分至一个虚拟资源池中,该虚拟资源池被命名为虚拟资源池C;并且,所设定的数据存储关系为:虚拟资源池A与图像采集设备1-100对应,虚拟资源池B与图像采集设备101-200对应,虚拟资源池C与图像采集设备201-300对应。基于这样的对应关系,对于图像采集设备100而言,其预先配置有云存储系统的对外访问地址,即第一网络地址,并且,预先配置有该虚拟资源池A的ID信息,进而,当图像采集设备100向管理节点请求目标存储节点时,向该管理节点发送的第一http请求消息中携带有虚拟资源池A的ID信息,而该管理节点在接收到该第一http请求消息后,根据负载均衡策略,从该虚拟资源池A所包括的存储节点中,选择该图像采集设备100对应的目标存储节点。For example, the virtual resource pool and the storage node may belong to a one-to-one correspondence. For example, the cloud storage system includes 10 storage nodes, where the storage nodes 1-3 are divided into a virtual resource pool. The resource pool is named virtual resource pool A; the storage node 4-6 is divided into a virtual resource pool, which is named virtual resource pool B; the storage node 7-10 is divided into a virtual resource pool. The virtual resource pool is named as the virtual resource pool C; and the set data storage relationship is: the virtual resource pool A corresponds to the image collection device 1-100, and the virtual resource pool B corresponds to the image collection device 101-200. The resource pool C corresponds to the image collection devices 201-300. Based on the corresponding relationship, the image acquisition device 100 is pre-configured with the external access address of the cloud storage system, that is, the first network address, and the ID information of the virtual resource pool A is pre-configured, and further, when the image is When the collection device 100 requests the target storage node from the management node, the first http request message sent to the management node carries the ID information of the virtual resource pool A, and the management node receives the first http request message, according to the The load balancing policy selects a target storage node corresponding to the image capturing device 100 from the storage nodes included in the virtual resource pool A.
S302,接收该管理节点反馈的该第一http回复消息,并从该第一http回复消息中提取该第二网络地址;S302. Receive the first http reply message fed back by the management node, and extract the second network address from the first http reply message.
其中,该第一http回复消息还可以携带有该管理节点的系统时间,该管理节点的系统时间能够体现第一http响应消息的时效性,当该图像采集设备接收到第一http回复消息后,可以通过该第一http回复消息中的系统时间检测该第一http回复消息是否已超时,如果超时,则可以丢弃该第一http回复消息,并重新执行向该管理节点发送用于请求存储节点的第一http请求消息的步骤。The first http reply message may further carry the system time of the management node, where the system time of the management node can reflect the timeliness of the first http response message, and after the image collecting device receives the first http reply message, The first http reply message may be timed out by the system time in the first http reply message. If the timeout occurs, the first http reply message may be discarded, and the sending to the management node for requesting the storage node may be re-executed. The first http request message step.
S303,在基于该第二网络地址与该目标存储节点建立tcp连接后,将携带有待存储的目标媒体数据的第二http请求消息发送至该目标存储节点,以使得:该目标存储节点从该第二http请求消息中提取该目标媒体数据,并存储该目标媒体数据;S303, after establishing a tcp connection with the target storage node based on the second network address, sending a second http request message carrying the target media data to be stored to the target storage node, so that: the target storage node is from the first Extracting the target media data from the second http request message, and storing the target media data;
需要说明的是,当该图像采集设备向该目标存储节点上传媒体数据时,该图像采集设备可以首先检测当前是否与该目标存储节点建立了tcp连接,并在检测到当前未与该目标存储节点建立tcp连接时,基于该第二网络地址,与 该目标存储节点建立tcp连接,进而在tcp连接建立后,向该目标存储节点上传媒体数据。It should be noted that, when the image collecting device uploads media data to the target storage node, the image capturing device may first detect whether a tcp connection is currently established with the target storage node, and detects that the target storage node is not currently associated with the target storage node. When the tcp connection is established, a tcp connection is established with the target storage node based on the second network address, and after the tcp connection is established, the media data is uploaded to the target storage node.
其中,第二http请求消息中不但可以携带目标媒体数据,还可以携带图像采集设备的编码器ID、目标虚拟资源池的目标ID信息、目标媒体数据的时间戳、图像采集设备的系统时间等等。具体的,图像采集设备的编码器ID用于标识图像采集设备;而对于目标资源池的目标ID信息而言,在虚拟资源池和存储节点之间属于多对多关系的情况下,该目标存储节点可以基于目标虚拟资源池的目标ID信息来确定目标媒体数据需要写入哪个存储空间;该目标媒体数据的时间戳可以用于标识该目标媒体数据,而该图像采集设备的系统时间可以校验该第二http请求消息是否超时。The second http request message may not only carry the target media data, but also may carry the encoder ID of the image collection device, the target ID information of the target virtual resource pool, the time stamp of the target media data, the system time of the image collection device, and the like. . Specifically, the encoder ID of the image collection device is used to identify the image collection device; and for the target ID information of the target resource pool, in the case where the virtual resource pool and the storage node belong to a many-to-many relationship, the target storage The node may determine, according to the target ID information of the target virtual resource pool, which storage space the target media data needs to be written; the time stamp of the target media data may be used to identify the target media data, and the system time of the image collection device may be verified. Whether the second http request message times out.
其中,由于在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接,因此,图像采集设备与该目标存储节点所建立的tcp连接为采用三次握手建立的连接,其中,采用三次握手建立一个tcp连接的具体实现过程,在此不做赘述。In the TCP/IP protocol, the TCP protocol provides a reliable connection service, and a three-way handshake is used to establish a connection. Therefore, the tcp connection established by the image collection device and the target storage node is a connection established by using a three-way handshake, where The specific implementation process of establishing a tcp connection by using a three-way handshake is not described here.
需要强调的是,该图像采集设备在具有智能分析功能时,可以将待存储的目标媒体数据和目标智能数据上传至该云存储系统,那么,该第二http请求消息还携带有该目标智能数据,从而使得该目标云存储系统可以对应存储该目标媒体数据和该目标智能数据。可选地,在第二http请求消息中,该目标智能数据可以位于该目标媒体数据的尾部,并且该目标智能数据通过特定标识来进行标识,这样,云存储系统可以基于该特定标识识别出该目标智能数据,并将该目标智能数据与该目标媒体数据对应存储。It should be emphasized that the image collection device can upload the target media data and the target smart data to be stored to the cloud storage system when the smart analysis function is provided. Then, the second http request message carries the target intelligent data. So that the target cloud storage system can correspondingly store the target media data and the target smart data. Optionally, in the second http request message, the target smart data may be located at the end of the target media data, and the target smart data is identified by a specific identifier, so that the cloud storage system may identify the specific identifier based on the specific identifier. Target intelligent data, and the target intelligent data is stored corresponding to the target media data.
S304,接收该目标存储节点反馈的第二http回复消息,该第二http回复消息携带该目标存储信息;S304: Receive a second http reply message fed back by the target storage node, where the second http reply message carries the target storage information.
S305,从该第二http回复消息中提取该目标存储信息;S305. Extract the target storage information from the second http reply message.
其中,该目标存储信息为基于该目标媒体数据对应的存储位置所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data.
其中,该目标存储节点在存储该目标媒体数据后,可以基于该目标媒体数据的存储位置确定目标存储信息,进而构建携带有该目标存储信息的第二http回复消息,并发送给图像采集设备;相应的,该图像采集设备接收该目标存储节点反馈的第二http回复消息后,可以从该第二http回复消息中提取该目标存储信息。其中,关于目标存储信息与该目标媒体数据对应的存储位置的 具体内容及关系可以参照上述实施例的内容,在此不做赘述。After the target storage data is stored, the target storage node may determine the target storage information based on the storage location of the target media data, and then construct a second http reply message carrying the target storage information, and send the message to the image collection device. Correspondingly, after receiving the second http reply message fed back by the target storage node, the image collecting device may extract the target storage information from the second http reply message. For the specific content and relationship of the storage location corresponding to the target storage information and the target media data, reference may be made to the content of the foregoing embodiment, and details are not described herein.
S306,将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器。S306. Save the target URL corresponding to the target media data to the platform server corresponding to the image collection device.
其中,该目标URL为基于该目标存储信息所确定的信息,该目标URL与目标存储信息的关系可以参照上述实施例的内容,在此不做赘述。其中,该第二http回复消息还可以包括:目标媒体数据的时间戳信息,进而,该图像采集设备可以将该目标媒体数据的时间戳信息发送该平台服务器,该平台服务器存储该目标媒体数据的时间戳信息与目标URL的对应关系。The target URL is the information determined based on the target storage information, and the relationship between the target URL and the target storage information may refer to the content of the foregoing embodiment, and details are not described herein. The second http reply message may further include: timestamp information of the target media data, and further, the image collecting device may send the timestamp information of the target media data to the platform server, where the platform server stores the target media data. The correspondence between the timestamp information and the target URL.
需要强调的是,该图像采集设备具有智能分析功能时,可以从该目标媒体数据中提取目标智能数据,并将该目标媒体数据对应的目标URL和目标智能数据保存至该图像采集设备对应的平台服务器。具体的,当该目标存储信息为该目标媒体数据对应的存储位置时,该图像采集设备可以直接将该存储位置和该目标智能数据发送至该平台服务器,进而由该平台服务器基于该存储位置生成该目标媒体数据对应的目标URL,并对应保存该目标URL与该目标智能数据;当然,该图像采集设备也可以基于该存储位置生成该目标媒体数据对应的目标URL,进而该图像采集设备将该目标URL和该目标智能数据发送至该平台服务器,以使得该平台服务器直接对应存储该目标URL和该目标智能数据。另外,当该目标存储信息为该目标URL,也就是,云存储系统自行基于该目标媒体数据对应的存储位置生成该目标媒体数据对应的目标URL,这样,图像采集设备在收到该目标URL后,可以将该目标URL和该目标智能数据发送至该平台服务器,进而由该平台服务器对应存储该目标URL和该目标智能数据。It should be emphasized that when the image collection device has the intelligent analysis function, the target intelligent data may be extracted from the target media data, and the target URL and the target smart data corresponding to the target media data are saved to a platform corresponding to the image collection device. server. Specifically, when the target storage information is a storage location corresponding to the target media data, the image collection device may directly send the storage location and the target intelligent data to the platform server, and the platform server generates the storage location based on the storage location. a target URL corresponding to the target media data, and correspondingly storing the target URL and the target smart data; of course, the image capturing device may also generate a target URL corresponding to the target media data based on the storage location, and the image collecting device The target URL and the target intelligent data are sent to the platform server such that the platform server directly stores the target URL and the target smart data. In addition, when the target storage information is the target URL, that is, the cloud storage system generates a target URL corresponding to the target media data based on the storage location corresponding to the target media data, so that the image collection device receives the target URL. The target URL and the target smart data may be sent to the platform server, and the target URL and the target smart data are correspondingly stored by the platform server.
可选地,为了提高媒体数据上传效率,该第二http请求消息可以为长连接类型,即设置HTTP协议中connection:keep-alive,这样,上传完成目标媒体数据后,图像采集设备不需要关闭tcp连接,下一次媒体数据的上传直接复用该tcp连接。可见,HTTP的长连接和短连接本质上是TCP长连接和短连接。也就是,在请求得到第二网络地址后,在第一次上传待存储的目标媒体数据时,需要首先基于该第二网络地址,与该目标存储节点建立tcp连接,进而,在tcp连接建立后,向该目标存储节点上传数据;而第二次上传待存储的目标媒体数据时,由于上一次上传过程结束后未断开tcp连接,因此,可以直接向该目标存储节点上传数据。可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽 资源的消耗以及提高媒体数据上传效率。Optionally, in order to improve media data uploading efficiency, the second http request message may be of a long connection type, that is, setting connection:keep-alive in the HTTP protocol, so that after the target media data is uploaded, the image capturing device does not need to close the tcp. Connection, the next time the media data is uploaded, the tcp connection is directly multiplexed. It can be seen that the long and short connections of HTTP are essentially TCP long connections and short connections. That is, after the second network address is requested, when the target media data to be stored is uploaded for the first time, it is necessary to first establish a tcp connection with the target storage node based on the second network address, and further, after the tcp connection is established. The data is uploaded to the target storage node. When the target media data to be stored is uploaded for the second time, since the tcp connection is not disconnected after the last uploading process, the data can be directly uploaded to the target storage node. It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
第二方面,为了解决相关技术问题,从云存储系统的角度,本申请实施例提供了一种媒体数据存储方法。In a second aspect, in order to solve the related technical problem, the embodiment of the present application provides a media data storage method from the perspective of a cloud storage system.
需要说明的是,云存储系统可以包括至少一个管理节点和至少一个存储节点,其中,管理节点用于对存储节点进行管理,而存储节点用于存储数据,其中,存储节点的具体物理形态可以为服务器形态。并且,该云存储系统可以对应一个对外访问地址,即第一网络地址,该第一网络地址预先存储在图像采集设备中。其中,该第一网络地址可以为IP地址和端口号,关于第一网络地址的配置方式和具体形式参照上述实施例,在此不做赘述。It should be noted that the cloud storage system may include at least one management node and at least one storage node, where the management node is used to manage the storage node, and the storage node is used to store data, wherein the specific physical form of the storage node may be Server form. Moreover, the cloud storage system may correspond to an external access address, that is, a first network address, and the first network address is pre-stored in the image collection device. The first network address may be an IP address and a port number. For the configuration and specific form of the first network address, refer to the foregoing embodiment, and details are not described herein.
如图4所示,本申请实施例所提供的一种媒体数据存储方法,应用于云存储系统,该方法可以包括如下步骤:As shown in FIG. 4, a media data storage method provided by an embodiment of the present application is applied to a cloud storage system, and the method may include the following steps:
S401,接收图像采集设备发送的存储节点分配请求;其中,该存储节点分配请求为该图像采集设备基于存储于自身的第一网络地址所发送的;S401: Receive a storage node allocation request sent by the image collection device, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself;
为了请求云存储系统为该图像采集设备分配目标存储节点,该图像采集设备可以基于该第一网络地址与该云存储系统建立通信连接后,向该云存储系统发送存储节点分配请求;进而,该云存储系统可以接收到该存储节点分配请求,进而执行后续的节点分配过程。In order to request the cloud storage system to allocate a target storage node to the image collection device, the image collection device may send a storage node allocation request to the cloud storage system after establishing a communication connection with the cloud storage system based on the first network address; The cloud storage system can receive the storage node allocation request, and then perform a subsequent node allocation process.
需要说明的是,由于请求到的目标存储节点通常的存储容量较大,因此,目标存储节点一旦确定,该图像采集设备可以向该目标存储节点多次上传媒体数据。而基于该种多次向同一节点上传数据的思想,可以根据具体应用,来设定向云存储系统请求得到第二网络地址的触发时机,即向云存储系统发送存储节点分配请求的时机,例如:该触发时机可以为图像采集设备每次启动,或者,达到预定时间点,等等。It should be noted that, since the target storage node of the requested storage capacity is generally large, the image storage device may upload the media data to the target storage node multiple times once the target storage node determines. Based on the idea of uploading data to the same node multiple times, the triggering time for requesting the second network address from the cloud storage system may be set according to the specific application, that is, the timing of sending the storage node allocation request to the cloud storage system, for example, : The trigger timing can be started each time the image capture device is turned on, or reaches a predetermined time point, and so on.
S402,向该图像采集设备反馈第二网络地址,以使得:该图像采集设备在获得该第二网络地址后,基于该第二网络地址,将待存储的目标媒体数据上传至该云存储系统;其中,该第二网络地址为目标存储节点的网络地址,该目标存储节点为该云存储系统为所述图像采集设备所分配的、用于存储该图像采集设备的媒体数据的存储节点;S402, the second network address is fed back to the image collection device, so that: after obtaining the second network address, the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address; The second network address is a network address of the target storage node, and the target storage node is a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;
云存储系统在接收到图像采集设备发送的存储节点分配请求后,可以从 各个存储节点中选取出目标存储节点,并在目标存储节点确定后,向该图像采集设备反馈第二网络地址,即目标存储节点的网络地址。进而,该图像采集设备在获得该第二网络地址后,可以基于该第二网络地址,将待存储的目标媒体数据上传至该云存储系统。其中,该云存储系统在选取目标存储节点时,可以采用负载均衡策略进行选取,当然并不局限于此。After receiving the storage node allocation request sent by the image collection device, the cloud storage system may select the target storage node from each storage node, and after the target storage node determines, feed back the second network address, that is, the target, to the image collection device. The network address of the storage node. In addition, after obtaining the second network address, the image collection device may upload the target media data to be stored to the cloud storage system based on the second network address. The cloud storage system may select a target storage node by using a load balancing policy, which is of course not limited thereto.
需要说明的是,在获得第二网络地址后,该图像采集设备可以基于该第二网络地址,实时或定时地将待存储的目标媒体数据上传至该云存储系统,其中,关于实时存储和定时存储的定义可以参照上述实施例,在此不做赘述。It should be noted that after obtaining the second network address, the image collection device may upload the target media data to be stored to the cloud storage system in real time or periodically based on the second network address, where the real-time storage and timing are performed. For the definition of the storage, reference may be made to the above embodiments, and details are not described herein.
S403,存储该图像采集设备上传的该目标媒体数据;其中,该目标媒体数据存储于该云存储系统中的该目标存储节点。S403. The target media data uploaded by the image collection device is stored. The target media data is stored in the target storage node in the cloud storage system.
其中,该目标存储节点存储图像采集设备上传的媒体数据的具体存储形式,本申请实施例不做限定。The target storage node stores a specific storage format of the media data uploaded by the image collection device, which is not limited in the embodiment of the present application.
可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
可选地,该图像采集设备可以具有智能分析功能,这样,该图像采集设备可以对媒体数据进行智能分析,然后将智能分析后所得到的智能数据连同所对应的媒体数据存储至云存储系统中,从而提高云存储系统所存储数据的丰富性以及后续访问端可访问数据的丰富性。基于该种处理思想,该图像采集设备基于所述第二网络地址,将待存储的目标媒体数据上传至该云存储系统,可以包括:Optionally, the image collection device may have an intelligent analysis function, so that the image collection device can perform intelligent analysis on the media data, and then store the intelligent data obtained by the intelligent analysis together with the corresponding media data into the cloud storage system. , thereby increasing the richness of data stored in the cloud storage system and the richness of data accessible by subsequent access terminals. Based on the processing idea, the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address, and may include:
该图像采集设备基于该第二网络地址,将待存储的目标媒体数据和目标智能数据上传至该云存储系统;其中,该目标智能数据为所述图像采集设备从该目标媒体数据中所提取到的数据;The image collection device uploads the target media data and the target smart data to be stored to the cloud storage system based on the second network address; wherein the target smart data is extracted by the image collection device from the target media data The data;
相应的,所述存储该图像采集设备上传的该目标媒体数据的步骤,包括:Correspondingly, the step of storing the target media data uploaded by the image collection device comprises:
存储该图像采集设备上传的该目标媒体数据和该目标智能数据,其中,该目标媒体数据和该目标智能数据存储于该云存储系统中的该目标存储节点。And storing the target media data and the target smart data uploaded by the image collection device, where the target media data and the target smart data are stored in the target storage node in the cloud storage system.
可选地,在存储该图像采集设备上传的该目标媒体数据后,如图5所示,本申请实施例在第二方面所提供的一种媒体数据存储方法,还可以包括步骤:Optionally, after storing the target media data uploaded by the image collection device, as shown in FIG. 5, a media data storage method provided by the second aspect of the present application may further include the following steps:
S404,向该图像采集设备反馈目标存储信息,以使得:该图像采集设备 接收到该目标存储信息后,将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器。S404: The target storage information is fed back to the image collection device, so that after the image collection device receives the target storage information, the target URL corresponding to the target media data is saved to the platform server corresponding to the image collection device.
其中,该目标存储信息为基于该目标媒体数据对应的存储位置所确定的信息,该目标URL为基于该目标存储信息所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
其中,该云存储系统存储目标媒体数据后,为了用户通过平台服务器或浏览器后续访问该目标媒体数据,该云存储系统可以基于该目标媒体数据对应的存储位置来确定目标存储信息,进而将该目标存储信息反馈至该图像采集设备,以使得该图像采集设备将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器,这样,后续平台服务器或浏览器可以通过该目标URL访问该目标媒体数据,其中,访问方式可以包括:下载、删除或锁定等方式。After the cloud storage system stores the target media data, in order for the user to access the target media data through the platform server or the browser, the cloud storage system may determine the target storage information based on the storage location corresponding to the target media data, and then The target storage information is fed back to the image collection device, so that the image collection device saves the target URL corresponding to the target media data to the platform server corresponding to the image collection device, so that the subsequent platform server or browser can access the target URL. The target media data, wherein the access manner may include: downloading, deleting, or locking.
具体的,该目标媒体数据对应的存储位置可以为该目标媒体数据所在磁盘的磁盘标识和磁盘偏移,以及媒体数据的标识等;而该目标存储信息可以为该目标URL,或者,该目标媒体数据对应的存储位置。其中,关于该目标媒体数据的存储位置、目标存储信息、目标URL的转换关系,参见上述实施例,在此不做赘述。Specifically, the storage location corresponding to the target media data may be a disk identifier and a disk offset of the disk where the target media data is located, and an identifier of the media data, and the target storage information may be the target URL, or the target media. The storage location corresponding to the data. For the conversion relationship between the storage location of the target media data, the target storage information, and the target URL, refer to the foregoing embodiment, and details are not described herein.
下面结合具体的实施例,对本申请实施例第二方面所提供的一种媒体数据存储方法进行介绍。A media data storage method provided by the second aspect of the embodiments of the present application is described below in conjunction with a specific embodiment.
其中,该云存储系统包括至少一个管理节点和至少一个存储节点,其中,该管理节点用于管理各个存储节点,且该管理节点可以为独立于存储节点的节点,也可以是若干存储节点中的一个节点,也就是,一个存储节点既作为存储节点,也作为管理节点。并且,该图像采集设备中预先配置有第一网络地址,该第一网络地址具体为该云存储系统中管理节点的对外访问地址,其中,关于第一网络地址的具体形式以及具体配置方式,参见上述实施例,在此不做赘述。The cloud storage system includes at least one management node and at least one storage node, wherein the management node is used to manage each storage node, and the management node may be a node independent of the storage node, or may be in a plurality of storage nodes. A node, that is, a storage node acts as both a storage node and a management node. And the first network address is specifically configured as an external access address of the management node in the cloud storage system, where the specific format and specific configuration manner of the first network address are used. The above embodiments are not described herein.
如图6所示,本申请实施例在第二方面所提供的一种媒体数据存储方法,应用于云存储系统,该方法可以包括如下步骤:As shown in FIG. 6, a media data storage method provided by the second embodiment of the present application is applied to a cloud storage system, and the method may include the following steps:
S601,该管理节点与该图像采集设备建立tcp连接后,接收该图像采集设备发送的用于请求分配存储节点的第一http请求消息;S601, after the management node establishes a tcp connection with the image collection device, receiving a first http request message sent by the image collection device for requesting allocation of the storage node;
其中,该管理节点与该图像采集设备间的tcp连接为:该图像采集设备基于该第一网络地址向该管理节点请求建立的。第一http请求消息中可以携带有 图像采集设备的编码器ID、图像采集设备的系统时间等信息。可以理解的是,图像采集设备的系统时间能够体现第一http请求消息的时效性,当该管理节点接收到第一http请求消息后,可以通过该第一http请求消息中的系统时间检测该第一http请求消息是否已超时,如果超时,则可以不对该第一http请求消息进行响应。The tcp connection between the management node and the image collection device is: the image collection device requests the establishment of the management node based on the first network address. The first http request message may carry information such as an encoder ID of the image capturing device, a system time of the image capturing device, and the like. It can be understood that the system time of the image collection device can reflect the timeliness of the first http request message. When the management node receives the first http request message, the system can detect the first time through the system time in the first http request message. Whether an http request message has timed out, if it times out, it may not respond to the first http request message.
可以理解的是,图像采集设备主动与该管理节点建立tcp连接,关于建立tcp连接的触发时机,即向云存储系统请求第二网络地址的时机,参考上述的从图像采集设备角度所提供的方案中的内容,在此不做赘述。并且,由于在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接,因此,图像采集设备与该管理节点所建立的tcp连接为采用三次握手建立的连接,其中,采用三次握手建立一个tcp连接的具体实现过程,在此不做赘述。It can be understood that the image collecting device actively establishes a tcp connection with the management node, and the timing of establishing a triggering time of the tcp connection, that is, the timing of requesting the second network address from the cloud storage system, refer to the foregoing solution provided from the perspective of the image collecting device. The content in this article will not be repeated here. Moreover, since the TCP protocol provides a reliable connection service in the TCP/IP protocol, a three-way handshake is used to establish a connection. Therefore, the tcp connection established by the image collection device and the management node is a connection established by using a three-way handshake, wherein The three-way handshake establishes a specific implementation process of a tcp connection, and will not be described here.
S602,该管理节点确定该图像采集设备对应的目标存储节点;S602. The management node determines a target storage node corresponding to the image collection device.
其中,该管理节点可以从若干存储节点中,确定出该图像采集设备对应的目标存储节点。并且,该管理节点在选取目标存储节点,可以采用负载均衡策略进行选取,其中,该负载均衡策略所参考的标准包括但不局限于:存储节点的存储空间占用率,或者,存储节点的当前负载量,等等。The management node may determine, from among the storage nodes, a target storage node corresponding to the image collection device. In addition, the management node selects the target storage node, and may adopt a load balancing policy, where the standards referenced by the load balancing policy include, but are not limited to, the storage space occupancy of the storage node, or the current load of the storage node. Quantity, and so on.
可选地,由于云存储系统中的存储节点可以有若干个,且云存储系统不仅仅用于存储各个图像采集设备的媒体数据,因此,可以构建多个虚拟资源池,每个虚拟资源池用于存储特定类型的数据内容。基于该处理思想,本申请实施例中,该云存储系统中的存储节点可以属于至少一个虚拟资源池,该图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,该目标虚拟资源池为用于存储该图像采集设备的媒体数据的虚拟资源池;Optionally, since there are several storage nodes in the cloud storage system, and the cloud storage system is not only used to store media data of each image collection device, multiple virtual resource pools can be constructed, and each virtual resource pool is used. For storing specific types of data content. Based on the processing idea, in the embodiment of the present application, the storage node in the cloud storage system may belong to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, the target virtual resource pool. a virtual resource pool for storing media data of the image capture device;
该第一http请求消息携带该目标ID信息;The first http request message carries the target ID information;
相应的,该管理节点确定该图像采集设备对应的目标存储节点的步骤,包括:Correspondingly, the step of determining, by the management node, the target storage node corresponding to the image collection device comprises:
该管理节点从该第一http请求消息中提取该目标ID信息;The management node extracts the target ID information from the first http request message;
从具有该目标ID信息的该目标虚拟资源池对应的存储节点中,选取该图像采集设备对应的目标存储节点。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device.
需要说明的是,虚拟资源池的ID信息在云存储系统中具有唯一性。并且,在一种具体实现方式中,虚拟资源池和存储节点之间可以属于多对多关系, 即一个虚拟资源池可以属于多个存储节点,而一个存储节点的不同存储空间可以属于不同的虚拟资源池。而在另一种具体实现方式中,虚拟资源池和存储节点可以属于一一对应关系,也就是,一个存储节点可以唯一对应一个虚拟资源池。其中,该管理节点可以从该目标ID信息所对应的该目标虚拟资源池中,选取该图像采集设备对应的目标存储节点。需要说明的是,该管理节点在选取目标存储节点时,可以采用负载均衡策略进行选取,当然并不局限于此。It should be noted that the ID information of the virtual resource pool is unique in the cloud storage system. Moreover, in a specific implementation manner, the virtual resource pool and the storage node may belong to a many-to-many relationship, that is, one virtual resource pool may belong to multiple storage nodes, and different storage spaces of one storage node may belong to different virtual environments. Resource pool. In another specific implementation manner, the virtual resource pool and the storage node may belong to a one-to-one correspondence, that is, one storage node may uniquely correspond to one virtual resource pool. The management node may select a target storage node corresponding to the image collection device from the target virtual resource pool corresponding to the target ID information. It should be noted that the management node may select a target storage node by using a load balancing policy, which is of course not limited thereto.
S603,该管理节点在确定出该目标存储节点后,向该图像采集设备反馈携带有第二网络地址的第一http回复消息;S603. After determining the target storage node, the management node feeds back, by the image collection device, a first http reply message carrying a second network address.
其中,该第二网络地址为该目标存储节点的网络地址。The second network address is a network address of the target storage node.
其中,该第一http回复消息还可以携带有该管理节点的系统时间,该管理节点的系统时间能够体现第一http响应消息的时效性,当该图像采集设备接收到第一http回复消息后,可以通过该第一http回复消息中的系统时间检测该第一http回复消息是否已超时,如果超时,则可以丢弃该第一http回复消息,并重新执行向该管理节点发送用于请求存储节点的第一http请求消息的步骤。The first http reply message may further carry the system time of the management node, where the system time of the management node can reflect the timeliness of the first http response message, and after the image collecting device receives the first http reply message, The first http reply message may be timed out by the system time in the first http reply message. If the timeout occurs, the first http reply message may be discarded, and the sending to the management node for requesting the storage node may be re-executed. The first http request message step.
S604,该目标存储节点与该图像采集设备建立tcp连接后,接收该图像采集设备发送的第二http请求消息;S604, after the target storage node establishes a tcp connection with the image collection device, receiving a second http request message sent by the image collection device;
其中,该第二http请求消息携带有待存储的目标媒体数据,该目标存储节点与该图像采集设备间的tcp连接为:该图像采集设备基于该第二网络地址向该目标存储节点请求建立的。The second http request message carries the target media data to be stored, and the tcp connection between the target storage node and the image collection device is: the image collection device requests to establish the target storage node based on the second network address.
S605,该目标存储节点从该第二http请求消息中提取该目标媒体数据,并存储该目标媒体数据;S605. The target storage node extracts the target media data from the second http request message, and stores the target media data.
为了向目标存储节点发送目标媒体数据,该图像采集设备可以构建带有待存储的目标媒体数据的第二http请求消息,进而在tcp连接建立后,向该目标存储节点发送该第二http请求消息;相应的,该目标存储节点从该第二http请求消息中提取该目标媒体数据,并存储该目标媒体数据。In order to send the target media data to the target storage node, the image collection device may construct a second http request message with the target media data to be stored, and then send the second http request message to the target storage node after the tcp connection is established; Correspondingly, the target storage node extracts the target media data from the second http request message, and stores the target media data.
其中,第二http请求消息中不但可以携带目标媒体数据,还可以携带图像采集设备的编码器ID、目标虚拟资源池的目标ID信息、目标媒体数据的时间戳、图像采集设备的系统时间等等。具体的,图像采集设备的编码器ID用于标识图像采集设备;而对于目标资源池的目标ID信息而言,在虚拟资源池和存储节点之间属于多对多关系的情况下,该目标存储节点可以基于目标虚拟 资源池的目标ID信息来确定目标媒体数据需要写入哪个存储空间;该目标媒体数据的时间戳可以用于标识该目标媒体数据,而该图像采集设备的系统时间可以校验该第二http请求消息是否超时。需要强调的是,对于该图像采集设备将待存储的目标媒体数据和目标智能数据上传至该云存储系统的情况而言,第二http请求消息还可以携带有该目标智能数据,从而使得该目标云存储系统可以对应存储该目标媒体数据和该目标智能数据。可选地,在第二http请求消息中,该目标智能数据可以位于该目标媒体数据的尾部,并且该目标智能数据通过特定标识来进行标识,这样,云存储系统可以基于该特定标识识别出该目标智能数据,并将该目标智能数据与该目标媒体数据对应存储。The second http request message may not only carry the target media data, but also may carry the encoder ID of the image collection device, the target ID information of the target virtual resource pool, the time stamp of the target media data, the system time of the image collection device, and the like. . Specifically, the encoder ID of the image collection device is used to identify the image collection device; and for the target ID information of the target resource pool, in the case where the virtual resource pool and the storage node belong to a many-to-many relationship, the target storage The node may determine, according to the target ID information of the target virtual resource pool, which storage space the target media data needs to be written; the time stamp of the target media data may be used to identify the target media data, and the system time of the image collection device may be verified. Whether the second http request message times out. It should be emphasized that, in the case that the image collection device uploads the target media data and the target smart data to be stored to the cloud storage system, the second http request message may also carry the target smart data, thereby making the target The cloud storage system may correspondingly store the target media data and the target smart data. Optionally, in the second http request message, the target smart data may be located at the end of the target media data, and the target smart data is identified by a specific identifier, so that the cloud storage system may identify the specific identifier based on the specific identifier. Target intelligent data, and the target intelligent data is stored corresponding to the target media data.
S606,该目标存储节点向该图像采集设备反馈第二http回复消息,该第二http回复消息携带有目标存储信息。S606. The target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries the target storage information.
其中,该目标存储信息为基于该目标媒体数据对应的存储位置所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data.
其中,该目标存储节点在存储该目标媒体数据后,为了用户通过浏览器或平台服务器访问该目标媒体数据,可以基于该目标媒体数据的存储位置确定目标存储信息,进而构建携带有该目标存储信息的第二http回复消息,并发送给图像采集设备;相应的,该图像采集设备接收该目标存储节点反馈的第二http回复消息后,可以从该第二http回复消息中提取该目标存储信息,将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器,其中,该目标URL为基于该目标存储信息所确定的信息。After the target storage node stores the target media data, the user may determine the target storage information based on the storage location of the target media data, and then construct the target storage information. The second http reply message is sent to the image collection device; correspondingly, after receiving the second http reply message fed back by the target storage node, the image collection device may extract the target storage information from the second http reply message. And saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device, where the target URL is information determined based on the target storage information.
其中,该第二http回复消息还可以包括:目标媒体数据的时间戳信息,进而,该图像采集设备可以将该目标媒体数据的时间戳信息发送该平台服务器,该平台服务器存储该目标媒体数据的时间戳信息与目标URL的对应关系。其中,关于目标存储信息与该目标媒体数据对应的存储位置的具体内容及关系可以参照上述实施例的内容,在此不做赘述。同样的,该目标URL与目标存储信息的关系可以参照上述实施例的内容,在此不做赘述。The second http reply message may further include: timestamp information of the target media data, and further, the image collecting device may send the timestamp information of the target media data to the platform server, where the platform server stores the target media data. The correspondence between the timestamp information and the target URL. For the specific content and relationship of the storage location corresponding to the target storage information and the target media data, reference may be made to the content of the foregoing embodiment, and details are not described herein. For the same, the relationship between the target URL and the target storage information can be referred to the content of the foregoing embodiment, and details are not described herein.
可选地,为了提高媒体数据上传效率,该第二http请求消息可以为长连接类型,即设置HTTP协议中connection:keep-alive,这样,上传完成目标媒体数据后,图像采集设备不需要关闭tcp连接,下一次媒体数据的上传直接复用该tcp连接。可见,HTTP的长连接和短连接本质上是TCP长连接和短连接。也就是,在请求得到第二网络地址后,在第一次上传待存储的目标媒体数据时,需要首先基于该第二网络地址,与该目标存储节点建立tcp连接,进而,在tcp 连接建立后,向该目标存储节点上传数据;而第二上传待存储的目标媒体数据时,由于上一次上传过程结束后未断开tcp连接,因此,可以直接向该目标存储节点上传数据。Optionally, in order to improve media data uploading efficiency, the second http request message may be of a long connection type, that is, setting connection:keep-alive in the HTTP protocol, so that after the target media data is uploaded, the image capturing device does not need to close the tcp. Connection, the next time the media data is uploaded, the tcp connection is directly multiplexed. It can be seen that the long and short connections of HTTP are essentially TCP long connections and short connections. That is, after the second network address is requested, when the target media data to be stored is uploaded for the first time, it is necessary to first establish a tcp connection with the target storage node based on the second network address, and further, after the tcp connection is established. And uploading data to the target storage node; and when uploading the target media data to be stored, since the tcp connection is not disconnected after the last uploading process, the data can be directly uploaded to the target storage node.
可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
可选地,本申请实施例在第二方面所提供的一种媒体数据存储方法,还可以包括如下步骤:Optionally, the media data storage method provided in the second aspect of the embodiment of the present application may further include the following steps:
接收访问端基于该目标URL发送的媒体数据处理请求;其中,该访问端为该平台服务器或浏览器,该浏览器所基于的该目标URL从该平台服务器获得;Receiving, by the accessing end, a media data processing request sent by the target URL, where the accessing end is the platform server or the browser, and the target URL on which the browser is based is obtained from the platform server;
重定向该媒体数据处理请求至该目标存储节点,以由该目标存储节点执行与该媒体数据处理请求相对应的处理操作。The media data processing request is redirected to the target storage node to perform processing operations corresponding to the media data processing request by the target storage node.
由于目标媒体数据存储在该目标存储节点中,因此,云存储系统在接收到访问端基于该目标URL发送的媒体数据处理请求后,需要重定向该媒体数据处理请求至该目标存储节点,以由该目标存储节点执行与该媒体数据处理请求相对应的处理操作。After the target media data is stored in the target storage node, the cloud storage system needs to redirect the media data processing request to the target storage node after receiving the media data processing request sent by the access terminal based on the target URL. The target storage node performs a processing operation corresponding to the media data processing request.
其中,当该访问端为浏览器时,用户可以将该目标URL拷贝到该浏览器的地址输入框中,从而使得该浏览器发出媒体数据处理请求。而当该访问端为平台服务器时,由于平台服务器存储有该目标URL,因此,当需要访问该目标媒体数据时,该平台服务器可以直接基于该目标URL发出媒体数据处理请求。Wherein, when the access terminal is a browser, the user can copy the target URL to the address input box of the browser, so that the browser issues a media data processing request. When the access terminal is a platform server, since the platform server stores the target URL, when the target media data needs to be accessed, the platform server can directly issue a media data processing request based on the target URL.
其中,该媒体数据处理请求可以为:下载请求、锁定请求和删除请求中的任一种。相应的,当该媒体数据处理请求为下载请求时,与该媒体数据处理请求相对应的处理操作为下载操作;当该媒体数据处理请求为锁定请求时,与该媒体数据处理请求相对应的处理操作为锁定操作;当该媒体数据处理请求为删除请求时,与该媒体数据处理请求相对应的处理操作为删除操作。The media data processing request may be any one of a download request, a lock request, and a delete request. Correspondingly, when the media data processing request is a download request, the processing operation corresponding to the media data processing request is a download operation; and when the media data processing request is a lock request, the processing corresponding to the media data processing request The operation is a lock operation; when the media data processing request is a delete request, the processing operation corresponding to the media data processing request is a delete operation.
具体的,该第一网络地址具体为该云存储系统中管理节点的对外访问地址;该目标URL中包含该第一网络地址;Specifically, the first network address is specifically an external access address of the management node in the cloud storage system; the target URL includes the first network address;
所述接收访问端基于该目标URL发送的媒体数据处理请求的步骤,可以 包括:The step of receiving the media data processing request sent by the access terminal based on the target URL may include:
该管理节点在与该访问端建立tcp连接后,接收该访问端发送的用于处理媒体数据的第三http请求消息;其中,该第三http请求消息基于该目标URL所形成;该管理节点与该访问端间的tcp连接为:该访问端基于该目标URL中的第一网络地址向该管理节点请求建立的;After establishing a tcp connection with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data; wherein the third http request message is formed based on the target URL; the management node and the management node The tcp connection between the access terminals is: the access end requests the establishment of the management node based on the first network address in the target URL;
相应的,所述重定向该媒体数据处理请求至该目标存储节点,以由该目标存储节点执行与该媒体数据处理请求相对应的处理操作的步骤,可以包括:Correspondingly, the step of redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node may include:
该管理节点解析该第三http请求消息,得到该目标URL;The management node parses the third http request message to obtain the target URL;
确定该目标URL所对应的该目标存储节点;Determining the target storage node corresponding to the target URL;
确定该目标存储节点所对应的该第二网络地址;Determining the second network address corresponding to the target storage node;
将携带有该第二网络地址的第三http回复消息反馈至该访问端,以使得:该访问端基于该第三http回复消息中的第二网络地址与该目标存储节点建立tcp连接后,向该目标存储节点发送该第三http请求消息,进而,该目标存储节点对该目标媒体数据执行与该第三http请求消息相对应的处理操作。And feeding back the third http reply message carrying the second network address to the accessing end, so that: the accessing end establishes a tcp connection with the target storage node based on the second network address in the third http reply message, and then The target storage node sends the third http request message, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
需要说明的是,该管理节点中可以预先建立存储节点的节点标识与存储节点所包括磁盘的磁盘标识的对应关系,这样,当该管理节点解析得到该目标URL时,可以基于该对应关系,确定出该目标URL所包括磁盘标识对应的节点标识,而所确定出的节点标识即为该目标存储节点的节点标识,从而确定出该目标URL所对应的该目标存储节点。It should be noted that, in the management node, the correspondence between the node identifier of the storage node and the disk identifier of the disk included in the storage node may be established in advance, so that when the management node parses the target URL, it may be determined based on the correspondence relationship. The node identifier corresponding to the disk identifier is included in the target URL, and the determined node identifier is the node identifier of the target storage node, thereby determining the target storage node corresponding to the target URL.
更进一步的,该目标存储节点中存储的该目标媒体数据与目标智能数据具有对应性;其中,该目标智能数据为从该目标媒体数据中所提取到的;Further, the target media data stored in the target storage node has a correspondence with the target intelligent data; wherein the target smart data is extracted from the target media data;
所述目标存储节点对该目标媒体数据执行与第三http请求消息相对应的处理操作,可以包括:The performing, by the target storage node, the processing operation corresponding to the third http request message to the target media data, may include:
该目标存储节点对该目标媒体数据和该目标智能数据执行与该第三http请求消息相对应的处理操作。The target storage node performs a processing operation corresponding to the third http request message for the target media data and the target smart data.
其中,在一种实现方式中,该图像采集设备可以将该目标媒体数据和目标智能数据发送至云存储系统,从而该云存储系统中的目标存储节点可以对应存储该目标媒体数据和该目标智能数据;当然,在另一种实现方式中,该图像采集设备将目标媒体数据发送给目标存储节点后,该目标存储节点可以 后台智能分析该目标媒体数据的数据内容,得到该目标媒体数据对应的目标智能数据。进而,在该目标存储节点获得该目标媒体数据和目标智能数据后,可以将目标智能数据和该目标媒体数据绑定存放一起,即该目标智能数据和该目标媒体数据具有对应关系,这样找到目标媒体数据,就能够找到相应的目标智能数据,其中,两类数据的存储方式为:在目标媒体数据后面紧挨着存储智能数据)。举例而言:假设图像采集设备上传的目标媒体数据是图片1和图片2,图片1对应智能数据1,图片2对应智能数据2,图片1-2和智能数据1-2在目标存储节点的磁盘中的具体存储方式可以如图7所示。The image collection device may send the target media data and the target intelligent data to the cloud storage system, so that the target storage node in the cloud storage system may correspondingly store the target media data and the target intelligence. Data; of course, in another implementation manner, after the image collection device sends the target media data to the target storage node, the target storage node may intelligently analyze the data content of the target media data in the background to obtain the corresponding target media data. Target intelligence data. Further, after the target storage node obtains the target media data and the target smart data, the target smart data and the target media data may be bound together, that is, the target smart data and the target media data have a corresponding relationship, so that the target is found. With the media data, the corresponding target intelligent data can be found. The two types of data are stored in the following way: the smart data is stored next to the target media data. For example: suppose the target media data uploaded by the image acquisition device is picture 1 and picture 2, picture 1 corresponds to smart data 1, picture 2 corresponds to intelligent data 2, picture 1-2 and intelligent data 1-2 are on the disk of the target storage node The specific storage method can be as shown in FIG. 7.
其中,当访问端请求下载目标媒体数据时,目标存储节点可以在反馈目标媒体数据的同时反馈目标智能数据,这样,访问端可以将目标媒体数据进行展示,而利用目标智能数据进行检索或识别等业务。类似的,当访问端请求删除目标媒体数据时,目标存储节点可以在删除目标媒体数据的同时删除目标智能数据。类似的,当访问端请求锁定目标媒体数据时,目标存储节点可以在锁定目标媒体数据的同时锁定目标智能数据。When the access terminal requests to download the target media data, the target storage node may feed back the target smart data while feeding back the target media data, so that the access terminal may display the target media data, and use the target intelligent data for searching or identifying, etc. business. Similarly, when the access end requests to delete the target media data, the target storage node may delete the target smart data while deleting the target media data. Similarly, when the access end requests to lock the target media data, the target storage node can lock the target smart data while locking the target media data.
为了便于理解方案,图8所示的时序图,从抓拍机、管理节点、目标存储节点、平台服务器四者的交互角度,给出了本申请实施例所提供的媒体数据存储方法的一种流程示意图,其中,该媒体数据为抓拍机所抓拍的图片。需要强调的是,该时序图中,该管理节点在向抓拍机反馈第一http回复消息,可以立即断开tcp连接,也可不立即断开tcp连接,是否立即断开主要取决于第一http请求消息是否属于长连接类型;类似的,该目标存储节点在向抓拍机反馈第二http回复消息后,可以立即断开tcp连接,也可不立即断开tcp连接,是否立即断开主要取决于第二http请求消息是否属于长连接类型。并且,该时序图中,该抓拍机在接收到目标存储信息后,直接将该目标存储消息转发给平台服务器,并由该平台服务器基于该目标存储信息生成目标URL,当然,该抓拍机也可以基于该目标存储信息生成目标URL后,直接将该目标URL发送给平台服务器,其中,该目标存储信息可以为目标URL,也可以为目标媒体数据的存储位置。In order to facilitate the understanding of the scheme, the timing diagram shown in FIG. 8 is a flow of the media data storage method provided by the embodiment of the present application from the perspective of the interaction of the capture machine, the management node, the target storage node, and the platform server. The schematic diagram, wherein the media data is a picture captured by a capture machine. It should be emphasized that in the timing diagram, the management node feeds back the first http reply message to the capture machine, and can immediately disconnect the tcp connection, or can not immediately disconnect the tcp connection, and whether to immediately disconnect depends mainly on the first http request. Whether the message belongs to the long connection type; similarly, after the target storage node feeds back the second http reply message to the capture machine, the tcp connection can be disconnected immediately, or the tcp connection is not immediately disconnected, and whether the immediate disconnection is mainly depends on the second Whether the http request message is of a long connection type. And, in the sequence diagram, after receiving the target storage information, the capture machine directly forwards the target storage message to the platform server, and the platform server generates a target URL based on the target storage information, of course, the capture machine can also After the target URL is generated based on the target storage information, the target URL is directly sent to the platform server, where the target storage information may be a target URL or a storage location of the target media data.
第三方面,相应于上述提供的方法实施例,本申请实施例还提供了一种媒体数据存储系统,如图9所示,该媒体数据存储系统包括:图像采集设备910和云存储系统920,该图像采集设备910中预先存储有第一网络地址,该第一网络地址为云存储系统920的对外访问地址;In a third aspect, corresponding to the method embodiment provided above, the embodiment of the present application further provides a media data storage system. As shown in FIG. 9, the media data storage system includes: an image collection device 910 and a cloud storage system 920. The image collection device 910 is pre-stored with a first network address, where the first network address is an external access address of the cloud storage system 920;
该图像采集设备910用于基于该第一网络地址,向该云存储系统发送存储节点分配请求,获得该云存储系统反馈的第二网络地址;并且,在获得该第二网络地址后,基于该第二网络地址,将待存储的目标媒体数据上传至该云存储系统920;其中,该第二网络地址为目标存储节点的网络地址,该目标存储节点为:该云存储系统920为该图像采集设备所分配的、用于存储该图像采集设备910的媒体数据的存储节点;The image collection device 910 is configured to send a storage node allocation request to the cloud storage system to obtain a second network address fed back by the cloud storage system based on the first network address, and after obtaining the second network address, based on the The second network address is used to upload the target media data to be stored in the cloud storage system 920. The second network address is a network address of the target storage node, and the target storage node is: the cloud storage system 920 collects the image. a storage node allocated by the device for storing media data of the image collection device 910;
该云存储系统920用于接收该图像采集设备910发送的存储节点分配请求,向该图像采集设备910反馈该第二网络地址;并且,存储该图像采集设备910上传的该目标媒体数据;其中,该目标媒体数据存储于该云存储系统中的该目标存储节点。The cloud storage system 920 is configured to receive the storage node allocation request sent by the image collection device 910, and feed back the second network address to the image collection device 910; and store the target media data uploaded by the image collection device 910; The target media data is stored in the target storage node in the cloud storage system.
可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
可选地,该媒体数据存储系统还可以包括:该图像采集设备对应的平台服务器;Optionally, the media data storage system may further include: a platform server corresponding to the image collection device;
该云存储系统920还用于在存储该图像采集设备910上传的该目标媒体数据之后,向该图像采集设备910反馈目标存储信息;The cloud storage system 920 is further configured to feed back the target storage information to the image collection device 910 after storing the target media data uploaded by the image collection device 910;
该图像采集设备910还用于接收该目标存储信息,并将该目标媒体数据对应的目标URL保存至该图像采集设备910对应的平台服务器;The image collection device 910 is further configured to receive the target storage information, and save the target URL corresponding to the target media data to a platform server corresponding to the image collection device 910;
其中,该目标存储信息为基于该目标媒体数据对应的存储位置所确定的信息,该目标URL为基于该目标存储信息所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
具体的,该第一网络地址具体为该云存储系统中管理节点的对外访问地址;Specifically, the first network address is specifically an external access address of the management node in the cloud storage system;
该图像采集设备910基于该第一网络地址,向该云存储系统发送存储节点分配请求,获得该云存储系统反馈的第二网络地址,具体为:The image collection device 910 sends a storage node allocation request to the cloud storage system based on the first network address, and obtains a second network address that is fed back by the cloud storage system, specifically:
该图像采集设备910在基于该第一网络地址与该管理节点建立tcp连接后,向该管理节点发送用于请求存储节点的第一http请求消息,进而,接收该管理节点反馈的该第一http回复消息,并从该第一http回复消息中提取第二网络地址;After the tcp connection is established with the management node based on the first network address, the image collection device 910 sends a first http request message for requesting the storage node to the management node, and further receives the first http feedback from the management node. Replying to the message and extracting the second network address from the first http reply message;
该云存储系统920接收该图像采集设备910发送的存储节点分配请求,向 该图像采集设备910反馈该第二网络地址,具体为:The cloud storage system 920 receives the storage node allocation request sent by the image collection device 910, and feeds back the second network address to the image collection device 910, specifically:
该管理节点在与该图像采集设备910建立tcp连接后,接收该图像采集设备910发送的用于请求分配存储节点的第一http请求消息,确定该图像采集设备对应的目标存储节点,在确定出该目标存储节点后,向该图像采集设备910反馈携带有该第二网络地址的第一http回复消息。After establishing a tcp connection with the image collection device 910, the management node receives a first http request message sent by the image collection device 910 for requesting allocation of a storage node, and determines a target storage node corresponding to the image collection device, and determines After the target storage node, the image acquisition device 910 feeds back a first http reply message carrying the second network address.
可选地,该云存储系统920中的存储节点属于至少一个虚拟资源池,该图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,该目标虚拟资源池为用于存储该图像采集设备910的媒体数据的虚拟资源池;Optionally, the storage node in the cloud storage system 920 belongs to at least one virtual resource pool, and the image collection device further stores, in advance, target ID information of the target virtual resource pool, where the target virtual resource pool is used for storing the image collection. a virtual resource pool of media data of the device 910;
该第一http请求消息携带所述目标ID信息;The first http request message carries the target ID information;
该管理节点确定所述图像采集设备对应的目标存储节点,具体为:The management node determines a target storage node corresponding to the image collection device, specifically:
该管理节点从该第一http请求消息中提取该目标ID信息;The management node extracts the target ID information from the first http request message;
从具有该目标ID信息的该目标虚拟资源池对应的存储节点中,选取该图像采集设备910对应的目标存储节点。具体的,该图像采集设备910基于该第二网络地址,将待存储的目标媒体数据上传至该云存储系统920,具体为:The target storage node corresponding to the image collection device 910 is selected from the storage node corresponding to the target virtual resource pool having the target ID information. Specifically, the image collection device 910 uploads the target media data to be stored to the cloud storage system 920 based on the second network address, specifically:
在基于该第二网络地址与该目标存储节点建立tcp连接后,将携带有待存储的目标媒体数据的第二http请求消息发送至该目标存储节点;After establishing a tcp connection with the target storage node based on the second network address, sending a second http request message carrying the target media data to be stored to the target storage node;
该云存储系统920存储该图像采集设备上传的该目标媒体数据,具体为:The cloud storage system 920 stores the target media data uploaded by the image collection device, specifically:
该目标存储节点在与该图像采集设备建立tcp连接后,接收该图像采集设备发送的第二http请求消息;After the tcp connection is established with the image collection device, the target storage node receives the second http request message sent by the image collection device.
从该第二http请求消息中提取该目标媒体数据,并存储该目标媒体数据。Extracting the target media data from the second http request message and storing the target media data.
具体的,该云存储系统920向该图像采集设备反馈目标存储信息,具体为:Specifically, the cloud storage system 920 feeds back the target storage information to the image collection device, specifically:
该目标存储节点向该图像采集设备反馈第二http回复消息,该第二http回复消息携带有目标存储信息;The target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries the target storage information;
该图像采集设备910接收该目标存储信息,具体为:The image collection device 910 receives the target storage information, specifically:
该图像采集设备910接收该目标存储节点反馈的该第二http回复消息;The image collection device 910 receives the second http reply message fed back by the target storage node;
从该第二http回复消息中提取该目标存储信息。Extracting the target storage information from the second http reply message.
可选地,该图像采集设备910基于所述第二网络地址,将待存储的目标媒 体数据上传至该云存储系统,具体为:基于该第二网络地址,将待存储的目标媒体数据和目标智能数据上传至该云存储系统920,其中,该目标智能数据为该图像采集设备从该目标媒体数据中所提取到的数据;Optionally, the image collection device 910 uploads the target media data to be stored to the cloud storage system based on the second network address, specifically: the target media data and the target to be stored based on the second network address. The smart data is uploaded to the cloud storage system 920, wherein the target smart data is data extracted by the image collecting device from the target media data;
所述云存储系统920存储该图像采集设备910上传的该目标媒体数据,具体为:The cloud storage system 920 stores the target media data uploaded by the image collection device 910, specifically:
存储该图像采集设备910上传的该目标媒体数据和该目标智能数据,其中,该目标媒体数据和该目标智能数据存储于该云存储系统中的目标存储节点。The target media data and the target smart data uploaded by the image collection device 910 are stored, wherein the target media data and the target smart data are stored in a target storage node in the cloud storage system.
可选地,该图像采集设备910将该目标媒体数据对应的目标URL保存至该图像采集设备对应的平台服务器,具体为:Optionally, the image collection device 910 saves the target URL corresponding to the target media data to the platform server corresponding to the image collection device, specifically:
将该目标媒体数据对应的目标URL和目标智能数据保存至该图像采集设备对应的平台服务器,其中,该目标智能数据为该图像采集设备从该目标媒体数据中提取到的数据。And saving the target URL and the target smart data corresponding to the target media data to a platform server corresponding to the image collection device, where the target smart data is data extracted by the image collection device from the target media data.
可选地,在一种具体实现方式中,该云存储系统920还用于:Optionally, in a specific implementation, the cloud storage system 920 is further configured to:
接收访问端基于该目标URL发送的媒体数据处理请求;其中,该访问端为该平台服务器或浏览器,该浏览器所基于的该目标URL从该平台服务器获得;Receiving, by the accessing end, a media data processing request sent by the target URL, where the accessing end is the platform server or the browser, and the target URL on which the browser is based is obtained from the platform server;
重定向该媒体数据处理请求至该目标存储节点,以由该目标存储节点执行与该媒体数据处理请求相对应的处理操作。The media data processing request is redirected to the target storage node to perform processing operations corresponding to the media data processing request by the target storage node.
具体的,该第一网络地址具体为该云存储系统920中管理节点的对外访问地址;该目标URL中包含该第一网络地址;Specifically, the first network address is specifically an external access address of the management node in the cloud storage system 920; the target URL includes the first network address;
该云存储系统920接收访问端基于该目标URL发送的媒体数据处理请求,具体为:The cloud storage system 920 receives the media data processing request sent by the access terminal based on the target URL, specifically:
该管理节点在与该访问端建立tcp连接后,接收该访问端发送的用于处理媒体数据的第三http请求消息;其中,该第三http请求消息基于该目标URL所形成;该管理节点与该访问端间的tcp连接为:该访问端基于该目标URL中的第一网络地址向该管理节点请求建立的;After establishing a tcp connection with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data; wherein the third http request message is formed based on the target URL; the management node and the management node The tcp connection between the access terminals is: the access end requests the establishment of the management node based on the first network address in the target URL;
相应的,该云存储系统920重定向该媒体数据处理请求至该目标存储节点,以由该目标存储节点执行与该媒体数据处理请求相对应的处理操作,具体为:Correspondingly, the cloud storage system 920 redirects the media data processing request to the target storage node, so that the target storage node performs a processing operation corresponding to the media data processing request, specifically:
该管理节点解析该第三http请求消息,得到该目标URL;The management node parses the third http request message to obtain the target URL;
确定该目标URL所对应的该目标存储节点;Determining the target storage node corresponding to the target URL;
确定该目标存储节点所对应的该第二网络地址;Determining the second network address corresponding to the target storage node;
将携带有该第二网络地址的第三http回复消息反馈至该访问端,以使得:该访问端基于该第三http回复消息中的第二网络地址与该目标存储节点建立tcp连接后,向该目标存储节点发送该第三http请求消息,进而,该目标存储节点对该目标媒体数据执行与该第三http请求消息相对应的处理操作。And feeding back the third http reply message carrying the second network address to the accessing end, so that: the accessing end establishes a tcp connection with the target storage node based on the second network address in the third http reply message, and then The target storage node sends the third http request message, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
可选地,该目标存储节点中存储的该目标媒体数据与目标智能数据具有对应性;其中,该目标智能数据为该目标存储节点从该目标媒体数据中所提取到的;Optionally, the target media data stored in the target storage node has a correspondence with the target smart data; wherein the target smart data is extracted by the target storage node from the target media data;
该目标存储节点对该目标媒体数据执行与第三http请求消息相对应的处理操作,具体为:The target storage node performs a processing operation corresponding to the third http request message on the target media data, specifically:
该目标存储节点对该目标媒体数据和该目标智能数据执行与该第三http请求消息相对应的处理操作。可选地,该图像采集设备910还用于:The target storage node performs a processing operation corresponding to the third http request message for the target media data and the target smart data. Optionally, the image collection device 910 is further configured to:
当该目标媒体数据上传失败时,按照预定重传策略,将该目标多媒体数据重传至该云存储系统920。When the target media data upload fails, the target multimedia data is retransmitted to the cloud storage system 920 according to a predetermined retransmission policy.
具体的,该图像采集设备910按照预定重传策略,将该目标多媒体数据重传至该云存储系统,具体为:Specifically, the image collection device 910 retransmits the target multimedia data to the cloud storage system according to a predetermined retransmission policy, specifically:
返回执行该基于所述第二网络地址,将该目标多媒体数据上传至该云存储系统的步骤。Returning to the step of uploading the target multimedia data to the cloud storage system based on the second network address.
具体的,该图像采集设备按照预定重传策略,将该目标多媒体数据重传至该云存储系统,具体为:Specifically, the image collection device retransmits the target multimedia data to the cloud storage system according to a predetermined retransmission policy, specifically:
返回执行该基于该第一网络地址,向该云存储系统920请求得到第二网络地址的步骤。Returning to the step of requesting the cloud storage system 920 to obtain a second network address based on the first network address.
需要说明的是,对于本申请实施例所提供的媒体数据存储系统的实施例而言,由于其所涉及的方法内容基于相似于前述的方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that, for the embodiment of the media data storage system provided by the embodiment of the present application, since the method content involved is based on the method embodiment similar to the foregoing, the description is relatively simple, and the related method is as follows. A part of the description of the embodiment is sufficient.
另外,为了便于方案理解,图10给出了本申请实施例所提供的媒体数据存储系统的一种应用实例的结构示意图。如图10所示,本申请实施例所提供的媒体数据存储系统中包括平台服务器、抓拍机、云存储系统,其中,云存 储系统包括若干存储节点和管理节点,该若干存储节点被划分至虚拟化资源池中;具体的,通过图10所示的媒体数据存储系统存储图片的基本过程为:(1)抓拍机拍摄图片写入云存储系统;(2)云存储系统返回图片存储的URL地址;(3)抓拍机向平台服务器返回图片存储的URL地址;(4)平台服务器将抓拍机发送的图片存储的URL地址写入数据库。可见,图10所述的媒体数据存储系统在存储图片时,采用直存方式,避免了平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。In addition, in order to facilitate the understanding of the solution, FIG. 10 is a schematic structural diagram of an application example of the media data storage system provided by the embodiment of the present application. As shown in FIG. 10, the media data storage system provided by the embodiment of the present application includes a platform server, a capture machine, and a cloud storage system, where the cloud storage system includes a plurality of storage nodes and management nodes, and the storage nodes are divided into virtual Specifically, the basic process of storing pictures through the media data storage system shown in FIG. 10 is: (1) the capture machine captures the image and writes the image to the cloud storage system; (2) the cloud storage system returns the URL address of the image storage. (3) The capture machine returns the URL address of the image storage to the platform server; (4) The platform server writes the URL address of the image stored by the capture machine to the database. It can be seen that the media data storage system in FIG. 10 adopts the direct storage mode when storing pictures, thereby avoiding the platform server being dumped to the cloud storage system, thereby reducing the consumption of network bandwidth resources and improving the efficiency of uploading media data.
第四方面,相应于上述的方法实施例,本申请实施例还提供了一种图像采集设备,如图11所示,该图像采集设备可以包括:壳体1110、处理器1120、存储器1130、电路板1140和电源电路1150,其中,电路板1140安置在壳体1110围成的空间内部,处理器1120和存储器1130设置在电路板1140上;电源电路1150,用于为各个电路或器件供电;存储器1130用于存储可执行程序代码;处理器1120通过运行存储器1130中存储的可执行程序代码,以执行媒体数据存储方法;其中,该执行媒体数据存储方法可以包括:In a fourth aspect, corresponding to the foregoing method embodiment, the embodiment of the present application further provides an image capturing device. As shown in FIG. 11 , the image capturing device may include: a housing 1110, a processor 1120, a memory 1130, and a circuit. A board 1140 and a power supply circuit 1150, wherein the circuit board 1140 is disposed inside a space surrounded by the housing 1110, the processor 1120 and the memory 1130 are disposed on the circuit board 1140; the power supply circuit 1150 is configured to supply power to each circuit or device; 1130 is configured to store executable program code; the processor 1120 executes the media data storage method by executing the executable program code stored in the memory 1130; wherein the executing the media data storage method may include:
基于预先存储的第一网络地址,向云存储系统请求得到第二网络地址;其中,所述第一网络地址为云存储系统的对外访问地址,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备分配的、用于存储所述图像采集设备的媒体数据的存储节点;And requesting, by the cloud storage system, a second network address, where the first network address is an external access address of the cloud storage system, and the second network address is a network address of the target storage node. The target storage node is: a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;
在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system. The target storage node.
其中,该图像采集设备为具有拍照功能的设备,在具体应用中,该图像采集设备可以为抓拍机或网络摄像机,当然并不局限于此。并且,该图像采集设备所采集的媒体数据包括但不局限于图片。The image collection device is a device having a camera function. In a specific application, the image capture device may be a capture camera or a network camera, which is of course not limited thereto. Moreover, the media data collected by the image collection device includes, but is not limited to, a picture.
可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
可选地,在基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统之后,所述方法还包括:Optionally, after the target media data to be stored is uploaded to the cloud storage system based on the second network address, the method further includes:
接收所述云存储系统反馈的目标存储信息;其中,所述目标存储信息为基于所述目标媒体数据对应的存储位置所确定的信息;Receiving target storage information fed back by the cloud storage system; wherein the target storage information is information determined based on a storage location corresponding to the target media data;
将所述目标媒体数据对应的目标URL保存至所述图像采集设备对应的平台服务器;其中,所述目标URL为基于所述目标存储信息所确定的信息。Saving the target URL corresponding to the target media data to a platform server corresponding to the image collection device; wherein the target URL is information determined based on the target storage information.
可选地,所述第一网络地址具体为所述云存储系统中管理节点的对外访问地址;Optionally, the first network address is specifically an external access address of a management node in the cloud storage system;
所述基于所述第一网络地址,向所述云存储系统请求得到第二网络地址的步骤,包括:The step of requesting, by the cloud storage system, the second network address, based on the first network address, includes:
在基于所述第一网络地址与所述管理节点建立tcp连接后,向所述管理节点发送用于请求存储节点的第一http请求消息,以使得:所述管理节点确定所述图像采集设备对应的目标存储节点,并在所述目标存储节点确定后,向所述图像采集设备反馈携带有第二网络地址的第一http回复消息;After establishing a tcp connection with the management node based on the first network address, sending a first http request message for requesting the storage node to the management node, so that: the management node determines that the image collection device corresponds to a target storage node, and after the target storage node determines, feed back to the image collection device a first http reply message carrying a second network address;
接收所述管理节点反馈的所述第一http回复消息,并从所述第一http回复消息中提取所述第二网络地址。Receiving the first http reply message fed back by the management node, and extracting the second network address from the first http reply message.
可选地,所述云存储系统中的存储节点属于至少一个虚拟资源池,所述图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,所述目标虚拟资源池为用于存储所述图像采集设备的媒体数据的虚拟资源池;Optionally, the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, where the target virtual resource pool is used for storage. a virtual resource pool of media data of the image capture device;
所述第一http请求消息携带所述目标ID信息;The first http request message carries the target ID information;
相应的,所述管理节点确定所述图像采集设备对应的目标存储节点的步骤,包括:Correspondingly, the step of determining, by the management node, the target storage node corresponding to the image collection device comprises:
所述管理节点从所述第一http请求消息中提取所述目标ID信息;The management node extracts the target ID information from the first http request message;
从具有所述目标ID信息的所述目标虚拟资源池对应的存储节点中,选取所述图像采集设备对应的目标存储节点。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device.
可选地,所述基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统的步骤,包括:Optionally, the step of uploading the target media data to be stored to the cloud storage system based on the second network address includes:
在基于所述第二网络地址与所述目标存储节点建立tcp连接后,将携带有待存储的目标媒体数据的第二http请求消息发送至所述目标存储节点,以使得:所述目标存储节点从所述第二http请求消息中提取所述目标媒体数据,并存储所述目标媒体数据。After establishing a tcp connection with the target storage node based on the second network address, sending a second http request message carrying the target media data to be stored to the target storage node, so that: the target storage node is Extracting the target media data in the second http request message, and storing the target media data.
可选地,所述接收所述云存储系统反馈的目标存储信息的步骤,包括:Optionally, the step of receiving the target storage information that is fed back by the cloud storage system includes:
接收所述目标存储节点反馈的第二http回复消息,所述第二http回复消息 携带所述目标存储信息;Receiving a second http reply message fed back by the target storage node, where the second http reply message carries the target storage information;
从所述第二http回复消息中提取所述目标存储信息。Extracting the target storage information from the second http reply message.
可选地,所述基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统的步骤,包括:Optionally, the step of uploading the target media data to be stored to the cloud storage system based on the second network address includes:
基于所述第二网络地址,将待存储的目标媒体数据和目标智能数据上传至所述云存储系统,其中,所述目标媒体数据和所述目标智能数据存储于所述云存储系统中的目标存储节点,所述目标智能数据为所述图像采集设备从所述目标媒体数据中所提取到的数据。Uploading target media data and target smart data to be stored to the cloud storage system based on the second network address, wherein the target media data and the target smart data are stored in a target in the cloud storage system a storage node, the target intelligent data being data extracted by the image collection device from the target media data.
可选地,所述将所述目标媒体数据对应的目标URL保存至所述图像采集设备对应的平台服务器的步骤,包括:Optionally, the step of saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device includes:
将所述目标媒体数据对应的目标URL以及目标智能数据保存至所述图像采集设备对应的平台服务器,其中,所述目标智能数据为所述图像采集设备从所述目标媒体数据中所提取到的数据。Saving the target URL corresponding to the target media data and the target smart data to a platform server corresponding to the image collection device, where the target smart data is extracted by the image collection device from the target media data data.
可选地,该媒体数据存储方法还包括:Optionally, the media data storage method further includes:
当所述目标媒体数据上传失败时,按照预定重传策略,将所述目标多媒体数据重传至所述云存储系统。When the target media data upload fails, the target multimedia data is retransmitted to the cloud storage system according to a predetermined retransmission policy.
可选地,所述按照预定重传策略,将所述目标多媒体数据重传至所述云存储系统的步骤,包括:Optionally, the step of retransmitting the target multimedia data to the cloud storage system according to a predetermined retransmission policy includes:
返回执行所述基于所述第二网络地址,将所述目标多媒体数据上传至所述云存储系统的步骤。Returning to the step of uploading the target multimedia data to the cloud storage system based on the second network address.
可选地,所述按照预定重传策略,将所述目标多媒体数据重传至所述云存储系统的步骤,包括:Optionally, the step of retransmitting the target multimedia data to the cloud storage system according to a predetermined retransmission policy includes:
返回执行所述基于所述第一网络地址,向所述云存储系统请求得到第二网络地址的步骤。Returning to the step of requesting the cloud storage system to obtain a second network address based on the first network address.
可选地,所述目标存储信息为所述目标URL;或者,所述目标存储信息为所述存储位置。Optionally, the target storage information is the target URL; or the target storage information is the storage location.
需要说明的是,对于本申请实施例所提供的图像采集设备的实施例而言,由于其所涉及的方法内容基于相似于前述的方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that, for the embodiment of the image collection device provided by the embodiment of the present application, since the method content involved is based on the method embodiment similar to the foregoing, the description is relatively simple, and the related method is referred to the method implementation. Part of the description of the example can be.
第五方面,相应于上述方法实施例,本申请实施例还提供了一种云存储系统,如图12所示,该云存储系统包括:管理节点1210和存储节点1220;其中,The fifth aspect, corresponding to the foregoing method embodiment, the embodiment of the present application further provides a cloud storage system. As shown in FIG. 12, the cloud storage system includes: a management node 1210 and a storage node 1220;
所述管理节点,用于接收图像采集设备发送的存储节点分配请求,向所述图像采集设备反馈第二网络地址,以使得:所述图像采集设备在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述存储节点分配请求为所述图像采集设备基于存储于自身的第一网络地址所发送的,所述第一网络地址为所述管理节点的对外访问地址,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;The management node is configured to receive a storage node allocation request sent by the image collection device, and feed back a second network address to the image collection device, so that: after obtaining the second network address, the image collection device is based on the Transmitting the target media data to be stored to the cloud storage system, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself, The first network address is an external access address of the management node, the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system is allocated by the image collection device, a storage node for storing media data of the image capture device;
所述目标存储节点,用于存储所述图像采集设备上传的所述目标媒体数据。The target storage node is configured to store the target media data uploaded by the image collection device.
可见,本方案通过直存方式来存储图像采集设备的媒体数据,避免了由平台服务器转存至云存储系统,因此,可以降低网络带宽资源的消耗以及提高媒体数据上传效率。It can be seen that the solution stores the media data of the image collection device through the direct storage mode, thereby avoiding the dumping of the platform server to the cloud storage system, thereby reducing the consumption of the network bandwidth resource and improving the efficiency of uploading the media data.
可选地,所述目标存储节点,还用于存储所述图像采集设备上传的所述目标媒体数据之后,向所述图像采集设备反馈目标存储信息,以使得:所述图像采集设备接收到所述目标存储信息后,将所述目标媒体数据对应的目标URL保存至所述图像采集设备对应的平台服务器;Optionally, the target storage node is further configured to: after storing the target media data uploaded by the image collection device, feed back the target storage information to the image collection device, so that: the image collection device receives the location After the target storage information is stored, the target URL corresponding to the target media data is saved to a platform server corresponding to the image collection device;
其中,所述目标存储信息为基于所述目标媒体数据对应的存储位置所确定的信息,所述目标URL为基于所述目标存储信息所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
可选地,所述管理节点接收图像采集设备发送的存储节点分配请求,具体为:Optionally, the management node receives the storage node allocation request sent by the image collection device, specifically:
所述管理节点在与所述图像采集设备建立tcp连接后,接收所述图像采集设备发送的用于请求分配存储节点的第一http请求消息;其中,所述管理节点与所述图像采集设备间的tcp连接为:所述图像采集设备基于所述第一网络地址向所述管理节点请求建立的;After the Tcp connection is established with the image collection device, the management node receives a first http request message sent by the image collection device for requesting allocation of a storage node, where the management node and the image collection device The tcp connection is: the image collection device requests the establishment of the management node based on the first network address;
相应的,所述管理节点向所述图像采集设备反馈第二网络地址,具体为:Correspondingly, the management node feeds back the second network address to the image collection device, specifically:
所述管理节点确定所述图像采集设备对应的目标存储节点;Determining, by the management node, a target storage node corresponding to the image collection device;
在确定出所述目标存储节点后,向所述图像采集设备反馈携带有第二网络地址的第一http回复消息。After the target storage node is determined, the first http reply message carrying the second network address is fed back to the image collection device.
可选地,所述云存储系统中的存储节点属于至少一个虚拟资源池,所述图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,所述目标虚拟资源池为用于存储所述图像采集设备的媒体数据的虚拟资源池;Optionally, the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool, where the target virtual resource pool is used for storage. a virtual resource pool of media data of the image capture device;
所述第一http请求消息携带所述目标ID信息;The first http request message carries the target ID information;
所述管理节点确定所述图像采集设备对应的目标存储节点,具体为:The management node determines a target storage node corresponding to the image collection device, specifically:
所述管理节点从所述第一http请求消息中提取所述目标ID信息;The management node extracts the target ID information from the first http request message;
从具有所述目标ID信息的所述目标虚拟资源池对应的存储节点中,选取所述图像采集设备对应的目标存储节点。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device.
可选地,所述目标存储节点存储所述图像采集设备上传的所述目标媒体数据,具体为:Optionally, the target storage node stores the target media data uploaded by the image collection device, specifically:
所述目标存储节点在与所述图像采集设备建立tcp连接后,接收所述图像采集设备发送的第二http请求消息;其中,所述第二http请求消息携带有待存储的目标媒体数据,所述目标存储节点与所述图像采集设备间的tcp连接为:所述图像采集设备基于所述第二网络地址向所述目标存储节点请求建立的;Receiving, by the target storage node, a second http request message sent by the image collection device after establishing a tcp connection with the image collection device, where the second http request message carries target media data to be stored, The tcp connection between the target storage node and the image collection device is: the image collection device requests to establish the target storage node based on the second network address;
从所述第二http请求消息中提取所述目标媒体数据,并存储所述目标媒体数据。Extracting the target media data from the second http request message and storing the target media data.
可选地,所述目标存储节点向所述图像采集设备反馈目标存储信息,具体为:Optionally, the target storage node feeds back the target storage information to the image collection device, specifically:
所述目标存储节点向所述图像采集设备反馈第二http回复消息,所述第二http回复消息携带有目标存储信息。The target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries target storage information.
可选地,所述图像采集设备基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统,包括:Optionally, the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address, including:
所述图像采集设备基于所述第二网络地址,将待存储的目标媒体数据和目标智能数据上传至所述云存储系统;其中,所述目标智能数据为所述图像采集设备从所述目标媒体数据中所提取到的数据;And the image collection device uploads the target media data and the target smart data to be stored to the cloud storage system based on the second network address; wherein the target smart data is the image collection device from the target media Data extracted from the data;
相应的,所述目标存储节点存储所述图像采集设备上传的所述目标媒体数据,具体为:Correspondingly, the target storage node stores the target media data uploaded by the image collection device, specifically:
所述目标存储节点存储所述图像采集设备上传的所述目标媒体数据和所述目标智能数据,其中,所述目标媒体数据和所述目标智能数据存储于所述云存储系统中的所述目标存储节点。The target storage node stores the target media data and the target smart data uploaded by the image collection device, wherein the target media data and the target smart data are stored in the target in the cloud storage system Storage node.
可选地,所述管理节点还用于:接收访问端基于所述目标URL发送的媒体数据处理请求;其中,所述访问端为所述平台服务器或浏览器,所述浏览器所基于的所述目标URL从所述平台服务器获得;Optionally, the management node is further configured to: receive a media data processing request sent by the access terminal based on the target URL; where the access end is the platform server or a browser, where the browser is based The target URL is obtained from the platform server;
重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作。Redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node.
可选地,所述目标URL中包含所述第一网络地址;Optionally, the target URL includes the first network address;
所述管理节点接收访问端基于所述目标URL发送的媒体数据处理请求,具体为:The management node receives a media data processing request sent by the access terminal based on the target URL, specifically:
所述管理节点在与所述访问端建立tcp连接后,接收所述访问端发送的用于处理媒体数据的第三http请求消息;其中,所述第三http请求消息基于所述目标URL所形成;所述管理节点与所述访问端间的tcp连接为:所述访问端基于所述目标URL中的第一网络地址向所述管理节点请求建立的;After the Tcp connection is established with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data, where the third http request message is formed based on the target URL. The tcp connection between the management node and the access terminal is: the access end requests the establishment of the management node based on the first network address in the target URL;
相应的,所述管理节点重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作,具体为:Correspondingly, the management node redirects the media data processing request to the target storage node, so that the target storage node performs a processing operation corresponding to the media data processing request, specifically:
所述管理节点解析所述第三http请求消息,得到所述目标URL;The management node parses the third http request message to obtain the target URL;
确定所述目标URL所对应的所述目标存储节点;Determining the target storage node corresponding to the target URL;
确定所述目标存储节点所对应的所述第二网络地址;Determining the second network address corresponding to the target storage node;
将携带有所述第二网络地址的第三http回复消息反馈至所述访问端,以使得:所述访问端基于所述第三http回复消息中的第二网络地址与所述目标存储节点建立tcp连接后,向所述目标存储节点发送所述第三http请求消息,进而,所述目标存储节点对所述目标媒体数据执行与所述第三http请求消息相对应的处理操作。And feeding back, to the access end, a third http reply message carrying the second network address, so that: the access end establishes with the target storage node based on a second network address in the third http reply message After the tcp is connected, the third http request message is sent to the target storage node, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
可选地,所述目标存储节点中存储的所述目标媒体数据与目标智能数据具有对应性;其中,所述目标智能数据为从所述目标媒体数据中所提取到的数据;Optionally, the target media data stored in the target storage node has a correspondence with the target smart data; wherein the target smart data is data extracted from the target media data;
所述目标存储节点对所述目标媒体数据执行与第三http请求消息相对应的处理操作,具体为:The target storage node performs a processing operation corresponding to the third http request message on the target media data, specifically:
所述目标存储节点对所述目标媒体数据和所述目标智能数据执行与所述第三http请求消息相对应的处理操作。The target storage node performs a processing operation corresponding to the third http request message to the target media data and the target smart data.
需要说明的是,对于本申请实施例所提供的云存储系统的实施例而言,由于其所涉及的方法内容基于相似于前述的方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that, for the embodiment of the cloud storage system provided by the embodiment of the present application, since the method content involved is based on the method embodiment similar to the foregoing, the description is relatively simple, and the related method is referred to the method implementation. Part of the description of the example can be.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above description is only the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application are included in the scope of the present application.
Claims (36)
- 一种媒体数据存储方法,其特征在于,应用于图像采集设备,所述图像采集设备中预先存储有第一网络地址,所述第一网络地址为云存储系统的对外访问地址;所述方法包括:A media data storage method, which is characterized in that it is applied to an image acquisition device, wherein the image acquisition device pre-stores a first network address, where the first network address is an external access address of the cloud storage system; :基于所述第一网络地址,向所述云存储系统请求得到第二网络地址;其中,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备分配的、用于存储所述图像采集设备的媒体数据的存储节点;And requesting, by the cloud storage system, a second network address, where the second network address is a network address of the target storage node, where the target storage node is: the cloud storage system is a storage node allocated by the image collection device for storing media data of the image collection device;在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。After the second network address is obtained, the target media data to be stored is uploaded to the cloud storage system based on the second network address; wherein the target media data is stored in the cloud storage system. The target storage node.
- 根据权利要求1所述的方法,其特征在于,在基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统之后,所述方法还包括:The method according to claim 1, wherein after the target media data to be stored is uploaded to the cloud storage system based on the second network address, the method further includes:接收所述云存储系统反馈的目标存储信息;其中,所述目标存储信息为基于所述目标媒体数据对应的存储位置所确定的信息;Receiving target storage information fed back by the cloud storage system; wherein the target storage information is information determined based on a storage location corresponding to the target media data;将所述目标媒体数据对应的目标统一资源定位符URL保存至所述图像采集设备对应的平台服务器;其中,所述目标URL为基于所述目标存储信息所确定的信息。Saving the target uniform resource locator URL corresponding to the target media data to a platform server corresponding to the image collection device; wherein the target URL is information determined based on the target storage information.
- 根据权利要求1或2所述的方法,其特征在于,所述第一网络地址具体为所述云存储系统中管理节点的对外访问地址;The method according to claim 1 or 2, wherein the first network address is specifically an external access address of a management node in the cloud storage system;所述基于所述第一网络地址,向所述云存储系统请求得到第二网络地址的步骤,包括:The step of requesting, by the cloud storage system, the second network address, based on the first network address, includes:在基于所述第一网络地址与所述管理节点建立传输控制协议tcp连接后,向所述管理节点发送用于请求存储节点的第一http请求消息,以使得:所述管理节点确定所述图像采集设备对应的目标存储节点,并在所述目标存储节点确定后,向所述图像采集设备反馈携带有第二网络地址的第一http回复消息;After establishing a transmission control protocol tcp connection with the management node based on the first network address, sending a first http request message for requesting the storage node to the management node, so that: the management node determines the image Collecting a target storage node corresponding to the device, and after determining by the target storage node, feeding back, to the image collection device, a first http reply message carrying a second network address;接收所述管理节点反馈的所述第一http回复消息,并从所述第一http回复消息中提取所述第二网络地址。Receiving the first http reply message fed back by the management node, and extracting the second network address from the first http reply message.
- 根据权利要求3所述的方法,其特征在于,所述云存储系统中的存储节点属于至少一个虚拟资源池,所述图像采集设备中还预先存储有目标虚拟 资源池的目标ID信息,所述目标虚拟资源池为用于存储所述图像采集设备的媒体数据的虚拟资源池;The method according to claim 3, wherein the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool in advance, The target virtual resource pool is a virtual resource pool for storing media data of the image collection device;所述第一http请求消息携带所述目标ID信息;The first http request message carries the target ID information;相应的,所述管理节点确定所述图像采集设备对应的目标存储节点的步骤,包括:Correspondingly, the step of determining, by the management node, the target storage node corresponding to the image collection device comprises:所述管理节点从所述第一http请求消息中提取所述目标ID信息;The management node extracts the target ID information from the first http request message;从具有所述目标ID信息的所述目标虚拟资源池对应的存储节点中,选取所述图像采集设备对应的目标存储节点。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device.
- 根据权利要求1或2所述的方法,其特征在于,所述基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统的步骤,包括:The method according to claim 1 or 2, wherein the step of uploading the target media data to be stored to the cloud storage system based on the second network address comprises:在基于所述第二网络地址与所述目标存储节点建立tcp连接后,将携带有待存储的目标媒体数据的第二http请求消息发送至所述目标存储节点,以使得:所述目标存储节点从所述第二http请求消息中提取所述目标媒体数据,并存储所述目标媒体数据。After establishing a tcp connection with the target storage node based on the second network address, sending a second http request message carrying the target media data to be stored to the target storage node, so that: the target storage node is Extracting the target media data in the second http request message, and storing the target media data.
- 根据权利要求5所述的方法,其特征在于,所述接收所述云存储系统反馈的目标存储信息的步骤,包括:The method according to claim 5, wherein the step of receiving the target storage information fed back by the cloud storage system comprises:接收所述目标存储节点反馈的第二http回复消息,所述第二http回复消息携带所述目标存储信息;Receiving a second http reply message fed back by the target storage node, where the second http reply message carries the target storage information;从所述第二http回复消息中提取所述目标存储信息。Extracting the target storage information from the second http reply message.
- 根据权利要求1或2所述的方法,其特征在于,所述基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统的步骤,包括:The method according to claim 1 or 2, wherein the step of uploading the target media data to be stored to the cloud storage system based on the second network address comprises:基于所述第二网络地址,将待存储的目标媒体数据和目标智能数据上传至所述云存储系统,其中,所述目标媒体数据和所述目标智能数据存储于所述云存储系统中的目标存储节点,所述目标智能数据为所述图像采集设备从所述目标媒体数据中所提取到的数据。Uploading target media data and target smart data to be stored to the cloud storage system based on the second network address, wherein the target media data and the target smart data are stored in a target in the cloud storage system a storage node, the target intelligent data being data extracted by the image collection device from the target media data.
- 根据权利要求2所述的方法,其特征在于,所述将所述目标媒体数据对应的目标URL保存至所述图像采集设备对应的平台服务器的步骤,包括:The method according to claim 2, wherein the step of saving the target URL corresponding to the target media data to the platform server corresponding to the image collection device comprises:将所述目标媒体数据对应的目标URL以及目标智能数据保存至所述图像采集设备对应的平台服务器,其中,所述目标智能数据为所述图像采集设备 从所述目标媒体数据中所提取到的数据。Saving the target URL corresponding to the target media data and the target smart data to a platform server corresponding to the image collection device, where the target smart data is extracted by the image collection device from the target media data data.
- 根据权利要求1或2所述的方法,其特征在于,还包括:The method according to claim 1 or 2, further comprising:当所述目标媒体数据上传失败时,按照预定重传策略,将所述目标多媒体数据重传至所述云存储系统。When the target media data upload fails, the target multimedia data is retransmitted to the cloud storage system according to a predetermined retransmission policy.
- 根据权利要求9所述的方法,其特征在于,所述按照预定重传策略,将所述目标多媒体数据重传至所述云存储系统的步骤,包括:The method according to claim 9, wherein the step of retransmitting the target multimedia data to the cloud storage system according to a predetermined retransmission policy comprises:返回执行所述基于所述第二网络地址,将所述目标多媒体数据上传至所述云存储系统的步骤。Returning to the step of uploading the target multimedia data to the cloud storage system based on the second network address.
- 根据权利要求9所述的方法,其特征在于,所述按照预定重传策略,将所述目标多媒体数据重传至所述云存储系统的步骤,包括:The method according to claim 9, wherein the step of retransmitting the target multimedia data to the cloud storage system according to a predetermined retransmission policy comprises:返回执行所述基于所述第一网络地址,向所述云存储系统请求得到第二网络地址的步骤。Returning to the step of requesting the cloud storage system to obtain a second network address based on the first network address.
- 根据权利要求2所述的方法,其特征在于,所述目标存储信息为所述目标URL;或者,所述目标存储信息为所述存储位置。The method according to claim 2, wherein the target storage information is the target URL; or the target storage information is the storage location.
- 一种媒体数据存储方法,其特征在于,应用于云存储系统;所述方法包括:A media data storage method is characterized in that it is applied to a cloud storage system; the method includes:接收图像采集设备发送的存储节点分配请求,其中,所述存储节点分配请求为所述图像采集设备基于存储于自身的第一网络地址所发送的,所述第一网络地址为云存储系统的对外访问地址;Receiving a storage node allocation request sent by the image collection device, where the storage node allocation request is sent by the image collection device based on a first network address stored in the first network address, and the first network address is external to the cloud storage system. address;向所述图像采集设备反馈第二网络地址,以使得:所述图像采集设备在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;Retrieving the second network address to the image collection device, so that: after obtaining the second network address, the image collection device uploads target media data to be stored to the cloud based on the second network address a storage system, wherein the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system is allocated by the image collection device for storing the image collection device. a storage node for media data;并且,存储所述图像采集设备上传的所述目标媒体数据;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。And storing the target media data uploaded by the image collection device; wherein the target media data is stored in the target storage node in the cloud storage system.
- 根据权利要求13所述的方法,其特征在于,所述存储所述图像采集设备上传的所述目标媒体数据之后,所述方法还包括:The method according to claim 13, wherein after the storing the target media data uploaded by the image collection device, the method further comprises:向所述图像采集设备反馈目标存储信息,以使得:所述图像采集设备接 收到所述目标存储信息后,将所述目标媒体数据对应的目标统一资源定位符URL保存至所述图像采集设备对应的平台服务器;Returning the target storage information to the image collection device, so that after the image collection device receives the target storage information, the target uniform resource locator URL corresponding to the target media data is saved to the image collection device. Platform server;其中,所述目标存储信息为基于所述目标媒体数据对应的存储位置所确定的信息,所述目标URL为基于所述目标存储信息所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
- 根据权利要求13或14所述的方法,其特征在于,所述第一网络地址具体为所述云存储系统中管理节点的对外访问地址;The method according to claim 13 or 14, wherein the first network address is specifically an external access address of a management node in the cloud storage system;所述接收图像采集设备发送的存储节点分配请求的步骤,包括:The step of receiving a storage node allocation request sent by the image collection device includes:所述管理节点在与所述图像采集设备建立传输控制协议tcp连接后,接收所述图像采集设备发送的用于请求分配存储节点的第一http请求消息;其中,所述管理节点与所述图像采集设备间的tcp连接为:所述图像采集设备基于所述第一网络地址向所述管理节点请求建立的;The management node receives a first http request message sent by the image collection device for requesting allocation of a storage node after establishing a transmission control protocol tcp with the image collection device; wherein the management node and the image The tcp connection between the collection devices is: the image collection device requests the establishment of the management node based on the first network address;相应的,所述向所述图像采集设备反馈第二网络地址的步骤,包括:Correspondingly, the step of feeding back the second network address to the image collection device includes:所述管理节点确定所述图像采集设备对应的目标存储节点;Determining, by the management node, a target storage node corresponding to the image collection device;在确定出所述目标存储节点后,向所述图像采集设备反馈携带有第二网络地址的第一http回复消息。After the target storage node is determined, the first http reply message carrying the second network address is fed back to the image collection device.
- 根据权利要求15所述的方法,其特征在于,所述云存储系统中的存储节点属于至少一个虚拟资源池,所述图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,所述目标虚拟资源池为用于存储所述图像采集设备的媒体数据的虚拟资源池;The method according to claim 15, wherein the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool in advance, The target virtual resource pool is a virtual resource pool for storing media data of the image collection device;所述第一http请求消息携带所述目标ID信息;The first http request message carries the target ID information;所述管理节点确定所述图像采集设备对应的目标存储节点的步骤,包括:The step of the management node determining the target storage node corresponding to the image collection device includes:所述管理节点从所述第一http请求消息中提取所述目标ID信息;The management node extracts the target ID information from the first http request message;从具有所述目标ID信息的所述目标虚拟资源池对应的存储节点中,选取所述图像采集设备对应的目标存储节点。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device.
- 根据权利要求13或14所述的方法,其特征在于,所述存储所述图像采集设备上传的所述目标媒体数据的步骤,包括:The method according to claim 13 or 14, wherein the step of storing the target media data uploaded by the image collection device comprises:所述目标存储节点在与所述图像采集设备建立tcp连接后,接收所述图像采集设备发送的第二http请求消息;其中,所述第二http请求消息携带有待存 储的目标媒体数据,所述目标存储节点与所述图像采集设备间的tcp连接为:所述图像采集设备基于所述第二网络地址向所述目标存储节点请求建立的;Receiving, by the target storage node, a second http request message sent by the image collection device after establishing a tcp connection with the image collection device, where the second http request message carries target media data to be stored, The tcp connection between the target storage node and the image collection device is: the image collection device requests to establish the target storage node based on the second network address;从所述第二http请求消息中提取所述目标媒体数据,并存储所述目标媒体数据。Extracting the target media data from the second http request message and storing the target media data.
- 根据权利要求17所述的方法,其特征在于,所述向所述图像采集设备反馈目标存储信息的步骤,包括:The method according to claim 17, wherein the step of feeding back the target storage information to the image collection device comprises:所述目标存储节点向所述图像采集设备反馈第二http回复消息,所述第二http回复消息携带有目标存储信息。The target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries target storage information.
- 根据权利要求13或14所述的方法,其特征在于,所述图像采集设备基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统,包括:The method according to claim 13 or 14, wherein the image capturing device uploads the target media data to be stored to the cloud storage system based on the second network address, including:所述图像采集设备基于所述第二网络地址,将待存储的目标媒体数据和目标智能数据上传至所述云存储系统;其中,所述目标智能数据为所述图像采集设备从所述目标媒体数据中所提取到的数据;And the image collection device uploads the target media data and the target smart data to be stored to the cloud storage system based on the second network address; wherein the target smart data is the image collection device from the target media Data extracted from the data;相应的,所述存储所述图像采集设备上传的所述目标媒体数据的步骤,包括:Correspondingly, the step of storing the target media data uploaded by the image collection device includes:存储所述图像采集设备上传的所述目标媒体数据和所述目标智能数据,其中,所述目标媒体数据和所述目标智能数据存储于所述云存储系统中的所述目标存储节点。And storing the target media data and the target smart data uploaded by the image collection device, where the target media data and the target smart data are stored in the target storage node in the cloud storage system.
- 根据权利要求14所述的方法,其特征在于,还包括:The method of claim 14 further comprising:接收访问端基于所述目标URL发送的媒体数据处理请求;其中,所述访问端为所述平台服务器或浏览器,所述浏览器所基于的所述目标URL从所述平台服务器获得;Receiving, by the accessing end, a media data processing request sent by the target URL, where the accessing end is the platform server or a browser, and the target URL on which the browser is based is obtained from the platform server;重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作。Redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node.
- 根据权利要求20所述的方法,其特征在于,所述第一网络地址具体为所述云存储系统中管理节点的对外访问地址;所述目标URL中包含所述第一网络地址;The method according to claim 20, wherein the first network address is specifically an external access address of a management node in the cloud storage system; and the target URL includes the first network address;所述接收访问端基于所述目标URL发送的媒体数据处理请求的步骤,包 括:And the step of receiving, by the receiving access end, a media data processing request sent by the target URL, including:所述管理节点在与所述访问端建立tcp连接后,接收所述访问端发送的用于处理媒体数据的第三http请求消息;其中,所述第三http请求消息基于所述目标URL所形成;所述管理节点与所述访问端间的tcp连接为:所述访问端基于所述目标URL中的第一网络地址向所述管理节点请求建立的;After the Tcp connection is established with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data, where the third http request message is formed based on the target URL. The tcp connection between the management node and the access terminal is: the access end requests the establishment of the management node based on the first network address in the target URL;相应的,所述重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作的步骤,包括:Correspondingly, the step of redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node comprises:所述管理节点解析所述第三http请求消息,得到所述目标URL;The management node parses the third http request message to obtain the target URL;确定所述目标URL所对应的所述目标存储节点;Determining the target storage node corresponding to the target URL;确定所述目标存储节点所对应的所述第二网络地址;Determining the second network address corresponding to the target storage node;将携带有所述第二网络地址的第三http回复消息反馈至所述访问端,以使得:所述访问端基于所述第三http回复消息中的第二网络地址与所述目标存储节点建立tcp连接后,向所述目标存储节点发送所述第三http请求消息,进而,所述目标存储节点对所述目标媒体数据执行与所述第三http请求消息相对应的处理操作。And feeding back, to the access end, a third http reply message carrying the second network address, so that: the access end establishes with the target storage node based on a second network address in the third http reply message After the tcp is connected, the third http request message is sent to the target storage node, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
- 根据权利要求21所述的方法,其特征在于,所述目标存储节点中存储的所述目标媒体数据与目标智能数据具有对应性;其中,所述目标智能数据为从所述目标媒体数据中所提取到的数据;The method according to claim 21, wherein the target media data stored in the target storage node has a correspondence with target smart data; wherein the target smart data is from the target media data. Extracted data;所述目标存储节点对所述目标媒体数据执行与第三http请求消息相对应的处理操作,包括:The target storage node performs a processing operation corresponding to the third http request message on the target media data, including:所述目标存储节点对所述目标媒体数据和所述目标智能数据执行与所述第三http请求消息相对应的处理操作。The target storage node performs a processing operation corresponding to the third http request message to the target media data and the target smart data.
- 一种媒体数据存储系统,其特征在于,包括:图像采集设备和云存储系统,所述图像采集设备中预先存储有第一网络地址,所述第一网络地址为云存储系统的对外访问地址;A media data storage system, comprising: an image collection device and a cloud storage system, wherein the image collection device pre-stores a first network address, where the first network address is an external access address of the cloud storage system;所述图像采集设备用于基于所述第一网络地址,向所述云存储系统发送存储节点分配请求,获得所述云存储系统反馈的第二网络地址;并且,在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据 上传至所述云存储系统;其中,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;The image collection device is configured to send, according to the first network address, a storage node allocation request to the cloud storage system, obtain a second network address fed back by the cloud storage system, and obtain the second network address. And uploading the target media data to be stored to the cloud storage system, where the second network address is a network address of the target storage node, and the target storage node is: a storage node allocated by the cloud storage system to the image collection device for storing media data of the image collection device;所述云存储系统用于接收所述图像采集设备发送的存储节点分配请求,向所述图像采集设备反馈所述第二网络地址;并且,存储所述图像采集设备上传的所述目标媒体数据;其中,所述目标媒体数据存储于所述云存储系统中的所述目标存储节点。The cloud storage system is configured to receive a storage node allocation request sent by the image collection device, and feed back the second network address to the image collection device; and store the target media data uploaded by the image collection device; The target media data is stored in the target storage node in the cloud storage system.
- 根据权利要求23所述的媒体数据存储系统,其特征在于,所述媒体数据存储系统还包括:所述图像采集设备对应的平台服务器;The media data storage system according to claim 23, wherein the media data storage system further comprises: a platform server corresponding to the image collection device;所述云存储系统还用于在存储所述图像采集设备上传的所述目标媒体数据之后,向所述图像采集设备反馈目标存储信息;The cloud storage system is further configured to feed back the target storage information to the image collection device after storing the target media data uploaded by the image collection device;所述图像采集设备还用于接收所述目标存储信息,并将所述目标媒体数据对应的目标统一资源定位符URL保存至所述图像采集设备对应的平台服务器;The image collection device is further configured to receive the target storage information, and save the target uniform resource locator URL corresponding to the target media data to a platform server corresponding to the image collection device;其中,所述目标存储信息为基于所述目标媒体数据对应的存储位置所确定的信息,所述目标URL为基于所述目标存储信息所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
- 根据权利要求23或24所述的媒体数据存储系统,其特征在于,所述第一网络地址具体为所述云存储系统中管理节点的对外访问地址;The media data storage system according to claim 23 or 24, wherein the first network address is specifically an external access address of a management node in the cloud storage system;所述图像采集设备基于所述第一网络地址,向所述云存储系统发送存储节点分配请求,获得所述云存储系统反馈的第二网络地址,具体为:The image collection device sends a storage node allocation request to the cloud storage system based on the first network address, and obtains a second network address that is fed back by the cloud storage system, specifically:所述图像采集设备在基于所述第一网络地址与所述管理节点建立传输控制协议tcp连接后,向所述管理节点发送用于请求存储节点的第一http请求消息,进而,接收所述管理节点反馈的所述第一http回复消息,并从所述第一http回复消息中提取第二网络地址;After the image collection device establishes a transmission control protocol tcp connection with the management node based on the first network address, the image acquisition device sends a first http request message for requesting the storage node to the management node, and further, receives the management. The first http reply message fed back by the node, and extracting a second network address from the first http reply message;所述云存储系统接收所述图像采集设备发送的存储节点分配请求,向所述图像采集设备反馈所述第二网络地址,具体为:Receiving, by the cloud storage system, a storage node allocation request sent by the image collection device, and feeding back the second network address to the image collection device, specifically:所述管理节点在与所述图像采集设备建立tcp连接后,接收所述图像采集设备发送的用于请求分配存储节点的第一http请求消息,确定所述图像采集设备对应的目标存储节点,在确定出所述目标存储节点后,向所述图像采集设备反馈携带有所述第二网络地址的第一http回复消息。After the Tcp connection is established with the image collection device, the management node receives a first http request message sent by the image collection device for requesting allocation of a storage node, and determines a target storage node corresponding to the image collection device. After the target storage node is determined, the first http reply message carrying the second network address is fed back to the image collection device.
- 根据权利要求25所述的媒体数据存储系统,其特征在于,所述云存储系统中的存储节点属于至少一个虚拟资源池,所述图像采集设备中还预先存储有目标虚拟资源池的目标ID信息,所述目标虚拟资源池为用于存储所述图像采集设备的媒体数据的虚拟资源池;The media data storage system according to claim 25, wherein the storage node in the cloud storage system belongs to at least one virtual resource pool, and the image collection device further stores target ID information of the target virtual resource pool in advance. The target virtual resource pool is a virtual resource pool for storing media data of the image collection device;所述第一http请求消息携带所述目标ID信息;The first http request message carries the target ID information;所述管理节点确定所述图像采集设备对应的目标存储节点,具体为:The management node determines a target storage node corresponding to the image collection device, specifically:所述管理节点从所述第一http请求消息中提取所述目标ID信息;The management node extracts the target ID information from the first http request message;从具有所述目标ID信息的所述目标虚拟资源池对应的存储节点中,选取所述图像采集设备对应的目标存储节点。And selecting, from the storage node corresponding to the target virtual resource pool having the target ID information, a target storage node corresponding to the image collection device.
- 根据权利要求23或24所述的媒体数据存储系统,其特征在于,所述图像采集设备基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统,具体为:The media data storage system according to claim 23 or 24, wherein the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address, specifically:在基于所述第二网络地址与所述目标存储节点建立tcp连接后,将携带有待存储的目标媒体数据的第二http请求消息发送至所述目标存储节点;After establishing a tcp connection with the target storage node based on the second network address, sending a second http request message carrying the target media data to be stored to the target storage node;所述云存储系统存储所述图像采集设备上传的所述目标媒体数据,具体为:The cloud storage system stores the target media data uploaded by the image collection device, specifically:所述目标存储节点在与所述图像采集设备建立tcp连接后,接收所述图像采集设备发送的第二http请求消息;Receiving, by the target storage node, a second http request message sent by the image collection device after establishing a tcp connection with the image collection device;从所述第二http请求消息中提取所述目标媒体数据,并存储所述目标媒体数据。Extracting the target media data from the second http request message and storing the target media data.
- 根据权利要求27所述的媒体数据存储系统,其特征在于,所述云存储系统向所述图像采集设备反馈目标存储信息,具体为:The media data storage system according to claim 27, wherein the cloud storage system feeds back the target storage information to the image collection device, specifically:所述目标存储节点向所述图像采集设备反馈第二http回复消息,所述第二http回复消息携带有目标存储信息;The target storage node feeds back a second http reply message to the image collection device, where the second http reply message carries target storage information;所述图像采集设备接收所述目标存储信息,具体为:The image collection device receives the target storage information, specifically:所述图像采集设备接收所述目标存储节点反馈的所述第二http回复消息;The image collection device receives the second http reply message fed back by the target storage node;从所述第二http回复消息中提取所述目标存储信息。Extracting the target storage information from the second http reply message.
- 根据权利要求23或24所述的媒体数据存储系统,其特征在于,所述 图像采集设备基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统,具体为:基于所述第二网络地址,将待存储的目标媒体数据和目标智能数据上传至所述云存储系统,其中,所述目标智能数据为所述图像采集设备从所述目标媒体数据中所提取到的数据;The media data storage system according to claim 23 or 24, wherein the image collection device uploads the target media data to be stored to the cloud storage system based on the second network address, specifically: based on Uploading, by the second network address, the target media data and the target smart data to be stored to the cloud storage system, where the target smart data is extracted by the image collection device from the target media data data;所述云存储系统存储所述图像采集设备上传的所述目标媒体数据,具体为:The cloud storage system stores the target media data uploaded by the image collection device, specifically:存储所述图像采集设备上传的所述目标媒体数据和所述目标智能数据,其中,所述目标媒体数据和所述目标智能数据存储于所述云存储系统中的目标存储节点。And storing the target media data and the target smart data uploaded by the image collection device, where the target media data and the target smart data are stored in a target storage node in the cloud storage system.
- 根据权利要求24所述的媒体数据存储系统,其特征在于,所述图像采集设备将所述目标媒体数据对应的目标URL保存至所述图像采集设备对应的平台服务器,具体为:The media data storage system according to claim 24, wherein the image collection device saves the target URL corresponding to the target media data to a platform server corresponding to the image collection device, specifically:将所述目标媒体数据对应的目标URL和目标智能数据保存至所述图像采集设备对应的平台服务器,其中,所述目标智能数据为所述图像采集设备从所述目标媒体数据中提取到的数据。Saving the target URL and the target smart data corresponding to the target media data to a platform server corresponding to the image collection device, where the target smart data is data extracted by the image collection device from the target media data .
- 根据权利要求24所述的媒体数据存储系统,其特征在于,所述云存储系统还用于:The media data storage system according to claim 24, wherein the cloud storage system is further configured to:接收访问端基于所述目标URL发送的媒体数据处理请求;其中,所述访问端为所述平台服务器或浏览器,所述浏览器所基于的所述目标URL从所述平台服务器获得;Receiving, by the accessing end, a media data processing request sent by the target URL, where the accessing end is the platform server or a browser, and the target URL on which the browser is based is obtained from the platform server;重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作。Redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node.
- 根据权利要求31所述的媒体数据存储系统,其特征在于,所述第一网络地址具体为所述云存储系统中管理节点的对外访问地址;所述目标URL中包含所述第一网络地址;The media data storage system according to claim 31, wherein the first network address is specifically an external access address of a management node in the cloud storage system; and the target URL includes the first network address;所述云存储系统接收访问端基于所述目标URL发送的媒体数据处理请求,具体为:The cloud storage system receives a media data processing request sent by the access terminal based on the target URL, specifically:所述管理节点在与所述访问端建立tcp连接后,接收所述访问端发送的用于处理媒体数据的第三http请求消息;其中,所述第三http请求消息基于所述目标URL所形成;所述管理节点与所述访问端间的tcp连接为:所述访问端基 于所述目标URL中的第一网络地址向所述管理节点请求建立的;After the Tcp connection is established with the access terminal, the management node receives a third http request message sent by the access terminal for processing media data, where the third http request message is formed based on the target URL. The tcp connection between the management node and the access terminal is: the access end requests the establishment of the management node based on the first network address in the target URL;相应的,所述云存储系统重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作,具体为:Correspondingly, the cloud storage system redirects the media data processing request to the target storage node, so that the target storage node performs a processing operation corresponding to the media data processing request, specifically:所述管理节点解析所述第三http请求消息,得到所述目标URL;The management node parses the third http request message to obtain the target URL;确定所述目标URL所对应的所述目标存储节点;Determining the target storage node corresponding to the target URL;确定所述目标存储节点所对应的所述第二网络地址;Determining the second network address corresponding to the target storage node;将携带有所述第二网络地址的第三http回复消息反馈至所述访问端,以使得:所述访问端基于所述第三http回复消息中的第二网络地址与所述目标存储节点建立tcp连接后,向所述目标存储节点发送所述第三http请求消息,进而,所述目标存储节点对所述目标媒体数据执行与所述第三http请求消息相对应的处理操作。And feeding back, to the access end, a third http reply message carrying the second network address, so that: the access end establishes with the target storage node based on a second network address in the third http reply message After the tcp is connected, the third http request message is sent to the target storage node, and further, the target storage node performs a processing operation corresponding to the third http request message on the target media data.
- 根据权利要求32所述的媒体数据存储系统,其特征在于,所述目标存储节点中存储的所述目标媒体数据与目标智能数据具有对应性;其中,所述目标智能数据为所述目标媒体数据中所提取到的数据;The media data storage system according to claim 32, wherein the target media data stored in the target storage node has a correspondence with target smart data; wherein the target smart data is the target media data. The data extracted in ;所述目标存储节点对所述目标媒体数据执行与第三http请求消息相对应的处理操作,具体为:The target storage node performs a processing operation corresponding to the third http request message on the target media data, specifically:所述目标存储节点对所述目标媒体数据和所述目标智能数据执行与所述第三http请求消息相对应的处理操作。The target storage node performs a processing operation corresponding to the third http request message to the target media data and the target smart data.
- 一种云存储系统,其特征在于,包括:管理节点和存储节点;其中,A cloud storage system, comprising: a management node and a storage node; wherein所述管理节点,用于接收图像采集设备发送的存储节点分配请求,向所述图像采集设备反馈第二网络地址,以使得:所述图像采集设备在获得所述第二网络地址后,基于所述第二网络地址,将待存储的目标媒体数据上传至所述云存储系统;其中,所述存储节点分配请求为所述图像采集设备基于存储于自身的第一网络地址所发送的,所述第一网络地址为所述管理节点的对外访问地址,所述第二网络地址为目标存储节点的网络地址,所述目标存储节点为:所述云存储系统为所述图像采集设备所分配的、用于存储所述图像采集设备的媒体数据的存储节点;The management node is configured to receive a storage node allocation request sent by the image collection device, and feed back a second network address to the image collection device, so that: after obtaining the second network address, the image collection device is based on the Transmitting the target media data to be stored to the cloud storage system, where the storage node allocation request is sent by the image collection device based on the first network address stored in itself, The first network address is an external access address of the management node, the second network address is a network address of the target storage node, and the target storage node is: the cloud storage system is allocated by the image collection device, a storage node for storing media data of the image capture device;所述目标存储节点,用于存储所述图像采集设备上传的所述目标媒体数 据。The target storage node is configured to store the target media data uploaded by the image collection device.
- 根据权利要求34所述的云存储系统,其特征在于,所述目标存储节点,还用于存储所述图像采集设备上传的所述目标媒体数据之后,向所述图像采集设备反馈目标存储信息,以使得:所述图像采集设备接收到所述目标存储信息后,将所述目标媒体数据对应的目标统一资源定位符URL保存至所述图像采集设备对应的平台服务器;The cloud storage system according to claim 34, wherein the target storage node is further configured to: after storing the target media data uploaded by the image collection device, feed back target storage information to the image collection device, After the image collection device receives the target storage information, save the target uniform resource locator URL corresponding to the target media data to the platform server corresponding to the image collection device;其中,所述目标存储信息为基于所述目标媒体数据对应的存储位置所确定的信息,所述目标URL为基于所述目标存储信息所确定的信息。The target storage information is information determined based on a storage location corresponding to the target media data, and the target URL is information determined based on the target storage information.
- 根据权利要求35所述的云存储系统,其特征在于,所述管理节点还用于:The cloud storage system according to claim 35, wherein the management node is further configured to:接收访问端基于所述目标URL发送的媒体数据处理请求;其中,所述访问端为所述平台服务器或浏览器,所述浏览器所基于的所述目标URL从所述平台服务器获得;Receiving, by the accessing end, a media data processing request sent by the target URL, where the accessing end is the platform server or a browser, and the target URL on which the browser is based is obtained from the platform server;重定向所述媒体数据处理请求至所述目标存储节点,以由所述目标存储节点执行与所述媒体数据处理请求相对应的处理操作。Redirecting the media data processing request to the target storage node to perform a processing operation corresponding to the media data processing request by the target storage node.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710157916.1A CN108632305B (en) | 2017-03-16 | 2017-03-16 | Cloud storage system, media data storage method and system |
CN201710157916.1 | 2017-03-16 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018166415A1 true WO2018166415A1 (en) | 2018-09-20 |
Family
ID=63522710
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/078685 WO2018166415A1 (en) | 2017-03-16 | 2018-03-12 | Cloud storage system, media data storage method and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108632305B (en) |
WO (1) | WO2018166415A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109729397A (en) * | 2019-01-29 | 2019-05-07 | 网宿科技股份有限公司 | Streaming method, system and server |
CN111984461A (en) * | 2019-05-22 | 2020-11-24 | 杭州海康威视系统技术有限公司 | Data reading method and device and cloud storage system |
CN112328559A (en) * | 2020-11-05 | 2021-02-05 | 杭州海康威视数字技术股份有限公司 | Picture warehousing method, system and device and electronic equipment |
US11102319B2 (en) | 2019-01-29 | 2021-08-24 | Wangsu Science and Technology Co., Ltd. | Method, system and server for stream-pushing |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404978B (en) * | 2019-09-06 | 2023-05-02 | 杭州海康威视系统技术有限公司 | Data storage method and cloud storage system |
CN111522695A (en) * | 2020-05-08 | 2020-08-11 | 与众科技(天津)有限公司 | Application-level disaster recovery system of cooperative office system |
CN115604218A (en) * | 2021-06-28 | 2023-01-13 | 华为技术有限公司(Cn) | Data processing system, method and switch |
CN114124937B (en) * | 2021-11-23 | 2024-09-24 | 天翼视联科技有限公司 | Automatic distributed cloud storage scheduling interaction method, device and equipment |
CN114286054B (en) * | 2021-12-27 | 2023-10-27 | 苏州万店掌网络科技有限公司 | Remote debugging method, system, equipment and storage medium for network camera |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102882983A (en) * | 2012-10-22 | 2013-01-16 | 南京云创存储科技有限公司 | Rapid data memory method for improving concurrent visiting performance in cloud memory system |
US8914540B1 (en) * | 2008-07-01 | 2014-12-16 | Cisco Technology, Inc. | Multi-fabric SAN based data migration |
CN104580439A (en) * | 2014-12-30 | 2015-04-29 | 创新科存储技术(深圳)有限公司 | Method for achieving uniform data distribution in cloud storage system |
CN105025049A (en) * | 2014-04-22 | 2015-11-04 | 深圳市尼得科技有限公司 | Media stream storing method and apparatus |
CN105404469A (en) * | 2015-10-22 | 2016-03-16 | 浙江宇视科技有限公司 | Video data storage method and system |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101753617B (en) * | 2009-12-11 | 2013-05-08 | 中兴通讯股份有限公司 | Cloud storage system and method |
CN102307221A (en) * | 2011-03-25 | 2012-01-04 | 国云科技股份有限公司 | Cloud storage system and implementation method thereof |
CN102148963A (en) * | 2011-04-06 | 2011-08-10 | 上海玄烨电子系统工程有限公司 | Method and system for facing digital high-definition network video monitoring based on cloud storage |
CN102355572A (en) * | 2011-09-29 | 2012-02-15 | 南京云创存储科技有限公司 | Large high-definition video monitoring system based on cloud computing |
WO2013119664A1 (en) * | 2012-02-06 | 2013-08-15 | Redigi, Inc. | Digital data commerce system and methods with digital media object to cloud redirection |
CN103024053B (en) * | 2012-12-18 | 2015-11-25 | 华为技术有限公司 | Cloud storage means, resource scheduling system, cloud memory node and system |
CN104572344B (en) * | 2013-10-29 | 2018-10-30 | 杭州海康威视系统技术有限公司 | A kind of method and system of cloudy data backup |
CN105025053A (en) * | 2014-04-24 | 2015-11-04 | 苏宁云商集团股份有限公司 | Distributed file upload method based on cloud storage technology and system |
CN104168447A (en) * | 2014-07-03 | 2014-11-26 | 宁波摩米创新工场电子科技有限公司 | Internet of Things network video monitoring system |
CN104184812B (en) * | 2014-08-20 | 2017-08-11 | 霍尔果斯智融未来信息科技有限公司 | A kind of multipoint data transmission method based on private clound |
CN105516664A (en) * | 2015-12-11 | 2016-04-20 | 深圳市奔迈科技有限公司 | Intelligent monitoring system based on cloud storage and monitoring method thereof |
-
2017
- 2017-03-16 CN CN201710157916.1A patent/CN108632305B/en active Active
-
2018
- 2018-03-12 WO PCT/CN2018/078685 patent/WO2018166415A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8914540B1 (en) * | 2008-07-01 | 2014-12-16 | Cisco Technology, Inc. | Multi-fabric SAN based data migration |
CN102882983A (en) * | 2012-10-22 | 2013-01-16 | 南京云创存储科技有限公司 | Rapid data memory method for improving concurrent visiting performance in cloud memory system |
CN105025049A (en) * | 2014-04-22 | 2015-11-04 | 深圳市尼得科技有限公司 | Media stream storing method and apparatus |
CN104580439A (en) * | 2014-12-30 | 2015-04-29 | 创新科存储技术(深圳)有限公司 | Method for achieving uniform data distribution in cloud storage system |
CN105404469A (en) * | 2015-10-22 | 2016-03-16 | 浙江宇视科技有限公司 | Video data storage method and system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109729397A (en) * | 2019-01-29 | 2019-05-07 | 网宿科技股份有限公司 | Streaming method, system and server |
US11102319B2 (en) | 2019-01-29 | 2021-08-24 | Wangsu Science and Technology Co., Ltd. | Method, system and server for stream-pushing |
CN111984461A (en) * | 2019-05-22 | 2020-11-24 | 杭州海康威视系统技术有限公司 | Data reading method and device and cloud storage system |
CN111984461B (en) * | 2019-05-22 | 2024-02-27 | 杭州海康威视系统技术有限公司 | Data reading method and device and cloud storage system |
CN112328559A (en) * | 2020-11-05 | 2021-02-05 | 杭州海康威视数字技术股份有限公司 | Picture warehousing method, system and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN108632305B (en) | 2021-05-25 |
CN108632305A (en) | 2018-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018166415A1 (en) | Cloud storage system, media data storage method and system | |
CN108600281B (en) | Cloud storage system, media data storage method and system | |
US7733808B2 (en) | Peer-to-peer aided live video sharing system | |
CN102571726B (en) | Method, system and the state judgment server that multi-medium data is shared | |
CN108737476B (en) | Cloud storage system, media data storage method and system | |
CN101795222B (en) | Multi-stage forward service system and method | |
US20220209878A1 (en) | Method, system and device for pushing information, and storage medium thereof | |
US11528303B2 (en) | Method and system for responding to video call service | |
US10681314B2 (en) | Moving image splitting device and monitoring method | |
CN108737484B (en) | Media data storage method and system | |
CN106453683A (en) | Method for centralized access management of cameras | |
CN107919971A (en) | Method, apparatus and system for audio/video communication connection disaster tolerance | |
WO2019100912A1 (en) | Data distribution method and distribution server | |
CN102439946B (en) | Data transmission method and device | |
CN108737477B (en) | Cloud storage system, and media data balanced storage method and system | |
US7234003B2 (en) | Method and apparatus to facilitate direct transfer of data between a data device and a network connection | |
CN114143569B (en) | Webpage recording and live broadcasting method and system | |
CN102457532B (en) | A kind of methods, devices and systems realizing many CDN and share with theme video | |
CN105230074B (en) | Video cache switching handling method, device and system | |
CN117955959A (en) | Collaborative transmission method, device, equipment and storage medium for multimedia content | |
CN111212253B (en) | Monitoring processing method and device in video conference, electronic equipment and storage medium | |
CN110519400B (en) | Method for realizing Internet of things platform for carrying out multi-inlet separation on equipment flow | |
CN105263134A (en) | Image transmission method and mobile equipment | |
CN106937179A (en) | The method of client and server bidirectional data transfers | |
CN111143607B (en) | Information acquisition method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18767947 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18767947 Country of ref document: EP Kind code of ref document: A1 |