A cloud service-based video analysis method and device, and a storage medium
By acquiring the characteristics of video data and the feature sequences of cloud processing nodes, the optimal allocation scheme for processing nodes is determined, solving the problem of unbalanced video data processing and achieving efficient and secure video analysis and condensation processing.
Patent Information
- Application Number
- CN202310217229.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-03-03
AI Technical Summary
In existing technologies, video information data processing is difficult to perform based on intelligent allocation or segmented execution, resulting in the inability to effectively allocate data to different nodes for processing.
By acquiring the characteristics of video data and the feature sequences of cloud processing nodes, the optimal processing node allocation scheme is determined, including parameter settings for the importance of video segments, bandwidth, latency, and priority, as well as Euclidean distance calculation to select the best cloud processing node.
It enables efficient allocation and processing of video data, improving the efficiency and quality of video analysis, especially in video summarization and encryption, ensuring data security and integrity.
Smart Images

Figure CN116208785B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of video processing, in particular to a video analysis method and device based on cloud service and a storage medium. BACKGROUND
[0002] With the development of economy, the data volume of monitoring video presents explosive growth. These video monitoring devices monitor and record the real-time operation of key places, maintaining the stable operation of the society. The application of video monitoring system includes the following levels, the first level is the on-site video monitoring, which is composed of front-end camera, video recorder, video display and the like, supporting on-site monitoring and monitoring video storage; the second level is remote video monitoring, which is composed of monitoring front-end, console and transmission network, supporting remote monitoring system such as unattended substation and city-level monitoring center; the third level is integrated into the emergency command system, realizing the interconnection of monitoring video at all levels and the corresponding emergency command center, and providing the emergency command center with direct access to on-site video images.
[0003] In the prior art, the data processing of video information is often traditional batch server processing, which is difficult to perform corresponding distribution to different nodes for processing according to intelligent distribution or segmentation. Therefore, it is urgent to propose a distribution and collaborative control processing scheme for the execution of each task computing amount and video content. SUMMARY
[0004] Therefore, the purpose of the embodiments of the present application is to provide a processing node distribution scheme that optimizes the processing node by comparing the characteristics of different video segments and cloud processing nodes.
[0005] The first aspect of the present application provides a video analysis method based on cloud service, the method comprising:
[0006] obtaining video data information and analysis requirement information of the video data, performing segmentation processing on the video data information according to the analysis requirement information to generate a plurality of video segments;
[0007] obtaining a first performance characteristic sequence corresponding to each video segment, and a second characteristic sequence corresponding to the link between the local and each cloud processing node;
[0008] comparing the second characteristic sequence and the first performance characteristic sequence corresponding to each cloud processing node to determine the best cloud processing node corresponding to each video segment, and generating a first processing mapping relationship;
[0009] According to the first processing mapping relationship, each video segment is sent to the corresponding cloud processing node for video analysis.
[0010] Furthermore, the step of performing segmentation processing on the video data information to generate multiple video segments based on the analysis requirements information includes: performing segmentation processing on the video data information according to the importance of the video content; the importance includes at least the importance of the role;
[0011] Different importance levels are assigned to different video segments, and a first performance characteristic sequence parameter corresponding to the importance level is determined; the first performance characteristic sequence parameter includes bandwidth, latency, and priority.
[0012] Furthermore, obtaining the first performance feature sequence corresponding to each video segment and the second feature sequence corresponding to the link between the local machine and each cloud processing node includes:
[0013] Generate a first performance feature sequence based on the first performance feature sequence parameters;
[0014] Read the bandwidth, latency, and priority information of the links between the local machine and each cloud processing node to generate the second feature sequence;
[0015] Further, the step of comparing the second feature sequence and the first performance feature sequence corresponding to each cloud processing node to determine the optimal cloud processing node for each video segment and generating a first processing mapping relationship includes:
[0016] Calculate the Euclidean distance between the first performance feature sequence and the second feature sequence, take the cloud processing node corresponding to the smallest Euclidean distance as the best cloud processing node for the corresponding video segment, and generate the first processing mapping relationship.
[0017] Furthermore, the video analytics requirements include video summarization;
[0018] Based on the first processing mapping relationship, each video segment is sent to the corresponding cloud processing node for video analysis, including:
[0019] The facial area of the character was identified as the area to be encrypted;
[0020] For each of the regions to be encrypted, the source data of the region to be encrypted is encrypted to obtain encrypted data.
[0021] If the encrypted data is larger than the source data of the region to be encrypted, the source data corresponding to the region to be encrypted is replaced with the first data in the encrypted data, and the second data in the encrypted data is recorded to obtain the target video including the record; wherein, the size of the first data is equal to the size of the data corresponding to the region to be encrypted, and the second data is the remaining data in the encrypted data excluding the first data.
[0022] In a second aspect, the embodiment further provides a video analysis device of cloud service, the device comprises:
[0023] A first obtaining module is configured to obtain video data information and analysis requirement information of the video data, perform segmentation processing on the video data information according to the analysis requirement information to generate a plurality of video segments;
[0024] A second obtaining module is configured to obtain a first performance characteristic sequence corresponding to each video segment and a second characteristic sequence corresponding to a link between a local device and each cloud processing node;
[0025] A generating module is configured to compare the second characteristic sequence corresponding to each cloud processing node and the first performance characteristic sequence, determine a best cloud processing node corresponding to each video segment, and generate a first processing mapping relationship;
[0026] A processing module is configured to send each video segment to the corresponding cloud processing node for video analysis according to the first processing mapping relationship.
[0027] Further, the first obtaining module is further configured to perform segmentation processing on the video data information according to an importance degree of the video content; the importance degree at least includes a role importance degree.
[0028] Different importance levels are set for different video segments, and a first performance characteristic sequence parameter corresponding to the importance level is determined; the first performance characteristic sequence parameter includes bandwidth, delay and priority.
[0029] Further, the second obtaining module is further configured to generate the first performance characteristic sequence according to the first performance characteristic sequence parameter; and read bandwidth, delay and priority information corresponding to the link between the local device and each cloud processing node to generate the second characteristic sequence.
[0030] Further, the video analysis requirement includes video condensation.
[0031] The processing module is further configured to determine a face region of a role as an encrypted region to be encrypted; for each encrypted region to be encrypted, encrypt source data of the encrypted region to be encrypted to obtain encrypted data after encryption; if the encrypted data after encryption is greater than the source data of the encrypted region to be encrypted, replace the source data corresponding to the encrypted region to be encrypted with first data in the encrypted data after encryption, and record second data in the encrypted data after encryption to obtain a target video including the record; wherein the size of the first data is equal to the size of the data corresponding to the encrypted region to be encrypted, and the second data is the remaining data in the encrypted data after encryption except the first data.
[0032] In addition, the third aspect of the present application further provides a storage medium, which stores a computer program; the program is loaded and executed by a processor to realize the video analysis method steps of the cloud service as described above.
[0033] In the scheme of the present application, by acquiring video data information and analysis requirement information of the video data, the video data information is segmented to generate a plurality of video segments according to the analysis requirement information; the first performance characteristic sequence corresponding to each video segment and the second characteristic sequence corresponding to the link between the local and each cloud processing node are acquired; the second characteristic sequence corresponding to each cloud processing node and the first performance characteristic sequence are compared to determine the best cloud processing node corresponding to each video segment and generate a first processing mapping relationship; and each video segment is sent to the corresponding cloud processing node for video analysis according to the first processing mapping relationship. Compared with the prior art, the optimal processing node is determined by comparing the characteristics of different video segments and the cloud processing nodes to achieve the best processing node allocation. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0035] Figure 1 is a flow diagram of the video analysis method based on cloud service disclosed by the embodiments of the present application;
[0036] Figure 2 is a structural diagram of the video analysis device based on cloud service disclosed by the embodiments of the present application. DETAILED DESCRIPTION
[0037] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the implementations set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art.
[0038] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
[0039] The block diagrams in the drawings show only the functionality of the features and do not necessarily imply a physical structure or organization.
[0040] The flow diagrams in the drawings show the functionality of the various embodiments and are not necessarily the steps of a numerical algorithm.
[0041] It should be noted that "a plurality" refers to two or more.
[0042] The following describes the implementation details of the technical solutions of the embodiments of the application in detail:
[0043] Please refer to Figure 1 , Figure 1 is a flow diagram of a video analysis method based on cloud services disclosed by the embodiments of the application. As shown in Figure 1 , the video analysis method based on cloud services of the embodiments of the application comprises:
[0044] S1, obtaining video data information and analysis requirement information of the video data, performing segmentation processing on the video data information according to the analysis requirement information to generate a plurality of video segments.
[0045] Further, the segmentation processing on the video data information according to the analysis requirement information to generate a plurality of video segments comprises: performing segmentation processing on the video data information according to the importance of the video content; the importance at least comprises the importance of the role; the video analysis requirement comprises video condensation.
[0046] The embodiments can actually perform local video segmentation on one or more roles of interest, form video segments with role labels, and perform subsequent calculation and determination of cloud nodes according to the requirement of video condensation.
[0047] Different video clips are given different importance levels, and a first performance characteristic sequence parameter corresponding to the importance level is determined; the first performance characteristic sequence parameter includes bandwidth a1, delay b1, and priority c1; and the first performance characteristic sequence is {a1, b1, c1}.
[0048] In this embodiment, for example, the highest priority is set for the main character 1, and the video clip in which the main character 1 is located requires high-level bandwidth, low delay, and high priority, and therefore the corresponding performance parameter can be set.
[0049] S2, a first performance characteristic sequence corresponding to each video clip and a second characteristic sequence corresponding to a link between the local and each cloud processing node are obtained.
[0050] Further, in this embodiment, the first performance characteristic sequence corresponding to each video clip and the second characteristic sequence corresponding to the link between the local and each cloud processing node are obtained, and the obtaining includes:
[0051] The first performance characteristic sequence is generated according to the first performance characteristic sequence parameter, and the bandwidth a2, the delay b2, and the priority information c2 of the link between the local and each cloud processing node are read to generate the second characteristic sequence {a2, b2, c2}.
[0052] S3, the second characteristic sequence corresponding to each cloud processing node and the first performance characteristic sequence are compared to determine the best cloud processing node corresponding to each video clip, and a first processing mapping relationship is generated.
[0053] Further, in this embodiment, the second characteristic sequence corresponding to each cloud processing node and the first performance characteristic sequence are compared to determine the best cloud processing node corresponding to each video clip, and the first processing mapping relationship is generated, and the comparing includes:
[0054] The Euclidean distance between the first performance characteristic sequence and the second characteristic sequence is calculated, the cloud processing node corresponding to the smallest Euclidean distance is taken as the best cloud processing node corresponding to the video clip, and the first processing mapping relationship is generated.
[0055] In this embodiment, the Euclidean distance between {a1, b1, c1} and {a2, b2, c2} is calculated, the cloud processing node corresponding to the smallest Euclidean distance is taken as the best cloud processing node corresponding to the video clip, and the first mapping relationship between the video clip identifier and the cloud processing node is generated.
[0056] S4, each video clip is sent to the corresponding cloud processing node for video analysis according to the first processing mapping relationship.
[0057] In the embodiment of the present application, considering that the data before and after encryption are likely to be inconsistent, for example, in the case of asymmetric encryption, due to message redundancy, the encrypted data is generally larger than the data before encryption. If the encrypted data is larger, the encrypted data cannot be written back to the original video area (because the amount of data that can be stored in an area is determined and cannot be too large or too small), therefore, the first data in the encrypted data that is the same size as the data in the original area can be written into the source video in the encrypted area to replace the corresponding data in the source video in the encrypted area, and the second data other than the first data can be written into the record in a certain format.
[0058] According to the first processing mapping relationship, each video segment is respectively sent to the corresponding cloud processing node for video analysis, comprising:
[0059] The face region of the role is determined as the encrypted area; for each of the encrypted areas, the source data of the encrypted area is encrypted to obtain encrypted data after encryption;
[0060] If the encrypted data after encryption is larger than the source data of the encrypted area, the first data in the encrypted data after encryption is used to replace the corresponding source data of the encrypted area, and the second data in the encrypted data is recorded to obtain a target video including the record; wherein the size of the first data is equal to the size of the data corresponding to the encrypted area, and the second data is the remaining data in the encrypted data except the first data.
[0061] In addition, as shown in Figure 2 The second aspect of the embodiment of the present application further discloses a video analysis device of a cloud service, the device comprising:
[0062] The first acquisition module 10 is used for acquiring video data information and analysis requirement information of the video data, performing segmentation processing on the video data information according to the analysis requirement information to generate a plurality of video segments;
[0063] The second acquisition module 20 is used for acquiring a first performance characteristic sequence corresponding to each video segment and a second characteristic sequence corresponding to the link between the local and each cloud processing node;
[0064] The generation module 30 is used for comparing the second characteristic sequence corresponding to each cloud processing node and the first performance characteristic sequence to determine the best cloud processing node corresponding to each video segment and generate a first processing mapping relationship;
[0065] The processing module 40 is used for sending each video segment to the corresponding cloud processing node for video analysis according to the first processing mapping relationship.
[0066] The first obtaining module 10 is further configured to perform segmentation processing on the video data information according to importance levels of the video content, wherein the importance levels at least include role importance levels.
[0067] Different video segments are given different importance levels, and a first performance characteristic sequence parameter corresponding to the importance levels is determined, wherein the first performance characteristic sequence parameter includes bandwidth, delay, and priority.
[0068] The second obtaining module 20 is further configured to generate a first performance characteristic sequence according to the first performance characteristic sequence parameter, and read bandwidth, delay, and priority information corresponding to a link between the local and each cloud processing node to generate a second characteristic sequence.
[0069] The generating module 30 is further configured to calculate a Euclidean distance between the first performance characteristic sequence and the second characteristic sequence, take a cloud processing node corresponding to a minimum Euclidean distance as an optimal cloud processing node of a corresponding video segment, and generate a first processing mapping relationship.
[0070] The video analysis requirement includes video condensation.
[0071] The processing module 40 is further configured to determine a face region of a role as an encrypted region, encrypt source data of each encrypted region to obtain encrypted data, replace source data corresponding to the encrypted region with first data in the encrypted data if the encrypted data is greater than the source data, and record second data in the encrypted data to obtain a target video including the record, wherein the first data has a size equal to that of the source data corresponding to the encrypted region, and the second data is data remaining in the encrypted data except the first data.
[0072] In addition, an electronic device is also disclosed in the embodiments of the present application, which includes one or more processors, a memory configured to store one or more computer programs, and is characterized in that the computer programs are configured to be executed by the one or more processors, and the programs include steps for executing the cloud service-based video analysis method as described above.
[0073] In addition, a storage medium is also provided in the embodiments of the present application, which stores computer programs; the programs are loaded and executed by a processor to implement the steps of the cloud service-based video analysis method as described above.
[0074] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0075] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. In actual implementation, there can be another division manner. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can also be electrical, mechanical or other forms of connection.
[0076] The units described as separate components can or can not be physically separated. As a unit, those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0077] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software functional unit.
[0078] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a grid device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0079] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A cloud service-based video analysis method, characterized by, The method includes: Acquire video data information and video data analysis requirements information, and perform segmentation processing on the video data information to generate multiple video segments based on the analysis requirements information; Obtain the first performance feature sequence corresponding to each video segment, and the second feature sequence corresponding to the link between the local machine and each cloud processing node. Read the bandwidth, latency and priority information of the link between the local machine and each cloud processing node to generate the second feature sequence. By comparing the second feature sequence and the first performance feature sequence corresponding to each cloud processing node, the optimal cloud processing node corresponding to each video segment is determined, and the first processing mapping relationship is generated. Based on the first processing mapping relationship, each video segment is sent to the corresponding cloud processing node for video analysis; The step of performing segmentation processing on video data information to generate multiple video segments based on the analysis requirements information includes: performing segmentation processing on video data information according to the importance of video content; the importance includes at least the importance of roles; Different importance levels are assigned to different video segments, and a first performance characteristic sequence parameter corresponding to the importance level is determined; the first performance characteristic sequence parameter includes bandwidth, latency, and priority. 2.The cloud service based video analysis method of claim 1, wherein, The step of obtaining the first performance feature sequence corresponding to each video segment and the second feature sequence corresponding to the link between the local machine and each cloud processing node includes: A first performance feature sequence is generated based on the first performance feature sequence parameters. 3.The cloud service based video analysis method of claim 2, wherein, The step of comparing the second feature sequence and the first performance feature sequence corresponding to each cloud processing node to determine the optimal cloud processing node for each video segment and generating a first processing mapping relationship includes: Calculate the Euclidean distance between the first performance feature sequence and the second feature sequence, take the cloud processing node corresponding to the smallest Euclidean distance as the best cloud processing node for the corresponding video segment, and generate the first processing mapping relationship.
4. The cloud service-based video analysis method of claim 3, wherein, The video analytics requirements include video summarization; Based on the first processing mapping relationship, each video segment is sent to the corresponding cloud processing node for video analysis, including: The facial area of the character was identified as the area to be encrypted. For each of the regions to be encrypted, the source data of the region to be encrypted is encrypted to obtain encrypted data; If the encrypted data is larger than the source data of the region to be encrypted, the source data corresponding to the region to be encrypted is replaced with the first data in the encrypted data, and the second data in the encrypted data is recorded to obtain the target video including the record; wherein, the size of the first data is equal to the size of the data corresponding to the region to be encrypted, and the second data is the remaining data in the encrypted data excluding the first data. 5.A cloud service based video analytics apparatus, characterized by, The device includes: The first acquisition module is used to acquire video data information and video data analysis requirement information, and perform segmentation processing on the video data information to generate multiple video segments according to the analysis requirement information. The second acquisition module is configured to acquire the first performance characteristic sequence corresponding to each video segment and the second characteristic sequence corresponding to the link between the local device and each cloud processing node, and read the bandwidth, delay and priority information corresponding to the link between the local device and each cloud processing node to generate the second characteristic sequence; The generation module is configured to compare the second characteristic sequence corresponding to each cloud processing node and the first performance characteristic sequence, determine the optimal cloud processing node corresponding to each video segment, and generate a first processing mapping relationship; The processing module is configured to send each video segment to the corresponding cloud processing node for video analysis according to the first processing mapping relationship. The video data information is segmented according to the importance of the video content, and the importance includes at least the importance of a role. Different video segments are given different importance levels, and the importance levels correspond to first performance characteristic sequence parameters including bandwidth, delay and priority.
6. The cloud service-based video analytics apparatus of claim 5, wherein, The second acquisition module is further configured to generate the first performance characteristic sequence according to the first performance characteristic sequence parameters, and read the bandwidth, delay and priority information corresponding to the link between the local device and each cloud processing node to generate the second characteristic sequence.
7. The cloud service-based video analytics apparatus of claim 6, wherein, The video analysis requirement includes video condensation. The processing module is further configured to determine a face region of a role as an encryption region, encrypt source data of each encryption region to obtain encrypted data, replace the source data corresponding to the encryption region with first data in the encrypted data if the encrypted data is larger than the source data, and record second data in the encrypted data to obtain a target video including the record; the size of the first data is equal to the size of the data corresponding to the encryption region, and the second data is the remaining data in the encrypted data except the first data.
8. A storage medium, storing a computer program; characterized in that, The program is loaded and executed by the processor to implement the cloud service-based video analysis method according to any one of claims 1-4.
Citation Information
Patent Citations
Power transmission and transformation inspection video processing method based on fog calculation
CN110958294A