WO2021115348A1 - Cloud storage system providing preview function, and preview method and apparatus - Google Patents

Cloud storage system providing preview function, and preview method and apparatus Download PDF

Info

Publication number
WO2021115348A1
WO2021115348A1 PCT/CN2020/135015 CN2020135015W WO2021115348A1 WO 2021115348 A1 WO2021115348 A1 WO 2021115348A1 CN 2020135015 W CN2020135015 W CN 2020135015W WO 2021115348 A1 WO2021115348 A1 WO 2021115348A1
Authority
WO
WIPO (PCT)
Prior art keywords
monitoring device
previewed
cover picture
target
cover
Prior art date
Application number
PCT/CN2020/135015
Other languages
French (fr)
Chinese (zh)
Inventor
李海燕
梁明军
Original Assignee
杭州海康威视***技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视***技术有限公司 filed Critical 杭州海康威视***技术有限公司
Publication of WO2021115348A1 publication Critical patent/WO2021115348A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8549Creating video summaries, e.g. movie trailer

Definitions

  • This application relates to the field of video storage technology, and in particular to a cloud storage system that provides a preview function, and a preview method and device.
  • the video application platform generally distinguishes the monitoring equipment by the name of the point, that is, the name of each monitoring equipment is displayed on the display interface, and the user selects the video data of the specified monitoring equipment according to the name of the monitoring equipment To show.
  • the user needs to memorize the corresponding relationship between the monitoring device and the monitoring scene, which is prone to errors when there are many front-end points, which is not conducive to the user's intuitive access to each monitoring device and monitoring scene
  • the corresponding relationship is not conducive to the user's intuitive understanding of the monitoring area.
  • the purpose of the embodiments of the present application is to provide a cloud storage system that provides a preview function, and a preview method and device, so as to facilitate the user to intuitively understand the situation of the monitored area.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a cloud storage system that provides a preview function, and the system includes:
  • the storage node is used to receive video stream data collected by a designated monitoring device in real time; extract I frames from the video stream data to generate a cover picture of the designated monitoring device; store the video stream data and the designated monitoring device The cover image of the device;
  • the management node is configured to obtain the storage address of the cover picture corresponding to the monitoring device to be previewed according to the identification of the monitoring device to be previewed in the preview request after receiving the preview request of the target client, as the target storage address ,
  • the cover picture is the cover picture whose time stamp is closest to the current moment
  • the target storage address includes the address of the storage node that stores the cover picture of the monitoring device to be previewed
  • the target storage address is sent to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  • the storage node is specifically configured to store the cover picture of the designated monitoring device in a system disk of the storage node.
  • the storage node is further configured to send the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device to the management node;
  • the management node is further configured to receive the storage address of the cover picture of the designated monitoring device and the identifier of the designated monitoring device; and store the storage address of the cover picture of the designated monitoring device and the identifier of the designated monitoring device in association.
  • the storage node is specifically used for:
  • the management node is further configured to: upon receiving the display request of the target client for the video stream data of the target monitoring device, obtain the fetching of the video stream data of the target monitoring device. Streaming address; return the streaming address to the target client, so that the target client obtains the video stream data of the target monitoring device according to the streaming address, and displays the video of the target monitoring device Stream data.
  • an embodiment of the present application provides a preview method, and the method includes:
  • the target storage address of the cover image corresponding to the monitoring device to be previewed is obtained, where the cover image is a timestamp and The cover picture closest to the current moment, the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the monitoring device to be previewed received in real time Generated from the I frame in the video stream data;
  • the target storage address is sent to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  • the method further includes:
  • the cover picture of the monitoring device to be previewed is stored in the storage node.
  • the storing the cover picture of the monitoring device to be previewed in a storage node includes:
  • the cover picture of the monitoring device to be previewed is stored in the system disk of the storage node.
  • the extracting the I frame whose time stamp is closest to the current time from the video data includes:
  • the first I frame in the video stream data of the monitoring device to be previewed is extracted from the designated sampling time.
  • the storing the cover picture of the monitoring device to be previewed in a storage node includes:
  • an embodiment of the present application provides a preview device, which includes:
  • the storage address obtaining module is used to obtain the target of the cover image whose time stamp of the monitoring device to be previewed is closest to the current moment according to the identification of the monitoring device to be previewed in the preview request after obtaining the preview request of the target client
  • a storage address wherein the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the video stream of the monitoring device to be previewed received in real time Generated by the I frame in the data;
  • the storage address sending module is configured to send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  • the device further includes:
  • the video stream data receiving module is configured to receive the video stream data collected in real time by the monitoring device to be previewed;
  • the I frame extraction module is used to extract the I frame whose time stamp is closest to the current time from the video data
  • a cover picture generating module configured to generate the latest cover picture of the monitoring device to be previewed based on the extracted I frame
  • the cover picture storage module is used to store the cover picture of the monitoring device to be previewed in the storage node.
  • the cover picture storage module is specifically configured to store the cover picture of the monitoring device to be previewed in the system disk of the storage node.
  • the I frame extraction module is specifically configured to: according to a preset sampling period, when the specified sampling time is reached, start to extract the video stream of the monitoring device to be previewed from the specified sampling time The first I frame in the data.
  • the cover picture storage module is specifically configured to: determine whether the historical cover picture of the monitoring device to be previewed is stored in the storage node; if so, delete the history of the monitoring device to be previewed Cover picture, and store the currently generated cover picture of the monitoring device to be previewed; if not, store the currently generated cover picture of the monitoring device to be previewed.
  • an embodiment of the present application provides an electronic device, including a processor and a memory;
  • the memory is used to store computer programs
  • the processor is configured to implement any preview method described in this application when executing the program stored on the memory.
  • an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the preview described in any of the present applications is implemented. method.
  • an embodiment of the present application provides a computer program product that, when executed by a processor, implements any preview method described in the present application.
  • the cloud storage system and preview method and device that provide preview functions provided by the embodiments of the application generate the cover picture of the monitoring device according to the I frame of the monitoring device, and send the cover picture of the monitoring device to be previewed to the client so that the client can display the waiting Preview the cover picture of the monitoring device, and the user can intuitively determine the corresponding relationship between the monitoring device and the monitoring scene based on the cover picture, which is helpful for the user to intuitively understand the situation of the monitoring area.
  • any product or method of the present application does not necessarily need to achieve all the advantages described above at the same time.
  • FIG. 1 is a first schematic diagram of a cloud storage system that provides a preview function according to an embodiment of the application
  • FIG. 2 is a second schematic diagram of a cloud storage system that provides a preview function according to an embodiment of the application
  • FIG. 3 is a schematic diagram of a method for generating a cover image according to an embodiment of the application
  • FIG. 4 is a first schematic diagram of a preview method according to an embodiment of the application.
  • FIG. 5 is a second schematic diagram of a preview method according to an embodiment of the application.
  • FIG. 6 is a schematic diagram of a cover image storage method according to an embodiment of the application.
  • FIG. 7 is a schematic diagram of interaction between a client and a cloud storage system according to an embodiment of the application.
  • FIG. 8 is a first schematic diagram of a preview device according to an embodiment of the application.
  • FIG. 9 is a second schematic diagram of a preview device according to an embodiment of the application.
  • FIG. 10 is a schematic diagram of an electronic device according to an embodiment of the application.
  • Video cloud storage Based on a distributed storage architecture, a storage system used to store video data of various video front-end devices.
  • I frame the key frame in the video stream.
  • Cover image For a certain front-end monitoring device, a picture of the video collected at a certain moment.
  • Frame analysis Analyze the video code stream generated by the front-end equipment to obtain the I frame, P frame and other related frame information in the code stream. The frame analysis process does not change the source data of the code stream.
  • the video application platform generally distinguishes surveillance equipment by point names, displays the name of each surveillance equipment on the display interface, and the user selects the video data of the designated surveillance equipment for display according to the name of the surveillance equipment.
  • using the above method to display the name of each monitoring device on the display interface is not conducive to the user's intuitive acquisition of the corresponding relationship between each monitoring device and the monitoring scene, and it is not conducive to the user's intuitive understanding of the monitoring area.
  • an embodiment of the present application provides a cloud storage system that provides a preview function.
  • the system includes:
  • the storage node 12 is used to receive the video stream data collected by the designated monitoring device in real time; extract I frames from the video stream data to generate the cover picture of the designated monitoring device; store the video stream data and the cover picture of the designated monitoring device.
  • the management node 11 is used to obtain the storage address of the cover image whose time stamp of the monitoring device to be previewed is closest to the current time according to the identification of the monitoring device to be previewed in the preview request after receiving the preview request of the target client, as the target storage Address, where the target storage address includes the address of the storage node that stores the cover image of the monitoring device to be previewed; the target storage address is sent to the target client, so that the target client obtains and previews the cover of the monitoring device to be previewed according to the target storage address image.
  • the storage node 12 is used to store the video stream data of the designated monitoring device.
  • the storage node 12 receives the video stream data collected by the designated monitoring device in real time, extracts I frames from the video stream data, and generates a cover picture of the designated monitoring device according to the extracted I frames.
  • the storage node 12 stores video stream data and cover pictures.
  • the storage node 12 extracts the I frame to generate the cover picture, because the I frame decoded into an image consumes the lowest computing performance, which can save the computing resources of the storage node 12.
  • a cover picture can be generated immediately after the monitoring device is connected to the storage node, that is, as soon as the storage node obtains the code stream (video stream data) of the monitoring device, it will immediately analyze it from the code stream
  • the I frame is output, and the relevant algorithm is called to convert the I frame data into a picture format.
  • the cover picture of the monitoring device can be generated according to a preset sampling period (such as half an hour, etc.).
  • the storage node may delete the previously generated cover picture of the monitoring device, and save the newly generated cover picture of the monitoring device. Therefore, for each monitoring device, only one cover picture of the monitoring device can be saved to save storage resources of the storage node.
  • the target client When the user wants to preview the cover picture, the target client is used to send a preview request to the management node 11, and the preview request includes the identification of the monitoring device to be previewed (the preview monitoring device may be multiple).
  • the management node obtains the storage address of the cover picture whose time stamp is closest to the current moment in the cover picture of the monitoring device to be previewed, as the target storage address.
  • the time stamp of the cover picture may be the time stamp of the I frame in which the cover picture is generated, the time when the cover picture is generated, or the time when the cover image is stored, and so on.
  • the target storage address includes the address of the storage node that stores the corresponding cover picture, and may also include the storage path of the corresponding cover picture in the storage node.
  • the target client downloads the corresponding cover picture according to the target storage address and displays it.
  • the management node 11 may also verify whether the target client has a preview request for the monitoring device to be previewed.
  • the use permission of the monitoring device when the target client has the use permission for the monitoring device to be previewed, the cover image of the monitoring device to be previewed is sent to the target client; when the target client does not have the use permission for the monitoring device to be previewed, Return an error message to the client.
  • the storage node when the storage node stores the video stream data of the monitoring device, it will also store the cover picture of the monitoring device generated by the I frame. Send the cover picture of the monitoring device to be previewed to the client so that the client can display the cover picture of the monitoring device to be previewed.
  • the user can intuitively determine the corresponding relationship between the monitoring device and the monitoring scene based on the cover picture, which is conducive to the user's intuitive understanding of the monitoring area happensing.
  • the client shows the cover picture whose time stamp is closest to the current time, which can increase the real-time nature of the cover picture.
  • the cover picture can be stored in the system disk of the storage node.
  • the aforementioned storage node 12 is specifically configured to store the cover picture of the designated monitoring device in the system disk of the storage node.
  • the cloud storage system may be a distributed storage system.
  • the architecture of the cloud storage system may be specifically as shown in Figure 2.
  • the management node is used to balance the load of each storage node and perform processing on each storage node. Management; the storage node is used to generate each cover picture, and is used to store the video stream data and the cover picture.
  • Storage nodes include system disks and data disks. Because the cover image is mainly used to provide the platform client for extraction and display, and it is not certain when the platform client needs to extract the cover image for display, it is also necessary to store the cover image to provide it for different platform clients at any time Cover image display service.
  • cover pictures are instantaneous, and there is a need to quickly display cover pictures of a large number of surveillance equipment.
  • the inventor found in research that if the cover picture is stored in a data disk and stored together with the video stream data, frequent reading and writing of the cover picture will have an impact on the storage performance of the video stream data.
  • the video stream data storage in the data disk is generally used by virtualizing it into a resource pool, a special space is needed to store the cover image, which is cumbersome to implement.
  • storing the cover picture in the system disk of the storage node is simple to implement and can reduce the impact on the storage of video stream data.
  • the above-mentioned storage node 12 is specifically used to: determine whether the historical cover picture of the designated monitoring device is stored in the storage node; if so, delete the historical cover picture of the designated monitoring device and store the currently generated The cover picture of the designated monitoring device; if not, the currently generated cover picture of the designated monitoring device is stored.
  • the storage node For each designated monitoring device connected to the storage node, the storage node detects whether the historical cover picture of the designated monitoring device is stored locally; if so, deletes the historical cover picture of the designated monitoring device, and stores the currently generated designated monitoring The cover picture of the device; if not, the currently generated cover picture of the specified monitoring device is stored.
  • the above-mentioned deleting the historical cover picture of the designated monitoring device and storing the currently generated cover picture of the designated monitoring device can be equivalently replaced with: covering the historical cover picture of the designated monitoring device through the currently generated cover picture of the designated monitoring device.
  • the cover image of each monitoring device connected to the storage node can be stored in the system disk of the storage node. For example, a new directory can be created in the system disk of the storage node to store the cover image .
  • the above-mentioned storage node 12 is also used to send the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device to the management node.
  • the above-mentioned management node 11 is also used to receive the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device; and store the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device in association.
  • the designated storage node obtains the cover picture of the designated monitoring device; writes the cover picture to the system disk of the designated storage node; the designated storage node will specify the identification of the monitoring device and the storage path of the designated monitoring device cover picture (That is, the storage address) is reported to the management node; the management node associates and stores the identification of the designated monitoring device and the storage path of the cover picture of the designated monitoring device, for example, it can be stored in the database of the management node.
  • the associated storage methods here include but are not limited to labels, tables, pointers, and so on.
  • the purpose of associative storage is to facilitate the subsequent quick acquisition of the cover picture of the monitoring device according to the identification of the monitoring device.
  • the management node 11 stores the storage address of the cover image of the designated monitoring device and the identification of the designated monitoring device in association, so that the management node 11 can subsequently query the storage address of the cover image of the designated monitoring device according to the identification of the designated monitoring device. .
  • the above-mentioned management node 11 is further configured to: upon receiving the display request of the target client for the video stream data of the target monitoring device, obtain the streaming address of the video stream data of the target monitoring device; The target client returns the fetching address, so that the target client obtains the video stream data of the target monitoring device according to the fetching address, and displays the video stream data of the target monitoring device.
  • the target monitoring device may be one or more of the monitoring devices to be previewed.
  • the user can select the video stream data for display according to the cover picture.
  • the management node 11 obtains the streaming address of the video stream data of the target monitoring device; The terminal returns the fetching address so that the target client can obtain and display the video stream data of the target monitoring device according to the fetching address.
  • the embodiment of the present application provides a preview method. Referring to FIG. 4, the method includes:
  • S401 After obtaining the preview request of the target client, according to the identification of the monitoring device to be previewed in the preview request, obtain the target storage address of the cover image whose timestamp of the monitoring device to be previewed is closest to the current moment, where the target storage address includes The address of the storage node that stores the cover picture of the monitoring device to be previewed.
  • the cover picture of the monitoring device to be previewed is generated based on the I frame in the video stream data of the monitoring device to be previewed received in real time.
  • the monitoring device to be previewed can be any monitoring device, and the cloud storage system is responsible for storing the video stream data collected by each monitoring device.
  • a monitoring device that is, the monitoring device to be previewed
  • each monitoring device connected to the cloud storage system can execute the preview method of the embodiment of this application. .
  • S402 Send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  • the preview method of the embodiment of the present application is applied to a cloud storage system, so it can be executed by the cloud storage system. Specifically, it can be executed by the management node and the storage node in the cloud storage system. For example, steps S401 and S402 can be implemented by the management node.
  • the storage node is used to store the cover picture.
  • the cover picture of the monitoring device to be previewed is sent to the client so that the client can display the cover picture of the monitoring device to be previewed.
  • the user can intuitively determine the correspondence between the monitoring device and the monitoring scene based on the cover picture, which is beneficial to The user intuitively understands the situation of the monitoring area.
  • the client shows the cover picture whose time stamp is closest to the current time, which can increase the real-time nature of the cover picture.
  • the above method further includes:
  • S501 Receive video stream data collected in real time by a monitoring device to be previewed.
  • the storage node of the cloud storage system receives the video stream data collected in real time by the monitoring device to be previewed, and can identify the I frame in the video stream data through frame analysis technology, and extract the I frame with the time stamp closest to the current moment.
  • the above-mentioned extracting the I frame whose time stamp is closest to the current time from the video data includes: according to a preset sampling period, when the specified sampling time is reached, extract the to-be-reviewed monitoring from the specified sampling time.
  • a cover image can be generated immediately after the monitoring device is connected to the cloud storage system, that is, as soon as the storage node of the cloud storage system obtains the code stream of the monitoring device, it will be analyzed from the code stream immediately
  • the I frame is generated, and the relevant algorithm is called to convert the I frame data into a picture format.
  • the cover picture of the monitoring device can be generated according to a preset sampling period (such as half an hour, etc.).
  • the previously generated historical cover picture of the monitoring device may be deleted, and the newly generated cover picture of the monitoring device may be saved. Therefore, for each monitoring device, only one cover picture of the monitoring device can be saved in the cloud storage system.
  • the I frame whose receiving time is closest to the designated sampling time can also be selected, or the I frame whose receiving time is before the designated sampling time and whose receiving time is closest to the designated sampling time can also be selected.
  • the first I frame in the video stream data is extracted from the current time. Compared with extracting the I frame before the specified sampling time, there is no need to go to the storage node to read the data. , Which can reduce the processing pressure of storage nodes and improve the generation efficiency of cover pictures.
  • S503 Generate the latest cover picture of the monitoring device to be previewed based on the extracted I frame.
  • the storage node of the cloud storage system processes the I frame through a related decoding method to obtain an image of the I frame, that is, the cover image of the monitoring device to be previewed.
  • S504 Store the cover picture of the monitoring device to be previewed in the storage node.
  • the storage node of the cloud storage system also needs to store the cover picture to provide cover picture display services for different clients at any time.
  • the foregoing storing the cover picture of the monitoring device to be previewed in the storage node includes:
  • S5041 Determine whether a historical cover picture of the monitoring device to be previewed is stored in the storage node.
  • S5042 If yes, delete the historical cover picture of the monitoring device to be previewed, and store the currently generated cover picture of the monitoring device to be previewed.
  • the cover picture of the monitoring device to be previewed is stored in the system disk of the storage node.
  • the cloud storage system may be a distributed storage system.
  • the architecture of the cloud storage system may be as shown in Figure 2.
  • the management node is used to balance the load of each storage node and manage each storage node .
  • the storage node is used to generate each cover picture, and is used to store the video stream data and the cover picture.
  • Storage nodes include system disks and data disks. Because the cover image is mainly used to provide the platform client for extraction and display, and it is not certain when the client needs to extract the cover image for display, the cover image can also be stored to provide cover for different platform clients at any time Picture display service.
  • cover pictures The extraction of cover pictures is instantaneous, and there is a need to quickly display cover pictures of a large number of surveillance equipment.
  • the inventor found in research that if the cover picture is stored in a data disk and stored together with the video stream data, frequent reading and writing of the cover picture will have an impact on the storage performance of the video stream data.
  • the video stream data storage in the data disk is generally used by virtualizing it into a resource pool, a special space is needed to store the cover picture, which is cumbersome to implement.
  • the number of monitoring devices that each storage node is responsible for is limited, generally less than 500 channels, and each monitoring device only needs to store one cover image, calculated according to the cover image size of 2MB (megabytes), the total required The storage space is about 1GB (gigabytes).
  • the cover image of the monitoring device accessed by the storage node can be stored in the system disk of the storage node. For example, a new directory can be created in the system disk of the storage node to store the cover image.
  • the embodiment of the present application also provides a preview method, which is applied to the client, and the method includes:
  • Step A Send a preview request for the cover picture of the monitoring device to be previewed to the cloud storage system.
  • the preview method of the embodiment of the present application is applied to the client, and therefore can be implemented by the client.
  • the client can be a personal computer or a smart phone and other devices.
  • the monitoring device to be previewed can be any monitoring device, and the cloud storage system is responsible for storing the video stream data collected by the monitoring device to be previewed.
  • the client When the cover picture of the monitoring device to be previewed needs to be displayed, the client generates a preview request for the cover picture of the monitoring device to be previewed, and sends the preview request to the cloud storage system.
  • Step B Receive the cover picture of the monitoring device to be previewed returned by the cloud storage system, where the cover picture of the monitoring device to be previewed is generated based on the I frame of the video stream data collected by the monitoring device to be previewed.
  • the client receives the cover picture of the monitoring device to be previewed returned by the cloud storage system.
  • the generation process of the cover picture of the monitoring device to be previewed please refer to the generation process of the cover picture in the above preview method, which will not be repeated here.
  • Step C At the preview position corresponding to the monitoring device to be previewed, the cover picture of the monitoring device to be previewed is displayed.
  • the client displays the cover picture of the monitoring device to be previewed in the preview position corresponding to the monitoring device to be previewed.
  • different preview positions are set in advance for different monitoring devices in the client, and the client can send a preview request for the cover image of one or more monitoring devices. For each monitoring device, the cover picture of the monitoring device needs to be displayed at the corresponding preview position of the monitoring device.
  • the data interaction process between the cloud storage system and the client can be shown in FIG. 7, wherein the architecture of the cloud storage system is shown in FIG. 2.
  • the client sends a preview request for the cover image of the target monitoring device to the management node; 2.
  • the management node queries the database for the storage path of the cover image of the target monitoring device according to the identification of the target monitoring device; 3.
  • the management node obtains the database The storage path of the cover picture of the returned target monitoring device; 4.
  • the management node returns the storage path of the cover picture of the target monitoring device to the client; 5.
  • the client performs the storage path according to the storage path of the cover picture of the target monitoring device from the corresponding storage node Get the stream; 6.
  • the client obtains the cover picture of the target monitoring device.
  • the cover picture of the target monitoring device in the cloud storage system is obtained.
  • the cover picture is generated according to the I frame of the target monitoring device; and the cover picture of the target monitoring device is displayed in the display area corresponding to the target monitoring device.
  • the corresponding relationship between the monitoring equipment and the monitoring scene can be determined intuitively based on the cover picture, which is conducive to the user's intuitive understanding of the monitoring area.
  • the user can play the video stream data through the cover picture.
  • the preview method applied to the client in the embodiment of the present application further includes:
  • Step 1 When the user's trigger instruction for the cover image of the target monitoring device is obtained, the video stream data display instruction for the target monitoring device is generated.
  • the target monitoring device can be any monitoring device.
  • the user's trigger instruction for the cover image of the target monitoring device can be generated after the user clicks the cover image or related buttons of the target monitoring device through the mouse, or generated after the user clicks the cover image or related buttons of the target monitoring device through the touch screen , Are all within the protection scope of this application.
  • Step 2 Send a video stream data display instruction for the target monitoring device, so that the cloud storage system returns the video stream data of the target monitoring device after receiving the video stream data display instruction for the target monitoring device.
  • the client sends a video stream data display instruction for the target monitoring device to the cloud storage system. After receiving the display instruction, the cloud storage system returns the video stream data of the target monitoring device to the client.
  • Step 3 Obtain the video stream data of the above-mentioned target monitoring device, and display the video stream data of the above-mentioned target monitoring device.
  • the client receives the video stream data of the target monitoring device, and displays the video stream data of the target monitoring device in a preset display window.
  • the embodiment of the present application also provides a preview system, which includes:
  • the above cloud storage system is used to obtain the video stream data collected by the target monitoring device; extract the I frame in the above video stream data; generate the cover picture according to the above I frame;
  • the above client is configured to send a preview request for the cover picture of the target monitoring device to the cloud storage system;
  • the cloud storage system is further configured to send the cover picture of the target monitoring device to the client that sent the preview request after receiving the preview request for the cover picture of the target monitoring device;
  • the client is also used to receive the cover image of the target monitoring device returned by the cloud storage system; and display the cover image of the target monitoring device in the preview position corresponding to the target monitoring device.
  • the aforementioned cloud storage system may also implement any of the foregoing preview methods applied to the cloud storage system, and the foregoing client may also implement any of the foregoing preview methods applied to the client.
  • the preview system further includes: multiple monitoring devices;
  • the aforementioned monitoring equipment is used to collect video stream data in a designated monitoring area and send the collected video stream data to the aforementioned cloud storage system.
  • the embodiment of the present application also provides a preview device.
  • the device includes:
  • the storage address obtaining module 801 is configured to obtain the target storage of the cover image whose time stamp of the monitoring device to be previewed is closest to the current time according to the identification of the monitoring device to be previewed in the preview request after obtaining the preview request of the target client Address, wherein the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the I frame in the video stream data of the monitoring device to be previewed received in real time Generated;
  • the storage address sending module 802 is configured to send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  • the foregoing device further includes:
  • the video stream data receiving module is used to receive the video stream data collected by the monitoring device to be previewed in real time;
  • the I-frame extraction module is used to extract the I-frame whose time stamp is closest to the current time from the above-mentioned video data;
  • a cover picture generation module for generating the latest cover picture of the monitoring device to be previewed based on the extracted I frame
  • the cover picture storage module is used to store the cover picture of the monitoring device to be previewed in the storage node.
  • the cover picture storage module is specifically configured to store the cover picture of the monitoring device to be previewed in the system disk of the storage node.
  • the aforementioned I-frame extraction module is specifically configured to: according to a preset sampling period, when the specified sampling time is reached, start to extract the video stream data of the aforementioned monitoring device to be previewed from the specified sampling time.
  • the first frame I frame.
  • the cover picture storage module is specifically configured to: determine whether the historical cover picture of the monitoring device to be previewed is stored in the storage node; if so, delete the historical cover picture of the monitoring device to be previewed, And store the currently generated cover picture of the aforementioned monitoring device to be previewed; if not, store the currently generated cover picture of the aforementioned monitoring device to be previewed.
  • the embodiment of the present application also provides a preview device. Referring to FIG. 9, it is applied to a client terminal, and the device includes:
  • the picture preview request module 901 is configured to send a preview request for the cover picture of the target monitoring device to the cloud storage system;
  • the cover picture receiving module 902 is configured to receive the cover picture of the target monitoring device returned by the cloud storage system, where the cover picture of the target monitoring device is generated based on the I frame of the video stream data collected by the target monitoring device of;
  • the cover picture display module 903 is configured to display the cover picture of the target monitoring device in the preview position corresponding to the target monitoring device.
  • the preview device applied to the client in the embodiment of the present application further includes:
  • the video preview request module is configured to generate a video stream data display instruction for the target monitoring device when the user's triggering instruction for the cover image of the target monitoring device is obtained;
  • the video data receiving module is configured to send a video stream data display instruction for the target monitoring device, so that the cloud storage system returns to the target monitoring device after receiving the video stream data display instruction for the target monitoring device Video streaming data of the device;
  • the video data display module is used to obtain the video stream data of the target monitoring device and display the video stream data of the target monitoring device.
  • the embodiment of the present application also provides an electronic device, including: a processor and a memory;
  • the above-mentioned memory is used to store computer programs
  • the cover picture of the above-mentioned target monitoring device is displayed.
  • the electronic device of the embodiment of the present application further includes a communication interface 1002 and a communication bus 1004.
  • the processor 1001, the communication interface 1002, and the memory 1003 pass through the communication bus 1004 Complete the communication between each other.
  • the above-mentioned processor when used to execute the computer program stored in the above-mentioned memory, it can also implement any one of the above-mentioned preview methods applied to the client.
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above-mentioned electronic device and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage.
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far away from the foregoing processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • An embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned preview methods applied to a cloud storage system is implemented.
  • An embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned preview methods applied to the client is implemented.
  • the embodiment of the present application provides a computer program product, which, when the computer program product is executed by a processor, implements any one of the preview methods applied to a cloud storage system.
  • the embodiment of the present application provides a computer program product, which implements any one of the above-mentioned preview methods applied to the client when the computer program product is executed by a processor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

A cloud storage system providing a preview function, and a preview method and apparatus. The method comprises: after a preview request is acquired from a target client, according to an identifier, in the preview request, of a monitoring device to be previewed, acquiring a target storage address of a cover picture of the monitoring device to be previewed that has a timestamp closest to the current moment, wherein the cover picture of the monitoring device to be previewed is generated on the basis of an I frame in video stream data of the monitoring device to be previewed that is received in real time; and sending the target storage address to the target client, so that the target client acquires and previews, according to the target storage address, the cover picture of the monitoring device to be previewed. A cover picture of a monitoring device is generated according to an I frame of the monitoring device, the cover picture of the monitoring device is sent to a client so that the client displays the cover picture of the monitoring device, and a user can visually determine the correlation between the monitoring device and a monitoring scenario according to the cover picture, thereby helping the user to visually understand the situation of a monitoring area.

Description

提供预览功能的云存储***及预览方法、装置Cloud storage system providing preview function and preview method and device
本申请要求于2019年12月11日提交中国专利局、申请号为201911267302.4发明名称为“提供预览功能的云存储***及预览方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on December 11, 2019, with an application number of 201911267302.4 and the title of the invention "Cloud storage system with preview function and preview method", the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本申请涉及视频存储技术领域,特别是涉及提供预览功能的云存储***及预览方法、装置。This application relates to the field of video storage technology, and in particular to a cloud storage system that provides a preview function, and a preview method and device.
背景技术Background technique
随着互联网技术的发展及人们安全意识的提高,监控设备逐渐普及,视频云存储***接入的前端监控设备也越来越多,视频应用平台在界面上展示的前端点位也越来越多。在相关视频云存储的技术中,视频应用平台中一般通过点位名称来对监控设备进行区分,即在展示界面上展示各监控设备的名称,用户根据监控设备的名称选取指定监控设备的视频数据进行展示。With the development of Internet technology and the improvement of people’s security awareness, surveillance equipment has gradually become popular, and more and more front-end surveillance devices are connected to the video cloud storage system, and more and more front-end points displayed on the interface of the video application platform . In the related video cloud storage technology, the video application platform generally distinguishes the monitoring equipment by the name of the point, that is, the name of each monitoring equipment is displayed on the display interface, and the user selects the video data of the specified monitoring equipment according to the name of the monitoring equipment To show.
但是采用上述方法,在展示界面上展示各监控设备的名称,用户需要自己记忆监控设备与监控场景的对应关系,在前端点位较多时容易出错,不利于用户直观的获取各监控设备与监控场景的对应关系,不利于用户直观的了解监控区域的情况。However, using the above method to display the name of each monitoring device on the display interface, the user needs to memorize the corresponding relationship between the monitoring device and the monitoring scene, which is prone to errors when there are many front-end points, which is not conducive to the user's intuitive access to each monitoring device and monitoring scene The corresponding relationship is not conducive to the user's intuitive understanding of the monitoring area.
发明内容Summary of the invention
本申请实施例的目的在于提供一种提供预览功能的云存储***及预览方法、装置,以实现有利于用户直观的了解监控区域的情况。具体技术方案如下:The purpose of the embodiments of the present application is to provide a cloud storage system that provides a preview function, and a preview method and device, so as to facilitate the user to intuitively understand the situation of the monitored area. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种提供预览功能的云存储***,所述***包括:In the first aspect, an embodiment of the present application provides a cloud storage system that provides a preview function, and the system includes:
管理节点及多个存储节点;Management node and multiple storage nodes;
所述存储节点,用于接收指定监控设备实时采集的视频流数据;在所述视频流数据中提取I帧,生成所述指定监控设备的封面图片;存储所述视频流数据及所述指定监控设备的封面图片;The storage node is used to receive video stream data collected by a designated monitoring device in real time; extract I frames from the video stream data to generate a cover picture of the designated monitoring device; store the video stream data and the designated monitoring device The cover image of the device;
所述管理节点,用于在接收到目标客户端的预览请求后,按照所述预览请求中待预览监控设备的标识,获取所述待预览监控设备所对应的封面图片的存储地址,作为目标存储地址,其中,所述封面图片为时间戳与当前时刻最接近的封面图片,所述目标存储地址包括存储所述待预览监控设备的封面图片的存储节点的地址;The management node is configured to obtain the storage address of the cover picture corresponding to the monitoring device to be previewed according to the identification of the monitoring device to be previewed in the preview request after receiving the preview request of the target client, as the target storage address , Wherein the cover picture is the cover picture whose time stamp is closest to the current moment, and the target storage address includes the address of the storage node that stores the cover picture of the monitoring device to be previewed;
将所述目标存储地址发送给所述目标客户端,以使所述目标客户端按照所述目标存储地址获取并预览所述待预览监控设备的封面图片。The target storage address is sent to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
在一种可能的实施方式中,所述存储节点具体用于:将所述指定监控设备的封面图片存储在所述存储节点的***盘中。In a possible implementation manner, the storage node is specifically configured to store the cover picture of the designated monitoring device in a system disk of the storage node.
在一种可能的实施方式中,所述存储节点,还用于将所述指定监控设备封面图片的存储地址及所述指定监控设备的标识发送给所述管理节点;In a possible implementation manner, the storage node is further configured to send the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device to the management node;
所述管理节点,还用于接收所述指定监控设备封面图片的存储地址及所述指定监控设备的标识;关联存储所述指定监控设备封面图片的存储地址及所述指定监控设备的标识。The management node is further configured to receive the storage address of the cover picture of the designated monitoring device and the identifier of the designated monitoring device; and store the storage address of the cover picture of the designated monitoring device and the identifier of the designated monitoring device in association.
在一种可能的实施方式中,所述存储节点,具体用于:In a possible implementation manner, the storage node is specifically used for:
判断所述存储节点中是否存储有所述指定监控设备的历史封面图片;Judging whether the historical cover picture of the designated monitoring device is stored in the storage node;
若是,则删除所述指定监控设备的历史封面图片,并存储当前生成的所述指定监控设备的封面图片;If yes, delete the historical cover picture of the designated monitoring device, and store the currently generated cover picture of the designated monitoring device;
若否,则存储当前生成的所述指定监控设备的封面图片。If not, store the currently generated cover picture of the designated monitoring device.
在一种可能的实施方式中,所述管理节点还用于:在接收到所述目标客户端针对目标监控设备的视频流数据的展示请求时,获取所述目标监控设备的视频流数据的取流地址;向所述目标客户端返回所述取流地址,以使所述目标客户端按照所述取流地址,获取所述目标监控设备的视频流数据,并展示所述目标监控设备的视频流数据。In a possible implementation manner, the management node is further configured to: upon receiving the display request of the target client for the video stream data of the target monitoring device, obtain the fetching of the video stream data of the target monitoring device. Streaming address; return the streaming address to the target client, so that the target client obtains the video stream data of the target monitoring device according to the streaming address, and displays the video of the target monitoring device Stream data.
第二方面,本申请实施例提供了一种预览方法,所述方法包括:In the second aspect, an embodiment of the present application provides a preview method, and the method includes:
在获取到目标客户端的预览请求后,按照所述预览请求中待预览监控设备的标识,获取所述待预览监控设备所对应的封面图片的目标存储地址,其中,所述封面图片为时间戳与当前时刻最接近的封面图片,所述目标存储地址包括存储所述待预览监控设备的封面图片的存储节点的地址,所述待预览监控设备的封面图片是基于实时接收的所述待预览监控设备的视频流数据中的I帧生成的;After obtaining the preview request of the target client, according to the identification of the monitoring device to be previewed in the preview request, the target storage address of the cover image corresponding to the monitoring device to be previewed is obtained, where the cover image is a timestamp and The cover picture closest to the current moment, the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the monitoring device to be previewed received in real time Generated from the I frame in the video stream data;
将所述目标存储地址发送给所述目标客户端,以使所述目标客户端按照所述目标存储地址获取并预览所述待预览监控设备的封面图片。The target storage address is sent to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
在一种可能的实施方式中,所述方法还包括:In a possible implementation manner, the method further includes:
接收所述待预览监控设备实时采集的视频流数据;Receiving the video stream data collected by the monitoring device to be previewed in real time;
在所述视频数据中提取时间戳与当前时刻最接近的I帧;Extracting an I frame with a time stamp closest to the current time from the video data;
基于提取的I帧,生成所述待预览监控设备最新的封面图片;Based on the extracted I frame, generate the latest cover picture of the monitoring device to be previewed;
将所述待预览监控设备的封面图片存储在存储节点中。The cover picture of the monitoring device to be previewed is stored in the storage node.
在一种可能的实施方式中,所述将所述待预览监控设备的封面图片存储在存储节点中,包括:In a possible implementation manner, the storing the cover picture of the monitoring device to be previewed in a storage node includes:
将所述待预览监控设备的封面图片存储在存储节点的***盘中。The cover picture of the monitoring device to be previewed is stored in the system disk of the storage node.
在一种可能的实施方式中,所述在所述视频数据中提取时间戳与当前时刻最接近的I帧,包括:In a possible implementation manner, the extracting the I frame whose time stamp is closest to the current time from the video data includes:
按照预设采样周期,在到达指定采样时刻时,从所述指定采样时刻开始提取所述待预览监控设备的视频流数据中的第一帧I帧。According to the preset sampling period, when the designated sampling time is reached, the first I frame in the video stream data of the monitoring device to be previewed is extracted from the designated sampling time.
在一种可能的实施方式中,所述将所述待预览监控设备的封面图片存储在存储节点中,包括:In a possible implementation manner, the storing the cover picture of the monitoring device to be previewed in a storage node includes:
判断存储节点中是否存储有所述待预览监控设备的历史封面图片;Determine whether the historical cover picture of the monitoring device to be previewed is stored in the storage node;
若是,则删除所述待预览监控设备的历史封面图片,并存储当前生成的所述待预览监控设备的封面图片;If yes, delete the historical cover picture of the monitoring device to be previewed, and store the currently generated cover picture of the monitoring device to be previewed;
若否,则存储当前生成的所述待预览监控设备的封面图片。If not, store the currently generated cover picture of the monitoring device to be previewed.
第三方面,本申请实施例提供了一种预览装置,所述装置包括:In a third aspect, an embodiment of the present application provides a preview device, which includes:
存储地址获取模块,用于在获取到目标客户端的预览请求后,按照所述预览请求中待预览监控设备的标识,获取所述待预览监控设备的时间戳与当前时刻最接近的封面图片的目标存储地址,其中,所述目标存储地址包括存储所述待预览监控设备的封面图片的存储节点的地址,所述待预览监控设备的封面图片是基于实时接收的所述待预览监控设备的视频流数据中的I帧生成的;The storage address obtaining module is used to obtain the target of the cover image whose time stamp of the monitoring device to be previewed is closest to the current moment according to the identification of the monitoring device to be previewed in the preview request after obtaining the preview request of the target client A storage address, wherein the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the video stream of the monitoring device to be previewed received in real time Generated by the I frame in the data;
存储地址发送模块,用于将所述目标存储地址发送给所述目标客户端,以使所述目标客户端按照所述目标存储地址获取并预览所述待预览监控设备的封面图片。The storage address sending module is configured to send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
在一种可能的实施方式中,所述装置还包括:In a possible implementation manner, the device further includes:
视频流数据接收模块,用于接收所述待预览监控设备实时采集的视频流数据;The video stream data receiving module is configured to receive the video stream data collected in real time by the monitoring device to be previewed;
I帧提取模块,用于在所述视频数据中提取时间戳与当前时刻最接近的I帧;The I frame extraction module is used to extract the I frame whose time stamp is closest to the current time from the video data;
封面图片生成模块,用于基于提取的I帧,生成所述待预览监控设备最新的封面图片;A cover picture generating module, configured to generate the latest cover picture of the monitoring device to be previewed based on the extracted I frame;
封面图片存储模块,用于将所述待预览监控设备的封面图片存储在存储节点中。The cover picture storage module is used to store the cover picture of the monitoring device to be previewed in the storage node.
在一种可能的实施方式中,所述封面图片存储模块,具体用于:将所述待预览监控设备的封面图片存储在存储节点的***盘中。In a possible implementation manner, the cover picture storage module is specifically configured to store the cover picture of the monitoring device to be previewed in the system disk of the storage node.
在一种可能的实施方式中,所述I帧提取模块,具体用于:按照预设采样周期,在到达指定采样时刻时,从所述指定采样时刻开始提取所述待预览监控设备的视频流数据中的第一帧I帧。In a possible implementation manner, the I frame extraction module is specifically configured to: according to a preset sampling period, when the specified sampling time is reached, start to extract the video stream of the monitoring device to be previewed from the specified sampling time The first I frame in the data.
在一种可能的实施方式中,所述封面图片存储模块,具体用于:判断存储节点中是否存储有所述待预览监控设备的历史封面图片;若是,则删除所述待预览监控设备的历史封面图片,并存储当前生成的所述待预览监控设备的封面图片;若否,则存储当前生成的所述待预览监控设备的封面图片。In a possible implementation manner, the cover picture storage module is specifically configured to: determine whether the historical cover picture of the monitoring device to be previewed is stored in the storage node; if so, delete the history of the monitoring device to be previewed Cover picture, and store the currently generated cover picture of the monitoring device to be previewed; if not, store the currently generated cover picture of the monitoring device to be previewed.
第四方面,本申请实施例提供了一种电子设备,包括处理器及存储器;In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
所述存储器,用于存放计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述存储器上所存放的程序时,实现本申请中任一所述的预览方法。The processor is configured to implement any preview method described in this application when executing the program stored on the memory.
第五方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请中任一所述的预览方法。In the fifth aspect, an embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the preview described in any of the present applications is implemented. method.
第六方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品被处理器执行时实现本申请中任一所述的预览方法。In a sixth aspect, an embodiment of the present application provides a computer program product that, when executed by a processor, implements any preview method described in the present application.
本申请实施例提供的提供预览功能的云存储***及预览方法、装置,按照监控设备的I帧生成该监控设备的封面图片,向客户端发送待预览监控设备的封面图片以使客户端展示待预览监控设备的封面图片,用户可以直观的根据封面图片确定监控设备与监控场景的对应关系,有利于用户直观的了解监控区域的情况。当然,实施本申请的任一产品或方法并不一定需要同时达到 以上所述的所有优点。The cloud storage system and preview method and device that provide preview functions provided by the embodiments of the application generate the cover picture of the monitoring device according to the I frame of the monitoring device, and send the cover picture of the monitoring device to be previewed to the client so that the client can display the waiting Preview the cover picture of the monitoring device, and the user can intuitively determine the corresponding relationship between the monitoring device and the monitoring scene based on the cover picture, which is helpful for the user to intuitively understand the situation of the monitoring area. Of course, implementing any product or method of the present application does not necessarily need to achieve all the advantages described above at the same time.
附图说明Description of the drawings
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present application and the technical solutions of the prior art more clearly, the following briefly introduces the drawings that need to be used in the embodiments and the prior art. Obviously, the drawings in the following description are merely the present invention. For some of the embodiments of the application, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本申请实施例的提供预览功能的云存储***的第一种示意图;FIG. 1 is a first schematic diagram of a cloud storage system that provides a preview function according to an embodiment of the application;
图2为本申请实施例的提供预览功能的云存储***的第二种示意图;FIG. 2 is a second schematic diagram of a cloud storage system that provides a preview function according to an embodiment of the application;
图3为本申请实施例的封面图片生成方法的一种示意图;FIG. 3 is a schematic diagram of a method for generating a cover image according to an embodiment of the application;
图4为本申请实施例的预览方法的第一种示意图;FIG. 4 is a first schematic diagram of a preview method according to an embodiment of the application;
图5为本申请实施例的预览方法的第二种示意图;FIG. 5 is a second schematic diagram of a preview method according to an embodiment of the application;
图6为本申请实施例的封面图片存储方法的一种示意图;FIG. 6 is a schematic diagram of a cover image storage method according to an embodiment of the application;
图7为本申请实施例的客户端与云存储***交互的一种示意图;FIG. 7 is a schematic diagram of interaction between a client and a cloud storage system according to an embodiment of the application;
图8为本申请实施例的预览装置的第一种示意图;FIG. 8 is a first schematic diagram of a preview device according to an embodiment of the application;
图9为本申请实施例的预览装置的第二种示意图;FIG. 9 is a second schematic diagram of a preview device according to an embodiment of the application;
图10为本申请实施例的电子设备的一种示意图。FIG. 10 is a schematic diagram of an electronic device according to an embodiment of the application.
具体实施方式Detailed ways
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
首先,对本申请实施例中的专业术语进行解释:First, explain the technical terms in the embodiments of this application:
视频云存储:基于分布式存储架构,用于存储各种视频前端设备的录像数据的存储***。Video cloud storage: Based on a distributed storage architecture, a storage system used to store video data of various video front-end devices.
I帧:视频码流中的关键帧。I frame: the key frame in the video stream.
封面图片:对于某一个前端监控设备,其所采集的视频在某一时刻的一个画面。Cover image: For a certain front-end monitoring device, a picture of the video collected at a certain moment.
帧分析:将前端设备产生的视频码流进行解析,得到码流中的I帧,P帧等相关的帧信息,帧分析过程并不会改变码流的源数据。Frame analysis: Analyze the video code stream generated by the front-end equipment to obtain the I frame, P frame and other related frame information in the code stream. The frame analysis process does not change the source data of the code stream.
相关技术中,视频应用平台一般通过点位名称对监控设备进行区分,在展示界面上展示各监控设备的名称,用户根据监控设备的名称选取指定监控设备的视频数据进行展示。但是采用上述方法,在展示界面上展示各监控设备的名称,不利于用户直观的获取各监控设备与监控场景的对应关系,不利于用户直观的了解监控区域的情况。In related technologies, the video application platform generally distinguishes surveillance equipment by point names, displays the name of each surveillance equipment on the display interface, and the user selects the video data of the designated surveillance equipment for display according to the name of the surveillance equipment. However, using the above method to display the name of each monitoring device on the display interface is not conducive to the user's intuitive acquisition of the corresponding relationship between each monitoring device and the monitoring scene, and it is not conducive to the user's intuitive understanding of the monitoring area.
有鉴于此,本申请实施例提供了一种提供预览功能的云存储***,参见图1,该***包括:In view of this, an embodiment of the present application provides a cloud storage system that provides a preview function. Referring to FIG. 1, the system includes:
管理节点11及多个存储节点12; Management node 11 and multiple storage nodes 12;
存储节点12,用于接收指定监控设备实时采集的视频流数据;在视频流数据中提取I帧,生成指定监控设备的封面图片;存储视频流数据及指定监控设备的封面图片。The storage node 12 is used to receive the video stream data collected by the designated monitoring device in real time; extract I frames from the video stream data to generate the cover picture of the designated monitoring device; store the video stream data and the cover picture of the designated monitoring device.
管理节点11,用于在接收到目标客户端的预览请求后,按照预览请求中待预览监控设备的标识,获取待预览监控设备的时间戳与当前时刻最接近的封面图片的存储地址,作为目标存储地址,其中,目标存储地址包括存储待预览监控设备的封面图片的存储节点的地址;将目标存储地址发送给目标客户端,以使目标客户端按照目标存储地址获取并预览待预览监控设备的封面图片。The management node 11 is used to obtain the storage address of the cover image whose time stamp of the monitoring device to be previewed is closest to the current time according to the identification of the monitoring device to be previewed in the preview request after receiving the preview request of the target client, as the target storage Address, where the target storage address includes the address of the storage node that stores the cover image of the monitoring device to be previewed; the target storage address is sent to the target client, so that the target client obtains and previews the cover of the monitoring device to be previewed according to the target storage address image.
在云存储***中,存储节点12用于存储指定监控设备的视频流数据。存储节点12接收指定监控设备实时采集的视频流数据,从视频流数据中提取I帧,并根据提取的I帧生成该指定监控设备的封面图片。存储节点12存储视频流数据及封面图片。存储节点12提取I帧生成封面图片,是因为I帧解码为图像所消耗的计算性能最低,可以节约存储节点12的计算资源。In the cloud storage system, the storage node 12 is used to store the video stream data of the designated monitoring device. The storage node 12 receives the video stream data collected by the designated monitoring device in real time, extracts I frames from the video stream data, and generates a cover picture of the designated monitoring device according to the extracted I frames. The storage node 12 stores video stream data and cover pictures. The storage node 12 extracts the I frame to generate the cover picture, because the I frame decoded into an image consumes the lowest computing performance, which can save the computing resources of the storage node 12.
为了保证封面图片产生的即时性,可以在监控设备接入到存储节点后立即产生一张封面图片,即存储节点一获取到监控设备的码流(视频流数据),便立刻从码流中分析出I帧,并调用相关算法将I帧数据转换为图片格式,此后可以按照预设采样周期(如半小时等)生成监控设备的封面图片。一种实施方式中,存储节点可以删除之前生成的监控设备的封面图片,保存新生成的该监控设备的封面图片。从而对于每个监控设备,可以仅保存该监控设备的一张封面图片,以节约存储节点的存储资源。In order to ensure the immediacy of cover picture generation, a cover picture can be generated immediately after the monitoring device is connected to the storage node, that is, as soon as the storage node obtains the code stream (video stream data) of the monitoring device, it will immediately analyze it from the code stream The I frame is output, and the relevant algorithm is called to convert the I frame data into a picture format. After that, the cover picture of the monitoring device can be generated according to a preset sampling period (such as half an hour, etc.). In an implementation manner, the storage node may delete the previously generated cover picture of the monitoring device, and save the newly generated cover picture of the monitoring device. Therefore, for each monitoring device, only one cover picture of the monitoring device can be saved to save storage resources of the storage node.
用户希望预览封面图片时,利用目标客户端向管理节点11发送预览请求,预览请求中包括待预览监控设备的标识(预览监控设备可以为多个)。管理节点按照待预览监控设备的标识,在待预览监控设备的封面图片中,获取时间戳与当前时刻最接近的封面图片的存储地址,作为目标存储地址。其中,封面图片的时间戳可以为生成该封面图片的I帧的时间戳,也可以为该封面图片的生成时刻,或者为存储该封面图像的时刻等。目标存储地址包括存储相应封面图片的存储节点的地址,还可以包括相应封面图片在存储节点中的存储路径等。目标客户端根据目标存储地址下载相应的封面图片并进行展示。When the user wants to preview the cover picture, the target client is used to send a preview request to the management node 11, and the preview request includes the identification of the monitoring device to be previewed (the preview monitoring device may be multiple). According to the identification of the monitoring device to be previewed, the management node obtains the storage address of the cover picture whose time stamp is closest to the current moment in the cover picture of the monitoring device to be previewed, as the target storage address. The time stamp of the cover picture may be the time stamp of the I frame in which the cover picture is generated, the time when the cover picture is generated, or the time when the cover image is stored, and so on. The target storage address includes the address of the storage node that stores the corresponding cover picture, and may also include the storage path of the corresponding cover picture in the storage node. The target client downloads the corresponding cover picture according to the target storage address and displays it.
在一种可能的实施方式中,为了保证信息安全,管理节点11在接收到目标客户端针对待预览监控设备的封面图片的预览请求后,管理节点11还可以验证目标客户端是否具有针对待预览监控设备的使用权限,在目标客户端具有针对待预览监控设备的使用权限时,向目标客户端发送待预览监控设备的封面图片;在目标客户端不具有针对待预览监控设备的使用权限时,向该客户端返回错误提示。In a possible implementation manner, in order to ensure information security, after the management node 11 receives a preview request of the target client for the cover image of the monitoring device to be previewed, the management node 11 may also verify whether the target client has a preview request for the monitoring device to be previewed. The use permission of the monitoring device, when the target client has the use permission for the monitoring device to be previewed, the cover image of the monitoring device to be previewed is sent to the target client; when the target client does not have the use permission for the monitoring device to be previewed, Return an error message to the client.
在本申请实施例中,存储节点在存储监控设备的视频流数据时,还会存储通过I帧生成的该监控设备的封面图片。向客户端发送待预览监控设备的封面图片以使客户端展示待预览监控设备的封面图片,用户可以直观的根据封面图片确定监控设备与监控场景的对应关系,有利于用户直观的了解监控区域的情况。并且客户端展示的为时间戳与当前时刻最接近的封面图片,能够增加封面图片的实时性。In the embodiment of the present application, when the storage node stores the video stream data of the monitoring device, it will also store the cover picture of the monitoring device generated by the I frame. Send the cover picture of the monitoring device to be previewed to the client so that the client can display the cover picture of the monitoring device to be previewed. The user can intuitively determine the corresponding relationship between the monitoring device and the monitoring scene based on the cover picture, which is conducive to the user's intuitive understanding of the monitoring area Happening. And the client shows the cover picture whose time stamp is closest to the current time, which can increase the real-time nature of the cover picture.
封面图片可以存储在存储节点的***盘中。在一种可能的实施方式中,上述存储节点12具体用于:将指定监控设备的封面图片存储在存储节点的***盘中。The cover picture can be stored in the system disk of the storage node. In a possible implementation manner, the aforementioned storage node 12 is specifically configured to store the cover picture of the designated monitoring device in the system disk of the storage node.
云存储***可以为分布式存储***,在一种可能的实施方式中,云存储***的架构具体可以如图2所示,管理节点用于负责各存储节点的负载均衡,并对各存储节点进行管理;存储节点用于生成各封面图片,并且用于存储视频流数据及封面图片。存储节点包括***盘及数据盘。由于封面图片主要是用来提供给平台客户端进行提取展示,且平台客户端何时需要提取封面图片进行展示并不确定,因此还需要将封面图片进行存储,以随时为不同的平台客户端提供封面图片展示服务。The cloud storage system may be a distributed storage system. In a possible implementation manner, the architecture of the cloud storage system may be specifically as shown in Figure 2. The management node is used to balance the load of each storage node and perform processing on each storage node. Management; the storage node is used to generate each cover picture, and is used to store the video stream data and the cover picture. Storage nodes include system disks and data disks. Because the cover image is mainly used to provide the platform client for extraction and display, and it is not certain when the platform client needs to extract the cover image for display, it is also necessary to store the cover image to provide it for different platform clients at any time Cover image display service.
封面图片的提取有即时性,且存在快速展示大量监控设备的封面图片的 需求。发明人在研究中发现,如果将封面图片存储到数据盘中与视频流数据一起存储,封面图片的频繁读写会对视频流数据存储性能产生影响。另外由于数据盘中的视频流数据存储一般是通过虚拟化成资源池的方式来使用的,因此还需要专门划分空间来存储封面图片,实现过程繁琐。而将封面图片存储在存储节点的***盘中,实现过程简单,且能够减少对视频流数据存储的影响。The extraction of cover pictures is instantaneous, and there is a need to quickly display cover pictures of a large number of surveillance equipment. The inventor found in research that if the cover picture is stored in a data disk and stored together with the video stream data, frequent reading and writing of the cover picture will have an impact on the storage performance of the video stream data. In addition, since the video stream data storage in the data disk is generally used by virtualizing it into a resource pool, a special space is needed to store the cover image, which is cumbersome to implement. However, storing the cover picture in the system disk of the storage node is simple to implement and can reduce the impact on the storage of video stream data.
在一种可能的实施方式中,上述存储节点12,具体用于:判断存储节点中是否存储有指定监控设备的历史封面图片;若是,则删除指定监控设备的历史封面图片,并存储当前生成的该指定监控设备的封面图片;若否,则存储当前生成的该指定监控设备的封面图片。In a possible implementation manner, the above-mentioned storage node 12 is specifically used to: determine whether the historical cover picture of the designated monitoring device is stored in the storage node; if so, delete the historical cover picture of the designated monitoring device and store the currently generated The cover picture of the designated monitoring device; if not, the currently generated cover picture of the designated monitoring device is stored.
针对接入存储节点的每一个指定监控设备,该存储节点检测本地是否存储有该指定监控设备的历史封面图片;若是,则删除该指定监控设备的历史封面图片,并存储当前生成的该指定监控设备的封面图片;若否,则存储当前生成的该指定监控设备的封面图片。上述删除指定监控设备的历史封面图片,并存储当前生成的该指定监控设备的封面图片,可以等效替换为:通过当前生成的指定监控设备的封面图片,覆盖该指定监控设备的历史封面图片。For each designated monitoring device connected to the storage node, the storage node detects whether the historical cover picture of the designated monitoring device is stored locally; if so, deletes the historical cover picture of the designated monitoring device, and stores the currently generated designated monitoring The cover picture of the device; if not, the currently generated cover picture of the specified monitoring device is stored. The above-mentioned deleting the historical cover picture of the designated monitoring device and storing the currently generated cover picture of the designated monitoring device can be equivalently replaced with: covering the historical cover picture of the designated monitoring device through the currently generated cover picture of the designated monitoring device.
为了节约存储空间,针对每个监控设备可以仅保存一张最新的封面图片。考虑到每个存储节点负责的监控设备数量是有限的,一般在500路以下,而每个监控设备只需存储一张封面图片,按照封面图片大小为2MB(兆字节)计算,总共需要的存储空间为1GB(吉字节)左右,当所有接入的监控设备的封面图片均生成以后,封面图片所占用的存储空间大小将不会继续增长。因此针对每个存储节点,可以将接入该存储节点的各监控设备的封面图片存储在该存储节点的***盘中,例如,可以在存储节点的***盘中新建一个目录,用于存储封面图片。In order to save storage space, only one latest cover picture can be saved for each monitoring device. Taking into account that the number of monitoring devices that each storage node is responsible for is limited, generally less than 500 channels, and each monitoring device only needs to store one cover image, calculated according to the cover image size of 2MB (megabytes), the total required The storage space is about 1GB (gigabytes). After the cover pictures of all connected monitoring devices are generated, the storage space occupied by the cover pictures will not continue to grow. Therefore, for each storage node, the cover image of each monitoring device connected to the storage node can be stored in the system disk of the storage node. For example, a new directory can be created in the system disk of the storage node to store the cover image .
在一种可能的实施方式中,上述存储节点12,还用于将指定监控设备封面图片的存储地址及指定监控设备的标识发送给管理节点。In a possible implementation manner, the above-mentioned storage node 12 is also used to send the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device to the management node.
上述管理节点11,还用于接收指定监控设备封面图片的存储地址及指定监控设备的标识;关联存储指定监控设备封面图片的存储地址及指定监控设备的标识。The above-mentioned management node 11 is also used to receive the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device; and store the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device in association.
例如图3所示,指定存储节点获取指定监控设备的封面图片;将封面图片写入到指定存储节点的***盘中;指定存储节点将指定监控设备的标识及 指定监控设备封面图片的存储路径(即存储地址)上报给管理节点;管理节点将指定监控设备的标识及指定监控设备封面图片的存储路径进行关联存储,例如,可以存储到管理节点的数据库中。For example, as shown in Figure 3, the designated storage node obtains the cover picture of the designated monitoring device; writes the cover picture to the system disk of the designated storage node; the designated storage node will specify the identification of the monitoring device and the storage path of the designated monitoring device cover picture ( That is, the storage address) is reported to the management node; the management node associates and stores the identification of the designated monitoring device and the storage path of the cover picture of the designated monitoring device, for example, it can be stored in the database of the management node.
此处关联存储的方式包括但不限于标签、表格、指针等。关联存储的目的是为了方便后续可以根据监控设备的标识,快速获取该监控设备的封面图片。在本申请实施例中,管理节点11关联存储指定监控设备封面图片的存储地址及指定监控设备的标识,方便管理节点11后续根据指定监控设备的标识查询到该指定监控设备的封面图像的存储地址。The associated storage methods here include but are not limited to labels, tables, pointers, and so on. The purpose of associative storage is to facilitate the subsequent quick acquisition of the cover picture of the monitoring device according to the identification of the monitoring device. In the embodiment of the present application, the management node 11 stores the storage address of the cover image of the designated monitoring device and the identification of the designated monitoring device in association, so that the management node 11 can subsequently query the storage address of the cover image of the designated monitoring device according to the identification of the designated monitoring device. .
在一种可能的实施方式中,上述管理节点11还用于:在接收到目标客户端针对目标监控设备的视频流数据的展示请求时,获取目标监控设备的视频流数据的取流地址;向目标客户端返回取流地址,以使目标客户端按照取流地址,获取目标监控设备的视频流数据,并展示目标监控设备的视频流数据。In a possible implementation manner, the above-mentioned management node 11 is further configured to: upon receiving the display request of the target client for the video stream data of the target monitoring device, obtain the streaming address of the video stream data of the target monitoring device; The target client returns the fetching address, so that the target client obtains the video stream data of the target monitoring device according to the fetching address, and displays the video stream data of the target monitoring device.
目标监控设备可以为待预览监控设备中的一个或多个。用户可以根据封面图片选取视频流数据进行展示,管理节点11在接收到目标客户端针对目标监控设备的视频流数据的展示请求时,获取目标监控设备的视频流数据的取流地址;向目标客户端返回取流地址,以使目标客户端按照取流地址,获取并展示目标监控设备的视频流数据。The target monitoring device may be one or more of the monitoring devices to be previewed. The user can select the video stream data for display according to the cover picture. When receiving the display request of the target client for the video stream data of the target monitoring device, the management node 11 obtains the streaming address of the video stream data of the target monitoring device; The terminal returns the fetching address so that the target client can obtain and display the video stream data of the target monitoring device according to the fetching address.
本申请实施例提供了一种预览方法,参见图4,该方法包括:The embodiment of the present application provides a preview method. Referring to FIG. 4, the method includes:
S401,在获取到目标客户端的预览请求后,按照预览请求中待预览监控设备的标识,获取待预览监控设备的时间戳与当前时刻最接近的封面图片的目标存储地址,其中,目标存储地址包括存储待预览监控设备的封面图片的存储节点的地址,待预览监控设备的封面图片是基于实时接收的待预览监控设备的视频流数据中的I帧生成的。S401: After obtaining the preview request of the target client, according to the identification of the monitoring device to be previewed in the preview request, obtain the target storage address of the cover image whose timestamp of the monitoring device to be previewed is closest to the current moment, where the target storage address includes The address of the storage node that stores the cover picture of the monitoring device to be previewed. The cover picture of the monitoring device to be previewed is generated based on the I frame in the video stream data of the monitoring device to be previewed received in real time.
待预览监控设备可以为任意一个监控设备,云存储***负责存储各监控设备采集的视频流数据。本申请实施例中以一个监控设备(即待预览监控设备)为例进行说明,本领域技术人员可以理解的是,针对云存储***连接的各监控设备,均可以执行本申请实施例的预览方法。The monitoring device to be previewed can be any monitoring device, and the cloud storage system is responsible for storing the video stream data collected by each monitoring device. In the embodiment of this application, a monitoring device (that is, the monitoring device to be previewed) is taken as an example for description. Those skilled in the art can understand that each monitoring device connected to the cloud storage system can execute the preview method of the embodiment of this application. .
S402,将目标存储地址发送给目标客户端,以使目标客户端按照目标存储地址获取并预览待预览监控设备的封面图片。S402: Send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
在接收到目标客户端针对待预览监控设备的封面图片的预览请求后,向 目标客户端发送待预览监控设备的封面图片After receiving the preview request of the target client for the cover image of the monitoring device to be previewed, send the cover image of the monitoring device to be previewed to the target client
本申请实施例的预览方法应用于云存储***,因此可以通过云存储***执行,具体的,可以通过云存储***中的管理节点及存储节点执行,例如,步骤S401及S402可以通过管理节点实现,存储节点用于存储封面图片。The preview method of the embodiment of the present application is applied to a cloud storage system, so it can be executed by the cloud storage system. Specifically, it can be executed by the management node and the storage node in the cloud storage system. For example, steps S401 and S402 can be implemented by the management node. The storage node is used to store the cover picture.
在本申请实施例中,向客户端发送待预览监控设备的封面图片以使客户端展示待预览监控设备的封面图片,用户可以直观的根据封面图片确定监控设备与监控场景的对应关系,有利于用户直观的了解监控区域的情况。并且客户端展示的为时间戳与当前时刻最接近的封面图片,能够增加封面图片的实时性。In the embodiment of this application, the cover picture of the monitoring device to be previewed is sent to the client so that the client can display the cover picture of the monitoring device to be previewed. The user can intuitively determine the correspondence between the monitoring device and the monitoring scene based on the cover picture, which is beneficial to The user intuitively understands the situation of the monitoring area. And the client shows the cover picture whose time stamp is closest to the current time, which can increase the real-time nature of the cover picture.
在一种可能的实施方式中,参见图5,上述方法还包括:In a possible implementation manner, referring to FIG. 5, the above method further includes:
S501,接收待预览监控设备实时采集的视频流数据。S501: Receive video stream data collected in real time by a monitoring device to be previewed.
S502,在视频数据中提取时间戳与当前时刻最接近的I帧。S502: Extract the I frame whose time stamp is closest to the current time from the video data.
云存储***的存储节点接收待预览监控设备实时采集的视频流数据,并可以通过帧分析技术,识别出视频流数据中的I帧,并提取时间戳与当前时刻最接近的I帧。在一种可能的实施方式中,上述在视频数据中提取时间戳与当前时刻最接近的I帧,包括:按照预设采样周期,在到达指定采样时刻时,从指定采样时刻开始提取待预览监控设备的视频流数据中的第一帧I帧。The storage node of the cloud storage system receives the video stream data collected in real time by the monitoring device to be previewed, and can identify the I frame in the video stream data through frame analysis technology, and extract the I frame with the time stamp closest to the current moment. In a possible implementation manner, the above-mentioned extracting the I frame whose time stamp is closest to the current time from the video data includes: according to a preset sampling period, when the specified sampling time is reached, extract the to-be-reviewed monitoring from the specified sampling time. The first I frame in the device's video stream data.
为了保证封面图片产生的即时性,可以在监控设备接入到云存储***后立即产生一张封面图片,即云存储***的存储节点一获取到监控设备的码流后,立刻从码流中分析出来I帧,并调用相关算法将I帧数据转换为图片格式,此后可以按照预设采样周期(如半小时等)生成该监控设备的封面图片。一种实施方式中,可以删除之前生成的该监控设备的历史封面图片,保存新生成的该监控设备的封面图片。从而对于每个监控设备,云存储***中可以仅保存该监控设备的一张封面图片。In order to ensure the immediacy of cover image generation, a cover image can be generated immediately after the monitoring device is connected to the cloud storage system, that is, as soon as the storage node of the cloud storage system obtains the code stream of the monitoring device, it will be analyzed from the code stream immediately The I frame is generated, and the relevant algorithm is called to convert the I frame data into a picture format. After that, the cover picture of the monitoring device can be generated according to a preset sampling period (such as half an hour, etc.). In an implementation manner, the previously generated historical cover picture of the monitoring device may be deleted, and the newly generated cover picture of the monitoring device may be saved. Therefore, for each monitoring device, only one cover picture of the monitoring device can be saved in the cloud storage system.
本领域技术人员可以理解的是,还可以选取接收时间距离指定采样时刻最近的I帧,或选取接收时刻在指定采样时刻前、且接收时间与指定采样时刻最接近的I帧等。但是按照视频流数据中各视频帧的接收时间,从当前时刻开始提取上述视频流数据中的第一帧I帧,相比于提取指定采样时刻前的I帧,不用去存储节点中读取数据,能够减少存储节点的处理压力,提高封面图片的生成效率。Those skilled in the art can understand that the I frame whose receiving time is closest to the designated sampling time can also be selected, or the I frame whose receiving time is before the designated sampling time and whose receiving time is closest to the designated sampling time can also be selected. However, according to the receiving time of each video frame in the video stream data, the first I frame in the video stream data is extracted from the current time. Compared with extracting the I frame before the specified sampling time, there is no need to go to the storage node to read the data. , Which can reduce the processing pressure of storage nodes and improve the generation efficiency of cover pictures.
S503,基于提取的I帧,生成待预览监控设备最新的封面图片。S503: Generate the latest cover picture of the monitoring device to be previewed based on the extracted I frame.
云存储***的存储节点通过相关的解码方法对I帧进行处理,得到I帧的图像,即待预览监控设备的封面图片。The storage node of the cloud storage system processes the I frame through a related decoding method to obtain an image of the I frame, that is, the cover image of the monitoring device to be previewed.
S504,将待预览监控设备的封面图片存储在存储节点中。S504: Store the cover picture of the monitoring device to be previewed in the storage node.
客户端何时需要提取封面图片进行展示是随机的,因此云存储***的存储节点还需要将封面图片进行存储,以随时为不同的客户端提供封面图片展示服务。在一种可能的实施方式中,参见图6,上述将待预览监控设备的封面图片存储在存储节点中,包括:When the client needs to extract the cover picture for display is random, so the storage node of the cloud storage system also needs to store the cover picture to provide cover picture display services for different clients at any time. In a possible implementation manner, referring to FIG. 6, the foregoing storing the cover picture of the monitoring device to be previewed in the storage node includes:
S5041,判断存储节点中是否存储有待预览监控设备的历史封面图片。S5041: Determine whether a historical cover picture of the monitoring device to be previewed is stored in the storage node.
S5042,若是,则删除待预览监控设备的历史封面图片,并存储当前生成的待预览监控设备的封面图片。S5042: If yes, delete the historical cover picture of the monitoring device to be previewed, and store the currently generated cover picture of the monitoring device to be previewed.
S5043,若否,则存储当前生成的待预览监控设备的封面图片。S5043: If not, store the currently generated cover picture of the monitoring device to be previewed.
在一种可能的实施方式中,待预览监控设备的封面图片存储在存储节点的***盘中。In a possible implementation manner, the cover picture of the monitoring device to be previewed is stored in the system disk of the storage node.
云存储***可以为分布式存储***,在一种可能的实施方式中,云存储***的架构可以如图2所示,管理节点用于负责各存储节点的负载均衡,并对各存储节点进行管理,存储节点用于生成各封面图片,并且用于存储视频流数据及封面图片。存储节点包括***盘及数据盘。由于封面图片主要是用来提供给平台客户端进行提取展示,且客户端何时需要提取封面图片进行展示并不确定,因此还可以将封面图片进行存储,以随时为不同的平台客户端提供封面图片展示服务。The cloud storage system may be a distributed storage system. In a possible implementation, the architecture of the cloud storage system may be as shown in Figure 2. The management node is used to balance the load of each storage node and manage each storage node , The storage node is used to generate each cover picture, and is used to store the video stream data and the cover picture. Storage nodes include system disks and data disks. Because the cover image is mainly used to provide the platform client for extraction and display, and it is not certain when the client needs to extract the cover image for display, the cover image can also be stored to provide cover for different platform clients at any time Picture display service.
封面图片的提取有即时性,且存在快速展示大量监控设备的封面图片的需求。发明人在研究中发现,如果将封面图片存储到数据盘中与视频流数据一起存储,封面图片的频繁读写会对视频流数据存储性能产生影响。另外由于数据盘中的视频流数据存储一般是通过虚拟化成资源池的方式来使用,因此还需要专门划分空间来存储封面图片,实现过程繁琐。考虑到每个存储节点负责的监控设备数量是有限的,一般在500路以下,而每个监控设备只需存储一张封面图片,按照封面图片大小为2MB(兆字节)计算,总共需要的存储空间为1GB(吉字节)左右,当所有接入的监控设备的封面图片均生成以后,封面图片所占用的存储空间大小将不会继续增长。因此针对每个存储节点,可以将存储节点接入的监控设备的封面图片存储在该存储节点的***盘中,例如,可以在存储节点的***盘中新建一个目录,用于存储封面图片。The extraction of cover pictures is instantaneous, and there is a need to quickly display cover pictures of a large number of surveillance equipment. The inventor found in research that if the cover picture is stored in a data disk and stored together with the video stream data, frequent reading and writing of the cover picture will have an impact on the storage performance of the video stream data. In addition, because the video stream data storage in the data disk is generally used by virtualizing it into a resource pool, a special space is needed to store the cover picture, which is cumbersome to implement. Taking into account that the number of monitoring devices that each storage node is responsible for is limited, generally less than 500 channels, and each monitoring device only needs to store one cover image, calculated according to the cover image size of 2MB (megabytes), the total required The storage space is about 1GB (gigabytes). After the cover pictures of all connected monitoring devices are generated, the storage space occupied by the cover pictures will not continue to grow. Therefore, for each storage node, the cover image of the monitoring device accessed by the storage node can be stored in the system disk of the storage node. For example, a new directory can be created in the system disk of the storage node to store the cover image.
本申请实施例还提供了一种预览方法,应用于客户端,该方法包括:The embodiment of the present application also provides a preview method, which is applied to the client, and the method includes:
步骤A,向云存储***发送针对待预览监控设备的封面图片的预览请求。Step A: Send a preview request for the cover picture of the monitoring device to be previewed to the cloud storage system.
本申请实施例的预览方法应用于客户端,因此可以通过客户端实现。具体的,客户端可以为个人电脑或智能手机等设备。The preview method of the embodiment of the present application is applied to the client, and therefore can be implemented by the client. Specifically, the client can be a personal computer or a smart phone and other devices.
待预览监控设备可以为任意一个监控设备,云存储***负责存储待预览监控设备采集的视频流数据。当需要展示待预览监控设备的封面图片时,客户端生成针对待预览监控设备的封面图片的预览请求,并向云存储***发送该预览请求。The monitoring device to be previewed can be any monitoring device, and the cloud storage system is responsible for storing the video stream data collected by the monitoring device to be previewed. When the cover picture of the monitoring device to be previewed needs to be displayed, the client generates a preview request for the cover picture of the monitoring device to be previewed, and sends the preview request to the cloud storage system.
步骤B,接收由云存储***返回的上述待预览监控设备的封面图片,其中,上述待预览监控设备的封面图片是根据上述待预览监控设备采集的视频流数据的I帧生成的。Step B: Receive the cover picture of the monitoring device to be previewed returned by the cloud storage system, where the cover picture of the monitoring device to be previewed is generated based on the I frame of the video stream data collected by the monitoring device to be previewed.
客户端接收由云存储***返回的待预览监控设备的封面图片。待预览监控设备的封面图片的生成过程可以参见上述预览方法中封面图片的生成过程,此处不再赘述。The client receives the cover picture of the monitoring device to be previewed returned by the cloud storage system. For the generation process of the cover picture of the monitoring device to be previewed, please refer to the generation process of the cover picture in the above preview method, which will not be repeated here.
步骤C,在上述待预览监控设备对应的预览位置,展示上述待预览监控设备的封面图片。Step C: At the preview position corresponding to the monitoring device to be previewed, the cover picture of the monitoring device to be previewed is displayed.
客户端在待预览监控设备对应的预览位置中展示待预览监控设备的封面图片。本领域技术人员可以理解的是,客户端中预先针对不同的监控设备设置不同的预览位置,客户端可以发送针对一个或多个监控设备的封面图片的预览请求。针对每个监控设备,需要在该监控设备对应的预览位置处展示该监控设备的封面图片。The client displays the cover picture of the monitoring device to be previewed in the preview position corresponding to the monitoring device to be previewed. Those skilled in the art can understand that different preview positions are set in advance for different monitoring devices in the client, and the client can send a preview request for the cover image of one or more monitoring devices. For each monitoring device, the cover picture of the monitoring device needs to be displayed at the corresponding preview position of the monitoring device.
在一种可能的实施方式中,云存储***与客户端的数据交互过程可以如图7所示,其中,云存储***的架构如图2所示。1.客户端向管理节点发送针对目标监控设备的封面图片的预览请求;2.管理节点按照目标监控设备的标识,从数据库中查询目标监控设备的封面图片的存储路径;3.管理节点获取数据库返回的目标监控设备的封面图片的存储路径;4.管理节点将目标监控设备封面图片的存储路径返回给客户端;5.客户端按照目标监控设备封面图片的存储路径从相应的存储节点中进行取流;6.客户端获取目标监控设备的封面图片。In a possible implementation manner, the data interaction process between the cloud storage system and the client can be shown in FIG. 7, wherein the architecture of the cloud storage system is shown in FIG. 2. 1. The client sends a preview request for the cover image of the target monitoring device to the management node; 2. The management node queries the database for the storage path of the cover image of the target monitoring device according to the identification of the target monitoring device; 3. The management node obtains the database The storage path of the cover picture of the returned target monitoring device; 4. The management node returns the storage path of the cover picture of the target monitoring device to the client; 5. The client performs the storage path according to the storage path of the cover picture of the target monitoring device from the corresponding storage node Get the stream; 6. The client obtains the cover picture of the target monitoring device.
在本申请实施例中,获取云存储***中目标监控设备的封面图片,封面图片是按照目标监控设备的I帧生成的;并在目标监控设备对应的展示区域展示目标监控设备的封面图片,用户可以直观的根据封面图片确定监控设备与 监控场景的对应关系,有利于用户直观的了解监控区域的情况。In the embodiment of this application, the cover picture of the target monitoring device in the cloud storage system is obtained. The cover picture is generated according to the I frame of the target monitoring device; and the cover picture of the target monitoring device is displayed in the display area corresponding to the target monitoring device. The corresponding relationship between the monitoring equipment and the monitoring scene can be determined intuitively based on the cover picture, which is conducive to the user's intuitive understanding of the monitoring area.
在一种可能的实施方式中,用户可以通过封面图片实现播放视频流数据,本申请实施例的应用于客户端的预览方法还包括:In a possible implementation manner, the user can play the video stream data through the cover picture. The preview method applied to the client in the embodiment of the present application further includes:
步骤一,在获取到用户针对目标监控设备的封面图像的触发指令时,生成针对上述目标监控设备的视频流数据展示指令。Step 1: When the user's trigger instruction for the cover image of the target monitoring device is obtained, the video stream data display instruction for the target monitoring device is generated.
目标监控设备可以为任意一个监控设备。用户针对目标监控设备的封面图像的触发指令,可以为用户通过鼠标点击目标监控设备的封面图像或相关按钮后生成的,还可以为用户通过触摸屏点击目标监控设备的封面图像或相关按钮后生成的,均在本申请的保护范围内。The target monitoring device can be any monitoring device. The user's trigger instruction for the cover image of the target monitoring device can be generated after the user clicks the cover image or related buttons of the target monitoring device through the mouse, or generated after the user clicks the cover image or related buttons of the target monitoring device through the touch screen , Are all within the protection scope of this application.
步骤二,发送针对上述目标监控设备的视频流数据展示指令,以使上述云存储***在接收到针对上述目标监控设备的视频流数据展示指令后,返回上述目标监控设备的视频流数据。Step 2: Send a video stream data display instruction for the target monitoring device, so that the cloud storage system returns the video stream data of the target monitoring device after receiving the video stream data display instruction for the target monitoring device.
客户端向云存储***发送针对目标监控设备的视频流数据展示指令。云存储***在接收到该展示指令后,向客户端返回目标监控设备的视频流数据。The client sends a video stream data display instruction for the target monitoring device to the cloud storage system. After receiving the display instruction, the cloud storage system returns the video stream data of the target monitoring device to the client.
步骤三,获取上述目标监控设备的视频流数据,并展示上述目标监控设备的视频流数据。Step 3: Obtain the video stream data of the above-mentioned target monitoring device, and display the video stream data of the above-mentioned target monitoring device.
客户端接收目标监控设备的视频流数据,并在预设展示窗口中展示目标监控设备的视频流数据。The client receives the video stream data of the target monitoring device, and displays the video stream data of the target monitoring device in a preset display window.
本申请实施例还提供了一种预览***,该预览***包括:The embodiment of the present application also provides a preview system, which includes:
云存储***及客户端;Cloud storage system and client;
上述云存储***,用于获取目标监控设备采集的视频流数据;提取上述视频流数据中的I帧;根据上述I帧,生成封面图片;The above cloud storage system is used to obtain the video stream data collected by the target monitoring device; extract the I frame in the above video stream data; generate the cover picture according to the above I frame;
上述客户端,用于向上述云存储***发送针对上述目标监控设备的封面图片的预览请求;The above client is configured to send a preview request for the cover picture of the target monitoring device to the cloud storage system;
上述云存储***,还用于在接收到针对上述目标监控设备的封面图片的预览请求后,向发送上述预览请求的客户端发送上述目标监控设备的封面图片;The cloud storage system is further configured to send the cover picture of the target monitoring device to the client that sent the preview request after receiving the preview request for the cover picture of the target monitoring device;
上述客户端,还用于接收由上述云存储***返回的上述目标监控设备的封面图片;在上述目标监控设备对应的预览位置,展示上述目标监控设备的封面图像。The client is also used to receive the cover image of the target monitoring device returned by the cloud storage system; and display the cover image of the target monitoring device in the preview position corresponding to the target monitoring device.
在一种可能的实施方式中,上述云存储***还可以实现上述任一应用于 云存储***的预览方法,上述客户端还可以实现上述任一应用于客户端的预览方法。In a possible implementation manner, the aforementioned cloud storage system may also implement any of the foregoing preview methods applied to the cloud storage system, and the foregoing client may also implement any of the foregoing preview methods applied to the client.
在一种可能的实施方式中,预览***还包括:多个监控设备;In a possible implementation manner, the preview system further includes: multiple monitoring devices;
上述监控设备,用于采集指定监控区域的视频流数据,并将采集的视频流数据发送给上述云存储***。The aforementioned monitoring equipment is used to collect video stream data in a designated monitoring area and send the collected video stream data to the aforementioned cloud storage system.
本申请实施例还提供了一种预览装置,参见图8,该装置包括:The embodiment of the present application also provides a preview device. Referring to FIG. 8, the device includes:
存储地址获取模块801,用于在获取到目标客户端的预览请求后,按照上述预览请求中待预览监控设备的标识,获取上述待预览监控设备的时间戳与当前时刻最接近的封面图片的目标存储地址,其中,上述目标存储地址包括存储上述待预览监控设备的封面图片的存储节点的地址,上述待预览监控设备的封面图片是基于实时接收的上述待预览监控设备的视频流数据中的I帧生成的;The storage address obtaining module 801 is configured to obtain the target storage of the cover image whose time stamp of the monitoring device to be previewed is closest to the current time according to the identification of the monitoring device to be previewed in the preview request after obtaining the preview request of the target client Address, wherein the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the I frame in the video stream data of the monitoring device to be previewed received in real time Generated;
存储地址发送模块802,用于将上述目标存储地址发送给上述目标客户端,以使上述目标客户端按照上述目标存储地址获取并预览上述待预览监控设备的封面图片。The storage address sending module 802 is configured to send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
在一种可能的实施方式中,上述装置还包括:In a possible implementation manner, the foregoing device further includes:
视频流数据接收模块,用于接收上述待预览监控设备实时采集的视频流数据;The video stream data receiving module is used to receive the video stream data collected by the monitoring device to be previewed in real time;
I帧提取模块,用于在上述视频数据中提取时间戳与当前时刻最接近的I帧;The I-frame extraction module is used to extract the I-frame whose time stamp is closest to the current time from the above-mentioned video data;
封面图片生成模块,用于基于提取的I帧,生成上述待预览监控设备最新的封面图片;A cover picture generation module for generating the latest cover picture of the monitoring device to be previewed based on the extracted I frame;
封面图片存储模块,用于将上述待预览监控设备的封面图片存储在存储节点中。The cover picture storage module is used to store the cover picture of the monitoring device to be previewed in the storage node.
在一种可能的实施方式中,上述封面图片存储模块,具体用于:将上述待预览监控设备的封面图片存储在存储节点的***盘中。In a possible implementation manner, the cover picture storage module is specifically configured to store the cover picture of the monitoring device to be previewed in the system disk of the storage node.
在一种可能的实施方式中,上述I帧提取模块,具体用于:按照预设采样周期,在到达指定采样时刻时,从上述指定采样时刻开始提取上述待预览监控设备的视频流数据中的第一帧I帧。In a possible implementation manner, the aforementioned I-frame extraction module is specifically configured to: according to a preset sampling period, when the specified sampling time is reached, start to extract the video stream data of the aforementioned monitoring device to be previewed from the specified sampling time. The first frame I frame.
在一种可能的实施方式中,上述封面图片存储模块,具体用于:判断存储节点中是否存储有上述待预览监控设备的历史封面图片;若是,则删除上 述待预览监控设备的历史封面图片,并存储当前生成的上述待预览监控设备的封面图片;若否,则存储当前生成的上述待预览监控设备的封面图片。In a possible implementation manner, the cover picture storage module is specifically configured to: determine whether the historical cover picture of the monitoring device to be previewed is stored in the storage node; if so, delete the historical cover picture of the monitoring device to be previewed, And store the currently generated cover picture of the aforementioned monitoring device to be previewed; if not, store the currently generated cover picture of the aforementioned monitoring device to be previewed.
本申请实施例还提供了一种预览装置,参见图9,应用于客户端,该装置包括:The embodiment of the present application also provides a preview device. Referring to FIG. 9, it is applied to a client terminal, and the device includes:
图片预览请求模块901,用于向云存储***发送针对目标监控设备的封面图片的预览请求;The picture preview request module 901 is configured to send a preview request for the cover picture of the target monitoring device to the cloud storage system;
封面图片接收模块902,用于接收由云存储***返回的所述目标监控设备的封面图片,其中,所述目标监控设备的封面图片是根据所述目标监控设备采集的视频流数据的I帧生成的;The cover picture receiving module 902 is configured to receive the cover picture of the target monitoring device returned by the cloud storage system, where the cover picture of the target monitoring device is generated based on the I frame of the video stream data collected by the target monitoring device of;
封面图片展示模块903,用于在所述目标监控设备对应的预览位置,展示所述目标监控设备的封面图片。The cover picture display module 903 is configured to display the cover picture of the target monitoring device in the preview position corresponding to the target monitoring device.
可选的,本申请实施例的应用于客户端的预览装置还包括:Optionally, the preview device applied to the client in the embodiment of the present application further includes:
视频预览请求模块,用于在获取到用户针对所述目标监控设备的封面图像的触发指令时,生成针对所述目标监控设备的视频流数据展示指令;The video preview request module is configured to generate a video stream data display instruction for the target monitoring device when the user's triggering instruction for the cover image of the target monitoring device is obtained;
视频数据接收模块,用于发送针对所述目标监控设备的视频流数据展示指令,以使所述云存储***在接收到针对所述目标监控设备的视频流数据展示指令后,返回所述目标监控设备的视频流数据;The video data receiving module is configured to send a video stream data display instruction for the target monitoring device, so that the cloud storage system returns to the target monitoring device after receiving the video stream data display instruction for the target monitoring device Video streaming data of the device;
视频数据展示模块,用于获取所述目标监控设备的视频流数据,并展示所述目标监控设备的视频流数据。The video data display module is used to obtain the video stream data of the target monitoring device and display the video stream data of the target monitoring device.
本申请实施例还提供了一种电子设备,包括:处理器及存储器;The embodiment of the present application also provides an electronic device, including: a processor and a memory;
上述存储器,用于存放计算机程序The above-mentioned memory is used to store computer programs
上述处理器用于执行上述存储器存放的计算机程序时,实现如下步骤:When the processor is used to execute the computer program stored in the memory, the following steps are implemented:
向云存储***发送针对目标监控设备的封面图片的预览请求;Send a preview request for the cover image of the target monitoring device to the cloud storage system;
接收由云存储***返回的上述目标监控设备的封面图片,其中,上述目标监控设备的封面图片是根据上述目标监控设备采集的视频流数据的I帧生成的;Receiving the cover picture of the target monitoring device returned by the cloud storage system, where the cover picture of the target monitoring device is generated based on the I frame of the video stream data collected by the target monitoring device;
在上述目标监控设备对应的预览位置,展示上述目标监控设备的封面图片。At the preview position corresponding to the above-mentioned target monitoring device, the cover picture of the above-mentioned target monitoring device is displayed.
可选的,参见图10,除了处理器1001及存储器1003外,本申请实施例的电子设备还包括通信接口1002和通信总线1004,其中,处理器1001,通信接口1002,存储器1003通过通信总线1004完成相互间的通信。Optionally, referring to FIG. 10, in addition to the processor 1001 and the memory 1003, the electronic device of the embodiment of the present application further includes a communication interface 1002 and a communication bus 1004. The processor 1001, the communication interface 1002, and the memory 1003 pass through the communication bus 1004 Complete the communication between each other.
可选的,上述处理器用于执行上述存储器存放的计算机程序时,还能够实现上述任一应用于客户端的预览方法。Optionally, when the above-mentioned processor is used to execute the computer program stored in the above-mentioned memory, it can also implement any one of the above-mentioned preview methods applied to the client.
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above-mentioned electronic device and other devices.
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located far away from the foregoing processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
本申请实施例还提供了一种计算机可读存储介质,上述计算机可读存储介质内存储有计算机程序,上述计算机程序被处理器执行时实现上述任一应用于云存储***的预览方法。An embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned preview methods applied to a cloud storage system is implemented.
本申请实施例还提供了一种计算机可读存储介质,上述计算机可读存储介质内存储有计算机程序,上述计算机程序被处理器执行时实现上述任一应用于客户端的预览方法。An embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned preview methods applied to the client is implemented.
本申请实施例提供了一种计算机程序产品,上述计算机程序产品被处理器执行时实现上述任一应用于云存储***的预览方法。The embodiment of the present application provides a computer program product, which, when the computer program product is executed by a processor, implements any one of the preview methods applied to a cloud storage system.
本申请实施例提供了一种计算机程序产品,上述计算机程序产品被处理器执行时实现上述任一应用于客户端的预览方法。The embodiment of the present application provides a computer program product, which implements any one of the above-mentioned preview methods applied to the client when the computer program product is executed by a processor.
需要说明的是,在本文中,各个可选方案中的技术特征只要不矛盾均可组合来形成方案,这些方案均在本申请公开的范围内。诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺 序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this article, the technical features in each optional solution can be combined to form a solution as long as there is no contradiction, and these solutions are all within the scope of the disclosure of the present application. Relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship between these entities or operations or order. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or equipment that includes the element.
本说明书中的各个实施例均采用相关的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in this specification are described in a related manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above descriptions are only preferred embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in this application Within the scope of protection.

Claims (15)

  1. 一种提供预览功能的云存储***,其特征在于,所述***包括:A cloud storage system providing preview function, characterized in that the system includes:
    管理节点及多个存储节点;Management node and multiple storage nodes;
    所述存储节点,用于接收指定监控设备实时采集的视频流数据;在所述视频流数据中提取I帧,生成所述指定监控设备的封面图片;存储所述视频流数据及所述指定监控设备的封面图片;The storage node is used to receive video stream data collected by a designated monitoring device in real time; extract I frames from the video stream data to generate a cover picture of the designated monitoring device; store the video stream data and the designated monitoring device The cover image of the device;
    所述管理节点,用于在接收到目标客户端的预览请求后,按照所述预览请求中待预览监控设备的标识,获取所述待预览监控设备所对应的封面图片的存储地址,作为目标存储地址,其中,所述封面图片为时间戳与当前时刻最接近的封面图片,所述目标存储地址包括存储所述待预览监控设备的封面图片的存储节点的地址;The management node is configured to obtain the storage address of the cover picture corresponding to the monitoring device to be previewed according to the identification of the monitoring device to be previewed in the preview request after receiving the preview request of the target client, as the target storage address , Wherein the cover picture is the cover picture whose time stamp is closest to the current moment, and the target storage address includes the address of the storage node that stores the cover picture of the monitoring device to be previewed;
    将所述目标存储地址发送给所述目标客户端,以使所述目标客户端按照所述目标存储地址获取并预览所述待预览监控设备的封面图片。The target storage address is sent to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  2. 根据权利要求1所述的云存储***,其特征在于,所述存储节点具体用于:将所述指定监控设备的封面图片存储在所述存储节点的***盘中。The cloud storage system according to claim 1, wherein the storage node is specifically configured to store the cover picture of the designated monitoring device in a system disk of the storage node.
  3. 根据权利要求1所述的云存储***,其特征在于,所述存储节点,还用于将所述指定监控设备封面图片的存储地址及所述指定监控设备的标识发送给所述管理节点;The cloud storage system according to claim 1, wherein the storage node is further configured to send the storage address of the cover picture of the designated monitoring device and the identification of the designated monitoring device to the management node;
    所述管理节点,还用于接收所述指定监控设备封面图片的存储地址及所述指定监控设备的标识;关联存储所述指定监控设备封面图片的存储地址及所述指定监控设备的标识。The management node is further configured to receive the storage address of the cover picture of the designated monitoring device and the identifier of the designated monitoring device; and store the storage address of the cover picture of the designated monitoring device and the identifier of the designated monitoring device in association.
  4. 根据权利要求1所述的云存储***,其特征在于,所述存储节点,具体用于:The cloud storage system according to claim 1, wherein the storage node is specifically used for:
    判断所述存储节点中是否存储有所述指定监控设备的历史封面图片;Judging whether the historical cover picture of the designated monitoring device is stored in the storage node;
    若是,则删除所述指定监控设备的历史封面图片,并存储当前生成的所述指定监控设备的封面图片;If yes, delete the historical cover picture of the designated monitoring device, and store the currently generated cover picture of the designated monitoring device;
    若否,则存储当前生成的所述指定监控设备的封面图片。If not, store the currently generated cover picture of the designated monitoring device.
  5. 根据权利要求1所述的云存储***,其特征在于,所述管理节点还用于:在接收到所述目标客户端针对目标监控设备的视频流数据的展示请求时,获取所述目标监控设备的视频流数据的取流地址;向所述目标客户端返回所述取流地址,以使所述目标客户端按照所述取流地址,获取所述目标监控设备的视频流数据,并展示所述目标监控设备的视频流数据。The cloud storage system according to claim 1, wherein the management node is further configured to: upon receiving the display request of the target client for the video stream data of the target monitoring device, obtain the target monitoring device The streaming address of the video stream data; the streaming address is returned to the target client, so that the target client obtains the video streaming data of the target monitoring device according to the streaming address, and displays all Describe the video stream data of the target monitoring device.
  6. 一种预览方法,其特征在于,所述方法包括:A preview method, characterized in that the method includes:
    在获取到目标客户端的预览请求后,按照所述预览请求中待预览监控设备的标识,获取所述待预览监控设备所对应的封面图片的目标存储地址,其中,所述封面图片为时间戳与当前时刻最接近的封面图片,所述目标存储地址包括存储所述待预览监控设备的封面图片的存储节点的地址,所述待预览监控设备的封面图片是基于实时接收的所述待预览监控设备的视频流数据中的I帧生成的;After obtaining the preview request of the target client, according to the identification of the monitoring device to be previewed in the preview request, the target storage address of the cover image corresponding to the monitoring device to be previewed is obtained, where the cover image is a timestamp and The cover picture closest to the current moment, the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the monitoring device to be previewed received in real time Generated from the I frame in the video stream data;
    将所述目标存储地址发送给所述目标客户端,以使所述目标客户端按照所述目标存储地址获取并预览所述待预览监控设备的封面图片。The target storage address is sent to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    接收所述待预览监控设备实时采集的视频流数据;Receiving the video stream data collected by the monitoring device to be previewed in real time;
    在所述视频数据中提取时间戳与当前时刻最接近的I帧;Extracting an I frame with a time stamp closest to the current time from the video data;
    基于提取的I帧,生成所述待预览监控设备最新的封面图片;Based on the extracted I frame, generate the latest cover picture of the monitoring device to be previewed;
    将所述待预览监控设备的封面图片存储在存储节点中。The cover picture of the monitoring device to be previewed is stored in the storage node.
  8. 根据权利要求7所述的方法,其特征在于,所述将所述待预览监控设备的封面图片存储在存储节点中,包括:The method according to claim 7, wherein the storing the cover picture of the monitoring device to be previewed in a storage node comprises:
    将所述待预览监控设备的封面图片存储在存储节点的***盘中。The cover picture of the monitoring device to be previewed is stored in the system disk of the storage node.
  9. 根据权利要求7所述的方法,其特征在于,所述在所述视频数据中提取时间戳与当前时刻最接近的I帧,包括:8. The method according to claim 7, wherein the extracting the I frame whose time stamp is closest to the current time from the video data comprises:
    按照预设采样周期,在到达指定采样时刻时,从所述指定采样时刻开始提取所述待预览监控设备的视频流数据中的第一帧I帧。According to the preset sampling period, when the designated sampling time is reached, the first I frame in the video stream data of the monitoring device to be previewed is extracted from the designated sampling time.
  10. 根据权利要求7所述的方法,其特征在于,所述将所述待预览监控设备的封面图片存储在存储节点中,包括:The method according to claim 7, wherein the storing the cover picture of the monitoring device to be previewed in a storage node comprises:
    判断存储节点中是否存储有所述待预览监控设备的历史封面图片;Determine whether the historical cover picture of the monitoring device to be previewed is stored in the storage node;
    若是,则删除所述待预览监控设备的历史封面图片,并存储当前生成的所述待预览监控设备的封面图片;If yes, delete the historical cover picture of the monitoring device to be previewed, and store the currently generated cover picture of the monitoring device to be previewed;
    若否,则存储当前生成的所述待预览监控设备的封面图片。If not, store the currently generated cover picture of the monitoring device to be previewed.
  11. 一种预览装置,其特征在于,所述装置包括:A preview device, characterized in that the device includes:
    存储地址获取模块,用于在获取到目标客户端的预览请求后,按照所述预览请求中待预览监控设备的标识,获取所述待预览监控设备的时间戳与当前时刻最接近的封面图片的目标存储地址,其中,所述目标存储地址包括存储所述待预览监控设备的封面图片的存储节点的地址,所述待预览监控设备的封面图片是基于实时接收的所述待预览监控设备的视频流数据中的I帧生成的;The storage address obtaining module is used to obtain the target of the cover image whose time stamp of the monitoring device to be previewed is closest to the current moment according to the identification of the monitoring device to be previewed in the preview request after obtaining the preview request of the target client A storage address, wherein the target storage address includes the address of a storage node that stores the cover picture of the monitoring device to be previewed, and the cover picture of the monitoring device to be previewed is based on the video stream of the monitoring device to be previewed received in real time Generated by the I frame in the data;
    存储地址发送模块,用于将所述目标存储地址发送给所述目标客户端,以使所述目标客户端按照所述目标存储地址获取并预览所述待预览监控设备的封面图片。The storage address sending module is configured to send the target storage address to the target client, so that the target client obtains and previews the cover picture of the monitoring device to be previewed according to the target storage address.
  12. 根据权利要求11所述的装置,其特征在于,所述装置还包括:The device according to claim 11, wherein the device further comprises:
    视频流数据接收模块,用于接收所述待预览监控设备实时采集的视频流数据;The video stream data receiving module is configured to receive the video stream data collected in real time by the monitoring device to be previewed;
    I帧提取模块,用于在所述视频数据中提取时间戳与当前时刻最接近的I帧;The I frame extraction module is used to extract the I frame whose time stamp is closest to the current time from the video data;
    封面图片生成模块,用于基于提取的I帧,生成所述待预览监控设备最新的封面图片;A cover picture generating module, configured to generate the latest cover picture of the monitoring device to be previewed based on the extracted I frame;
    封面图片存储模块,用于将所述待预览监控设备的封面图片存储在存储节点中。The cover picture storage module is used to store the cover picture of the monitoring device to be previewed in the storage node.
  13. 根据权利要求12所述的装置,其特征在于,所述封面图片存储模块, 具体用于:将所述待预览监控设备的封面图片存储在存储节点的***盘中。The apparatus according to claim 12, wherein the cover picture storage module is specifically configured to store the cover picture of the monitoring device to be previewed in a system disk of a storage node.
  14. 根据权利要求12所述的装置,其特征在于,所述I帧提取模块,具体用于:按照预设采样周期,在到达指定采样时刻时,从所述指定采样时刻开始提取所述待预览监控设备的视频流数据中的第一帧I帧。The device according to claim 12, wherein the I-frame extraction module is specifically configured to: according to a preset sampling period, when a specified sampling time is reached, extract the to-be-reviewed monitor from the specified sampling time. The first I frame in the device's video stream data.
  15. 根据权利要求12所述的装置,其特征在于,所述封面图片存储模块,具体用于:判断存储节点中是否存储有所述待预览监控设备的历史封面图片;若是,则删除所述待预览监控设备的历史封面图片,并存储当前生成的所述待预览监控设备的封面图片;若否,则存储当前生成的所述待预览监控设备的封面图片。The apparatus according to claim 12, wherein the cover image storage module is specifically configured to: determine whether the historical cover image of the monitoring device to be previewed is stored in the storage node; if so, delete the to be previewed The historical cover picture of the monitoring device is stored and the currently generated cover picture of the monitoring device to be previewed is stored; if not, the currently generated cover picture of the monitoring device to be previewed is stored.
PCT/CN2020/135015 2019-12-11 2020-12-09 Cloud storage system providing preview function, and preview method and apparatus WO2021115348A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911267302.4 2019-12-11
CN201911267302.4A CN111405237A (en) 2019-12-11 2019-12-11 Cloud storage system providing preview function and preview method

Publications (1)

Publication Number Publication Date
WO2021115348A1 true WO2021115348A1 (en) 2021-06-17

Family

ID=71428333

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135015 WO2021115348A1 (en) 2019-12-11 2020-12-09 Cloud storage system providing preview function, and preview method and apparatus

Country Status (2)

Country Link
CN (1) CN111405237A (en)
WO (1) WO2021115348A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405237A (en) * 2019-12-11 2020-07-10 杭州海康威视***技术有限公司 Cloud storage system providing preview function and preview method
CN114079829A (en) * 2020-08-21 2022-02-22 海信视像科技股份有限公司 Display device and generation method of video collection file watermark
CN113873034A (en) * 2021-09-27 2021-12-31 深圳Tcl新技术有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215583A1 (en) * 2013-12-04 2015-07-30 Rasilient Systems, Inc. Cloud Video Surveillance
CN105100961A (en) * 2015-07-23 2015-11-25 华为技术有限公司 Media preview generation method and generation apparatus
CN105450964A (en) * 2014-09-30 2016-03-30 杭州海康威视***技术有限公司 Method, system and management node for carrying out cloud storage on picture recording data
CN106210608A (en) * 2015-04-29 2016-12-07 中国电信股份有限公司 The methods, devices and systems of the dynamic front cover in position, control point are realized based on mobile detection
CN108055505A (en) * 2017-12-11 2018-05-18 深圳市东微智能科技股份有限公司 Monitoring device control method, device, system, storage medium and computer equipment
CN109842781A (en) * 2017-11-29 2019-06-04 杭州海康威视***技术有限公司 Monitor video playback method, device, system, media server and storage medium
CN111405237A (en) * 2019-12-11 2020-07-10 杭州海康威视***技术有限公司 Cloud storage system providing preview function and preview method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303429B (en) * 2016-08-17 2019-07-16 浙江宇视科技有限公司 Remote configuring method and device
CN107172391A (en) * 2017-05-19 2017-09-15 常州普适信息科技有限公司 Distributed video memory management method and system based on Hadoop framework

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215583A1 (en) * 2013-12-04 2015-07-30 Rasilient Systems, Inc. Cloud Video Surveillance
CN105450964A (en) * 2014-09-30 2016-03-30 杭州海康威视***技术有限公司 Method, system and management node for carrying out cloud storage on picture recording data
CN106210608A (en) * 2015-04-29 2016-12-07 中国电信股份有限公司 The methods, devices and systems of the dynamic front cover in position, control point are realized based on mobile detection
CN105100961A (en) * 2015-07-23 2015-11-25 华为技术有限公司 Media preview generation method and generation apparatus
CN109842781A (en) * 2017-11-29 2019-06-04 杭州海康威视***技术有限公司 Monitor video playback method, device, system, media server and storage medium
CN108055505A (en) * 2017-12-11 2018-05-18 深圳市东微智能科技股份有限公司 Monitoring device control method, device, system, storage medium and computer equipment
CN111405237A (en) * 2019-12-11 2020-07-10 杭州海康威视***技术有限公司 Cloud storage system providing preview function and preview method

Also Published As

Publication number Publication date
CN111405237A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
WO2021115348A1 (en) Cloud storage system providing preview function, and preview method and apparatus
US11606384B2 (en) Clustering-based security monitoring of accessed domain names
CN103970793B (en) Information query method, client and server
US8819168B2 (en) Link expansion service
WO2021189954A1 (en) Log data processing method and apparatus, computer device, and storage medium
JP6986187B2 (en) Person identification methods, devices, electronic devices, storage media, and programs
WO2021082484A1 (en) Awr report automatic acquisition method and apparatus, electronic device, and storage medium
CN111639092B (en) Personnel flow analysis method and device, electronic equipment and storage medium
CN109240664B (en) Method and terminal for collecting user behavior information
US20190188224A1 (en) Method and apparatus for obtaining picture public opinions, computer device and storage medium
WO2018192432A1 (en) Working information processing method and apparatus, computer device, and storage medium
CN113254320A (en) Method and device for recording user webpage operation behaviors
CN113051460A (en) Elasticissearch-based data retrieval method and system, electronic device and storage medium
WO2018205736A1 (en) Multimedia information retrieval method, device and storage medium
CN113473166A (en) Data storage system and method
CN114185952A (en) Data retrieving method and device, electronic equipment and storage medium
US20230065492A1 (en) Method for obtaining browser running data, electronic device, and storage medium
CN110737794A (en) Image query method, system, server and storage medium
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
CN114722004A (en) Message retrieval method and device, electronic equipment and storage medium
CN110674386B (en) Resource recommendation method, device and storage medium
WO2016173136A1 (en) Terminal application processing method and device thereof
CN112394856A (en) Information statistical method and device, electronic equipment and storage medium
CN108614822B (en) Intelligent event storage and reading method and device
CN114138510A (en) Operation log generation method and related 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: 20898789

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: 20898789

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22-05-2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20898789

Country of ref document: EP

Kind code of ref document: A1