CN113067989A - Data processing method and chip - Google Patents

Data processing method and chip Download PDF

Info

Publication number
CN113067989A
CN113067989A CN202110605892.8A CN202110605892A CN113067989A CN 113067989 A CN113067989 A CN 113067989A CN 202110605892 A CN202110605892 A CN 202110605892A CN 113067989 A CN113067989 A CN 113067989A
Authority
CN
China
Prior art keywords
video data
video
concentrated
target
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110605892.8A
Other languages
Chinese (zh)
Other versions
CN113067989B (en
Inventor
王嘉诚
张少仲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongcheng Hualong Computer Technology Co Ltd
Original Assignee
Shenwei Super Computing Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenwei Super Computing Beijing Technology Co ltd filed Critical Shenwei Super Computing Beijing Technology Co ltd
Priority to CN202110605892.8A priority Critical patent/CN113067989B/en
Publication of CN113067989A publication Critical patent/CN113067989A/en
Application granted granted Critical
Publication of CN113067989B publication Critical patent/CN113067989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention relates to a data processing method and a chip, wherein the method comprises the following steps: receiving raw video data from at least one node; for each node, performing: merging the original video data of the node to obtain concentrated video data; carrying out Hash operation on the concentrated video data to obtain a Hash value; determining a corresponding memory queue according to the hash value, and caching the concentrated video data corresponding to the hash value to the corresponding memory queue; the method comprises the steps that concentrated video data corresponding to at least one node are cached in a memory queue; and sending the concentrated video data cached by the at least two memory queues to corresponding receiving ends according to a preset delay rule. The scheme can improve the processing efficiency of mass video data.

Description

Data processing method and chip
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method and a chip.
Background
With the continuous development of the internet of things technology, the monitoring equipment is widely deployed in all public areas, and hidden safety guarantee is provided for people. However, as the number of videos is increasing, a huge pressure is brought to video storage, transmission and the like by a large amount of video data, and the conventional video data processing mode cannot match the increasing speed of the video data received by the network, so that a large amount of video data is retained in the network, and the current video data processing efficiency is low.
In view of the above, it is desirable to provide a data processing method and a chip to solve the above-mentioned deficiencies.
Disclosure of Invention
The technical problem to be solved by the invention is how to improve the processing efficiency of mass video data, and aiming at the defects in the prior art, the invention provides a data processing method and a chip.
In order to solve the above technical problem, in a first aspect, the present invention provides a data processing method, including:
receiving raw video data from at least one node;
for each node, performing:
merging the original video data of the node to obtain concentrated video data;
carrying out Hash operation on the concentrated video data to obtain a Hash value;
determining a corresponding memory queue according to the hash value, and caching the concentrated video data corresponding to the hash value to the corresponding memory queue; the memory queue caches concentrated video data corresponding to at least one node;
and sending the concentrated video data cached by the at least two memory queues to corresponding receiving ends according to a preset delay rule.
Optionally, the merging the original video data of the node to obtain the concentrated video data includes:
framing the original video data to obtain at least two video frames;
extracting background information in the at least two frames of video frames and establishing a video background model;
extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the temporal information and the spatial information of the target in the video frame;
segmenting the original video data by utilizing a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
determining a target video segment according to a preset rule; wherein the target video segment comprises at least two video segments;
according to the video background model, the time information and the spatial information, carrying out translation rearrangement on the target in the target video segment to obtain the concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
Optionally, the determining the target video segment according to the preset rule includes:
performing score operation on the determined target video segment to obtain the score of the target video segment;
determining whether the score of the target video segment is greater than a preset score threshold, an
Judging whether the number of video frames included in the target video segment is smaller than a preset number threshold value or not;
if the judgment results are yes, determining that the target video segment conforms to the preset rule;
wherein the calculation formula of the score of the target video segment is as follows:
Figure 509848DEST_PATH_IMAGE001
wherein the content of the first and second substances,Da score for characterizing the target video segment;ifor characterizingiA video segment; k is used for representing the number of video segments obtained by segmenting the original video data by using a kernel time segmentation algorithm;n i for characterizingiThe number of frames of video frames contained in a video segment;d i,j for characterizingiIn a video segmentjA score of a frame video frame, the score being determined according to target information included in the frame video frame;λ i for characterizingiWhether a video segment is selected as a target video segment; wherein the content of the first and second substances,λ i =1 for secondiOne video segment is selected as a target video segment,λ i =0 foriA video segmentIs selected as the target video segment.
Optionally, the performing a hash operation on the concentrated video data to obtain a hash value includes:
extracting a characteristic value from the concentrated video data; wherein the feature value is used to identify the condensed video data;
and performing consistent hash operation on the characteristic value to obtain a hash value corresponding to the concentrated video data, wherein the hash value is used for determining a memory queue of the concentrated video to be cached.
Optionally, the extracting feature values from the condensed video data includes:
extracting a value from the concentrated video data of the node, wherein the value is used for representing data content corresponding to the attribute of the concentrated video data;
acquiring ID information of the node;
and extracting keys according to the value and the ID information, and taking the extracted keys as the characteristic values of the concentrated video data, wherein the keys corresponding to different concentrated video data are different.
Optionally, the sending, according to a preset delay rule, the concentrated video data cached by the at least two memory queues to corresponding receiving ends includes:
when the first preset time length is reached, the concentrated video data cached by at least two first memory queues are transmitted to corresponding first receiving ends in parallel; wherein, different first memory queues correspond to different first receiving ends;
when the second preset time length is reached, the concentrated video data cached by the at least two second memory queues are transmitted to the corresponding second receiving ends in parallel; wherein different second memory queues correspond to different second receiving ends; the first receiving end comprises the second receiving end, and the second preset time length is greater than the first preset time length.
In a second aspect, the present invention further provides a data processing chip, including:
a receiving module for receiving raw video data from at least one node;
a concentration module for executing, for each node: merging the original video data of the node received by the receiving module to obtain concentrated video data;
the operation module is used for carrying out Hash operation on the concentrated video data obtained by the concentration module to obtain a Hash value;
the cache module is used for determining a corresponding memory queue according to the hash value obtained by the operation module and caching the concentrated video data corresponding to the hash value to the corresponding memory queue; the memory queue caches concentrated video data corresponding to at least one node;
and the forwarding module is used for sending the concentrated video data of the at least two memory queues cached by the caching module to corresponding receiving ends according to a preset delay rule.
Optionally, the concentration module is further configured to perform the following operations:
framing the original video data to obtain at least two video frames;
extracting background information in the at least two frames of video frames and establishing a video background model;
extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the temporal information and the spatial information of the target in the video frame;
segmenting the original video data by utilizing a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
determining a target video segment according to a preset rule; wherein the target video segment comprises at least two video segments;
according to the video background model, the time information and the spatial information, carrying out translation rearrangement on the target in the target video segment to obtain the concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
In a third aspect, the present invention further provides a data processing apparatus, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to execute the data processing method provided by the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, the present invention further provides a computer-readable medium, on which computer instructions are stored, which, when executed by a processor, cause the processor to perform the data processing method provided by the first aspect or any of the possible implementations of the first aspect.
The method receives original video data from each node, combines the original video data of the node to obtain concentrated video data for each node, performs hash operation on the concentrated video data to obtain a hash value, determines a memory queue of the concentrated video data to be cached according to the hash value, and sends the concentrated video data of each node cached by at least two memory queues to a corresponding receiving end according to a preset delay rule. Therefore, after the original video data are concentrated, the video storage space is reduced, the data volume is reduced, the original data information is ensured, meanwhile, redundant information is removed, the effective processing of subsequent data is facilitated, and the data transmission speed is accelerated; after the concentrated video data are cached to the corresponding memory queues based on the Hash operation, the concentrated video data are forwarded to the receiving end based on the delay rule, the data can be forwarded in batches, and efficient data transmission is achieved, so that a large amount of video data are prevented from being retained in a network, and the data processing efficiency can be further improved.
Drawings
Fig. 1 is a data processing method according to an embodiment of the present invention;
FIG. 2 is another data processing method provided by an embodiment of the present invention;
FIG. 3 is a diagram of a data processing chip according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a device in which a data processing apparatus according to an embodiment of the present invention is located.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, a data processing method provided in an embodiment of the present invention includes the following steps:
step 101: receiving raw video data from at least one node;
step 102: for each node, performing: merging the original video data of the node to obtain concentrated video data;
step 103: carrying out Hash operation on the concentrated video data to obtain a Hash value;
step 104: determining a corresponding memory queue according to the hash value, and caching the concentrated video data corresponding to the hash value to the corresponding memory queue; the method comprises the steps that concentrated video data corresponding to at least one node are cached in a memory queue;
step 105: and sending the concentrated video data cached by the at least two memory queues to corresponding receiving ends according to a preset delay rule.
In the embodiment of the invention, the original video data from each node is received firstly, and after the original video data of the node is combined to obtain the concentrated video data aiming at each node, the concentrated video data is subjected to hash operation to obtain a hash value, so that the memory queue of the concentrated data video to be cached is determined according to the hash value, and the concentrated video data of each node cached by at least two memory queues is sent to the corresponding receiving end according to the preset delay rule. Therefore, after the original video data are concentrated, the video storage space is reduced, the data volume is reduced, the original data information is ensured, meanwhile, redundant information is removed, the effective processing of subsequent data is facilitated, and the data transmission speed is accelerated; after the concentrated video data are cached to the corresponding memory queues based on the Hash operation, the concentrated video data are forwarded to the receiving end based on the delay rule, the data can be forwarded in batches, and efficient data transmission is achieved, so that a large amount of video data are prevented from being retained in a network, and the data processing efficiency can be further improved.
It should be noted that the node is a video capture device and is located at the end of the entire monitoring network, where the receiving end may be a server that performs data interaction with the video capture device and is used to further store and process the concentrated video data.
Optionally, in a data processing method shown in fig. 1, step 102 is to merge original video data of the node to obtain concentrated video data, and includes:
framing original video data to obtain at least two video frames;
extracting background information in at least two video frames and establishing a video background model;
extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the time information and the space information of the target in the video frame;
segmenting original video data by utilizing a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
determining a target video segment according to a preset rule; wherein, the target video segment comprises at least two video segments;
according to the video background model, the time information and the spatial information, carrying out translation rearrangement on a target in a target video segment to obtain concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
In the embodiment of the invention, in order to compress the video, the time length is shortened, the data volume of the original video data is reduced, so that the storage space of the original video is reduced, and the original video data is subjected to merging and concentration processing. In particular, the amount of the solvent to be used,
firstly, original video data is framed to obtain multiple video frames, background information in each video frame is extracted, and a video background model is established (for example, a VIBE background modeling method is adopted, the operation speed is high, and the occupied memory is small). Extracting target information in each frame of video frame by using a YOLO algorithm, after acquiring space and time information of a corresponding target in the video frame, segmenting the original video data by using a kernel time segmentation algorithm to obtain at least two video segments, determining the target video segments according to a prediction rule, and then performing translation rearrangement on the target in the target video segments according to a video background model, the time information and the space information of the corresponding target to obtain concentrated video data.
The basic requirements of video rearrangement are that rearranged objects occupy as little space-time as possible, and rearranged objects are not overlapped as much as possible, so that the space utilization rate of the concentrated video data is higher than that of the original video data, and the total frame number of the concentrated video data is less than that of the original video data. Therefore, by reducing the space-time redundancy, the viewing time can be shortened or the search range can be narrowed on the premise of ensuring the original video data information, and the video inspection is effectively carried out in a manner of being matched with the manual work. Meanwhile, the occupied storage space of the concentrated video data is smaller, the data file is smaller, and the rapid transmission of the concentrated video data in the network is facilitated, so that the data processing efficiency is improved.
In addition, partial redundant data information of the concentrated video data is removed in advance, and a large amount of effective data information is reserved, so that the working time can be greatly saved, the working progress is accelerated, and the data processing working efficiency is improved when the concentrated video data is subsequently processed. Aiming at the application of security and public security, the security monitoring equipment carries out preliminary arrangement, analysis and classification through concentrated video data before transmitting the original video data to the storage center, so that the data processing efficiency can be improved.
It should be noted that the velocity of detecting the target by the YOLO algorithm is fast, and the streaming video can be processed in real time; the kernel time segmentation algorithm has high calculation speed and more excellent segmentation effect.
Optionally, in a data processing method shown in fig. 1, determining the target video segment according to a preset rule includes:
performing score operation on the determined target video segment to obtain the score of the target video segment;
determining whether the score of the target video segment is greater than a preset score threshold, an
Judging whether the number of video frames included in the target video segment is smaller than a preset number threshold value or not;
if the judgment results are yes, determining that the target video segment meets the preset rule;
wherein, the calculation formula of the score of the target video segment is as follows:
Figure 308039DEST_PATH_IMAGE001
wherein the content of the first and second substances,Da score for characterizing the target video segment;ifor characterizingiA video segment;kthe method is used for representing the number of video segments obtained by segmenting original video data by using a kernel time segmentation algorithm;n i for characterizingiThe number of frames of video frames contained in a video segment;d i,j for characterizingiIn a video segmentjA score of a frame video frame, the score being determined according to target information included in the frame video frame;λ i for characterizingiWhether a video segment is selected as a target video segment; wherein the content of the first and second substances,λ i =1 for secondiOne video segment is selected as a target video segment,λ i =0 foriOne video segment is not selected as the target video segment.
It should be noted that, in the following description,
Figure 319989DEST_PATH_IMAGE002
for characterizingiA score of a video segment.
In the embodiment of the present invention, the determined target video segment needs to satisfy the preset rule, that is, the score of the target video segment is greater than the preset score threshold, and the number of video frames included in the target video segment is less than the preset number threshold, so that it can be ensured that the video frames included in the target video segment are all frame-level important video frames (i.e., video frames containing a large amount of information), thereby ensuring that the original video data information is retained in the concentrated video data reconstructed from the target video segment, and further ensuring the accuracy and reliability in the subsequent data processing process.
In the embodiment of the present invention, it is,d i,j in particular according toiIn a video segmentjThe amount of information included in a frame video frame is calculated, wherein the more objects are included in the frame video frame, the higher the score thereof. For example, segmenting original video data by using a kernel time segmentation algorithm to obtain 6 video segments, wherein the selected target video segments are the 1 st, 3 rd and 5 th video segments, and correspondingly determiningλ 1 =1,λ 3 =1,λ 5 =1;λ 2 =0,λ 4 =0,λ 6 And = 0. In this way, for any selected group of target video segments, the score of the target video segment can be calculated by the formula, so that the calculation of the score is simpler and more efficient.
Optionally, in a data processing method shown in fig. 1, the step 103 of performing a hash operation on the condensed video data to obtain a hash value includes:
extracting characteristic values from the concentrated video data; wherein the feature value is used to identify the condensed video data;
and performing consistent hash operation on the characteristic value to obtain a hash value corresponding to the concentrated video data, wherein the hash value is used for determining a memory queue of the concentrated video required to be cached.
In the embodiment of the invention, in order to reduce the frequency of sending the concentrated video data to the receiving end and avoid the phenomenon of forming peak flow by malicious attack, a mode of forwarding the concentrated video data one by one is not adopted, and a memory queue is adopted as temporary storage to forward the concentrated video data.
Specifically, in the implementation process, for each piece of concentrated video data, a corresponding feature value is extracted from the concentrated video data, a node instance to which the concentrated video data is to be sent is obtained through a consistent hash algorithm according to the feature value, and the concentrated video data and the feature value thereof are stored in a memory queue corresponding to the node instance. The memory queue can store a plurality of concentrated video data, so that the concentrated video data can be cached in a partitioned mode.
In the embodiment of the invention, based on a consistent hash algorithm, when the hash value of the characteristic value of the concentrated video data is calculated, the hash value is mapped to the circle corresponding to the hash ring, clockwise search is carried out from the position, and meanwhile, the node instance required for caching of the concentrated video is determined according to the hash value of the node instance on the hash ring. It should be noted that the node instance may be a server or a virtual server node.
In addition, based on the consistent hash algorithm, node examples can be flexibly increased, a memory queue is increased, and capacity expansion is realized, so that the data processing efficiency is further improved.
In step 104, the memory queue stores the concentrated video data corresponding to at least one node, that is, the memory queue may store the concentrated video data from a plurality of video capture devices.
Optionally, in a data processing method shown in fig. 1, extracting feature values from the condensed video data includes:
extracting value from the concentrated video data of the node, wherein the value is used for representing data content corresponding to the attribute of the concentrated video data;
acquiring ID information of the node;
and extracting keys according to the value and the ID information, and taking the extracted keys as the characteristic values of the condensed video data, wherein the keys corresponding to different condensed video data are different.
It is understood that the key is a keyword specified by the condensed video data, and can uniquely distinguish the condensed video data.
In this embodiment of the present invention, the value is used to characterize data content corresponding to an attribute of the condensed video data, for example, the value includes attributes of the condensed video data, such as a size of 1GB, a name of the condensed video data, and a source of the condensed video data. In order to uniquely distinguish the concentrated video data, the ID information of the node corresponding to the concentrated video is further acquired, so that a key capable of representing the feature of the concentrated video data is obtained by extracting the uniquely determined ID information and the extracted value, and the key for uniquely distinguishing the node is convenient to use.
It is understood that the key is a keyword assigned to the condensed video data, and each condensed video data can be uniquely distinguished. The key corresponding to different condensed video data is different.
In addition, in the embodiment of the invention, in order to further improve the data transmission efficiency, a uniform data transmission format is adopted, the concentrated video data is transmitted in a Key-value-concentrated video data format, and meanwhile, the tidiness of data push is ensured, so that the data flow direction is simpler and more efficient, and the data transmission efficiency is further improved.
After the concentrated video data in the data format is sent to the receiving end in step 105, when an inquiry request sent by a user is received, inquiry can be performed according to a key carried in the inquiry request, so that efficient inquiry is realized.
Optionally, in a data processing method shown in fig. 1, the step 105 of sending the concentrated video data cached by the at least two memory queues to corresponding receiving ends according to a preset delay rule includes:
when the first preset time length is reached, the concentrated video data cached by at least two first memory queues are transmitted to corresponding first receiving ends in parallel; wherein, different first memory queues correspond to different first receiving ends;
when the second preset time length is reached, the concentrated video data cached by the at least two second memory queues are transmitted to the corresponding second receiving ends in parallel; wherein different second memory queues correspond to different second receiving ends; the first receiving end comprises a second receiving end, and the second preset time length is greater than the first preset time length.
It should be noted that different memory queues may correspond to the same receiving end.
In the embodiment of the present invention, when the first preset time length is reached, the concentrated video data buffered by the at least two first memory queues are transmitted to the corresponding first receiving ends in parallel, wherein the first memory queues correspond to different first receiving ends. Therefore, each first memory queue can forward the concentrated video data to corresponding different receiving ends in parallel, and the transmission speed is increased by the parallel.
In the embodiment of the present invention, since the first memory queue and the second memory queue have the same corresponding receiving end, a delay mechanism needs to be set, and when a second preset time length longer than the first preset time length is reached, the concentrated video data buffered by the remaining at least two second memory queues are transmitted to the corresponding second receiving ends in parallel. It should be noted that the first receiving end includes the second receiving end, that is, the second receiving end is a part of the first receiving end that needs to receive both the concentrated video data cached in the first memory queue and the concentrated video data cached in the second memory queue. Therefore, by setting the delay rule, the situation that the same receiving end receives a large amount of data at the same time to cause insufficient network bandwidth can be avoided, and the system throughput is reduced.
In the embodiment of the invention, the data is transferred from the memory queue and then forwarded to the receiving end by using the batch and the thread with fixed size, so that the receiving end is prevented from being impacted by a flow peak, the problem of insufficient network bandwidth caused by the simultaneous data reporting of massive nodes is solved, and the stable operation is ensured to ensure the accuracy of the data.
In order to more clearly illustrate the technical solution and advantages of the present invention, as shown in fig. 2, the following describes in detail a data processing method provided by an embodiment of the present invention, which specifically includes:
step 201: raw video data is received from at least one node.
Step 202: resulting in condensed video data.
Specifically, for each node, the following is performed: merging the original video data of the node to obtain concentrated video data, wherein the merging comprises the following steps:
a1, framing the original video data to obtain at least two frames of video frames;
a2, extracting background information in at least two video frames and establishing a video background model;
a3, extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the time information and the space information of the target in the video frame;
a4, segmenting original video data by using a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
a5, determining a target video segment according to a preset rule; wherein, the target video segment comprises at least two video segments;
performing score operation on the determined target video segment to obtain the score of the target video segment;
determining whether the score of the target video segment is greater than a preset score threshold, an
Judging whether the number of video frames included in the target video segment is smaller than a preset number threshold value or not;
if the judgment results are yes, determining that the target video segment meets the preset rule;
wherein, the calculation formula of the score of the target video segment is as follows:
Figure 254447DEST_PATH_IMAGE001
wherein the content of the first and second substances,Da score for characterizing the target video segment;ifor characterizingiA video segment; k is used for representing the number of video segments obtained by segmenting the original video data by using a kernel time segmentation algorithm;n i for characterizingiThe number of frames of video frames contained in a video segment;d i,j for characterizingiIn a video segmentjA score of a frame video frame, the score being determined according to target information included in the frame video frame;λ i for characterizingiWhether a video segment is selected as a target video segment; wherein the content of the first and second substances,λ i =1 for secondiOne video segment is selected as a target video segment,λ i =0 foriA video segment is not selected as a target video segment;
a6, carrying out translation rearrangement on the target in the target video segment according to the video background model, the time information and the spatial information to obtain concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
Step 203: a hash value corresponding to the condensed video data is obtained.
In particular, the amount of the solvent to be used,
extracting feature values from the condensed video data, including:
extracting value from the concentrated video data of the node, wherein the value is used for representing data content corresponding to the attribute of the concentrated video data;
acquiring ID information of the node;
extracting a key according to the value and the ID information, and taking the extracted key as a characteristic value of the condensed video data, wherein the characteristic value is used for identifying the condensed video data; keys corresponding to different concentrated video data are different;
and performing consistent hash operation on the characteristic value to obtain a hash value corresponding to the concentrated video data, wherein the hash value is used for determining a memory queue of the concentrated video required to be cached.
Step 204: a memory queue corresponding to the condensed video data is determined.
Specifically, a corresponding memory queue is determined according to the hash value, and the concentrated video data corresponding to the hash value is cached to the corresponding memory queue; and the memory queue caches concentrated video data corresponding to at least one node.
Step 205: and forwarding the concentrated video data to a receiving end.
Specifically, the sending the concentrated video data cached by the at least two memory queues to the corresponding receiving end according to the preset delay rule includes:
when the first preset time length is reached, the concentrated video data cached by at least two first memory queues are transmitted to corresponding first receiving ends in parallel; wherein, different first memory queues correspond to different first receiving ends;
when the second preset time length is reached, the concentrated video data cached by the at least two second memory queues are transmitted to the corresponding second receiving ends in parallel; wherein different second memory queues correspond to different second receiving ends; the first receiving end comprises a second receiving end, and the second preset time length is greater than the first preset time length.
As shown in fig. 3, an embodiment of the present invention provides a data processing chip. Taking a software implementation as an example, as shown in fig. 3, as a chip in a logical sense, a CPU of a device in which the chip is located reads corresponding computer program instructions in a nonvolatile memory into a memory to run. The data processing chip provided by the embodiment comprises:
an obtaining module 301, configured to receive raw video data from at least one node;
a concentration module 302 configured to, for each node: merging the original video data of the node received by the receiving module 301 to obtain concentrated video data;
an operation module 303, configured to perform a hash operation on the concentrated video data obtained by the concentration module 302 to obtain a hash value;
a caching module 304, configured to determine a corresponding memory queue according to the hash value obtained by the operation module 303, and cache the concentrated video data corresponding to the hash value in the corresponding memory queue; the method comprises the steps that concentrated video data corresponding to at least one node are cached in a memory queue;
the forwarding module 305 is configured to send the concentrated video data of the at least two memory queues cached by the caching module 304 to corresponding receiving ends according to a preset delay rule.
Optionally, on the basis of a data processing chip shown in fig. 3, the enrichment module 302 is further configured to perform the following operations:
framing original video data to obtain at least two video frames;
extracting background information in at least two video frames and establishing a video background model;
extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the time information and the space information of the target in the video frame;
segmenting original video data by utilizing a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
determining a target video segment according to a preset rule; wherein, the target video segment comprises at least two video segments;
according to the video background model, the time information and the spatial information, carrying out translation rearrangement on a target in a target video segment to obtain concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
Optionally, on the basis of a data processing chip shown in fig. 3, the enrichment module 302 is further configured to perform the following operations:
performing score operation on the determined target video segment to obtain the score of the target video segment;
determining whether the score of the target video segment is greater than a preset score threshold, an
Judging whether the number of video frames included in the target video segment is smaller than a preset number threshold value or not;
if the judgment results are yes, determining that the target video segment meets the preset rule;
wherein, the calculation formula of the score of the target video segment is as follows:
Figure 513390DEST_PATH_IMAGE001
wherein the content of the first and second substances,Da score for characterizing the target video segment;ifor characterizingiA video segment; k is used for representing the number of video segments obtained by segmenting the original video data by using a kernel time segmentation algorithm;n i for characterizingiThe number of frames of video frames contained in a video segment;d i,j for characterizingiIn a video segmentjA score of a frame video frame, the score being determined according to target information included in the frame video frame;λ i for characterizingiWhether a video segment is selected as a target video segment; wherein the content of the first and second substances,λ i =1 for secondiOne video segment is selected as a target video segment,λ i =0 foriOne video segment is not selected as the target video segment.
Optionally, on the basis of a data processing chip shown in fig. 3, the operation module 303 is further configured to perform the following operations:
extracting characteristic values from the concentrated video data; wherein the feature value is used to identify the condensed video data;
and performing consistent hash operation on the characteristic value to obtain a hash value corresponding to the concentrated video data, wherein the hash value is used for determining a memory queue of the concentrated video required to be cached.
Optionally, on the basis of a data processing chip shown in fig. 3, the operation module 303 is further configured to perform the following operations:
extracting value from the concentrated video data of the node, wherein the value is used for representing data content corresponding to the attribute of the concentrated video data;
acquiring ID information of the node;
and extracting keys according to the value and the ID information, and taking the extracted keys as the characteristic values of the condensed video data, wherein the keys corresponding to different condensed video data are different.
Optionally, on the basis of a data processing chip shown in fig. 3, the forwarding module 305 is further configured to perform the following operations:
when the first preset time length is reached, the concentrated video data cached by at least two first memory queues are transmitted to corresponding first receiving ends in parallel; wherein, different first memory queues correspond to different first receiving ends;
when the second preset time length is reached, the concentrated video data cached by the at least two second memory queues are transmitted to the corresponding second receiving ends in parallel; wherein different second memory queues correspond to different second receiving ends; the first receiving end comprises a second receiving end, and the second preset time length is greater than the first preset time length.
It is to be understood that the illustrated structure of the embodiment of the present invention is not to be specifically limited to a data processing chip. In other embodiments of the invention, a data processing chip may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Since the contents of information interaction, execution process, and the like between the modules in the chip are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
An embodiment of the present invention further provides a data processing apparatus, including: at least one memory area and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform a data processing method according to any embodiment of the present invention.
In the embodiment of the present invention, as shown in fig. 4, a hardware structure diagram of a device in which a data processing apparatus according to the embodiment of the present invention is located is provided, where in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 4, the device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing a packet, in general.
An embodiment of the present invention further provides a computer-readable medium, where computer instructions are stored on the computer-readable medium, and when executed by a processor, the computer instructions cause the processor to execute a data processing method in any embodiment of the present invention.
Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion module to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A data processing method, comprising:
receiving raw video data from at least one node;
for each node, performing:
merging the original video data of the node to obtain concentrated video data;
carrying out Hash operation on the concentrated video data to obtain a Hash value;
determining a corresponding memory queue according to the hash value, and caching the concentrated video data corresponding to the hash value to the corresponding memory queue; the memory queue caches concentrated video data corresponding to at least one node;
and sending the concentrated video data cached by the at least two memory queues to corresponding receiving ends according to a preset delay rule.
2. The method of claim 1, wherein the merging the original video data of the node to obtain the condensed video data comprises:
framing the original video data to obtain at least two video frames;
extracting background information in the at least two frames of video frames and establishing a video background model;
extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the temporal information and the spatial information of the target in the video frame;
segmenting the original video data by utilizing a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
determining a target video segment according to a preset rule; wherein the target video segment comprises at least two video segments;
according to the video background model, the time information and the spatial information, carrying out translation rearrangement on the target in the target video segment to obtain the concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
3. The method according to claim 2, wherein said determining the target video segment according to the preset rule comprises:
performing score operation on the determined target video segment to obtain the score of the target video segment;
determining whether the score of the target video segment is greater than a preset score threshold, an
Judging whether the number of video frames included in the target video segment is smaller than a preset number threshold value or not;
if the judgment results are yes, determining that the target video segment conforms to the preset rule;
wherein the calculation formula of the score of the target video segment is as follows:
Figure 448063DEST_PATH_IMAGE001
wherein the content of the first and second substances,Da score for characterizing the target video segment;ifor characterizingiA video segment;kthe method is used for representing the number of video segments obtained by segmenting the original video data by utilizing a kernel time segmentation algorithm;n i for characterizingiThe number of frames of video frames contained in a video segment;d i,j for characterizingiIn a video segmentjA score of a frame video frame, the score being determined according to target information included in the frame video frame;λ i for characterizingiWhether a video segment is selected as a target video segment; wherein the content of the first and second substances,λ i =1 for secondiOne video segment is selected as a target video segment,λ i =0 foriOne video segment is not selected as the target video segment.
4. The method of claim 1, wherein said hashing the condensed video data to obtain a hash value comprises:
extracting a characteristic value from the concentrated video data; wherein the feature value is used to identify the condensed video data;
and performing consistent hash operation on the characteristic value to obtain a hash value corresponding to the concentrated video data, wherein the hash value is used for determining a memory queue of the concentrated video to be cached.
5. The method of claim 4, wherein the extracting feature values from the condensed video data comprises:
extracting a value from the concentrated video data of the node, wherein the value is used for representing data content corresponding to the attribute of the concentrated video data;
acquiring ID information of the node;
and extracting keys according to the value and the ID information, and taking the extracted keys as the characteristic values of the concentrated video data, wherein the keys corresponding to different concentrated video data are different.
6. The method according to any one of claims 1 to 5, wherein the sending the concentrated video data buffered in the at least two memory queues to the corresponding receiving end according to the preset delay rule comprises:
when the first preset time length is reached, the concentrated video data cached by at least two first memory queues are transmitted to corresponding first receiving ends in parallel; wherein, different first memory queues correspond to different first receiving ends;
when the second preset time length is reached, the concentrated video data cached by the at least two second memory queues are transmitted to the corresponding second receiving ends in parallel; wherein different second memory queues correspond to different second receiving ends; the first receiving end comprises the second receiving end, and the second preset time length is greater than the first preset time length.
7. A data processing chip, comprising:
a receiving module for receiving raw video data from at least one node;
a concentration module for executing, for each node: merging the original video data of the node received by the receiving module to obtain concentrated video data;
the operation module is used for carrying out Hash operation on the concentrated video data obtained by the concentration module to obtain a Hash value;
the cache module is used for determining a corresponding memory queue according to the hash value obtained by the operation module and caching the concentrated video data corresponding to the hash value to the corresponding memory queue; the memory queue caches concentrated video data corresponding to at least one node;
and the forwarding module is used for sending the concentrated video data of the at least two memory queues cached by the caching module to corresponding receiving ends according to a preset delay rule.
8. The chip of claim 7, wherein the concentration module is further configured to:
framing the original video data to obtain at least two video frames;
extracting background information in the at least two frames of video frames and establishing a video background model;
extracting target information in each frame of video frame by using a YOLO algorithm; wherein the target information comprises the temporal information and the spatial information of the target in the video frame;
segmenting the original video data by utilizing a kernel time segmentation algorithm to obtain at least two video segments; each video segment comprises at least two video frames;
determining a target video segment according to a preset rule; wherein the target video segment comprises at least two video segments;
according to the video background model, the time information and the spatial information, carrying out translation rearrangement on the target in the target video segment to obtain the concentrated video data; the total frame number of the concentrated video data is smaller than that of the original video data, and the space utilization rate of the concentrated video data is higher than that of the original video data.
9. A data processing apparatus, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program, to perform the method of any of claims 1 to 6.
10. Computer readable medium, characterized in that it has stored thereon computer instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 6.
CN202110605892.8A 2021-06-01 2021-06-01 Data processing method and chip Active CN113067989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110605892.8A CN113067989B (en) 2021-06-01 2021-06-01 Data processing method and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110605892.8A CN113067989B (en) 2021-06-01 2021-06-01 Data processing method and chip

Publications (2)

Publication Number Publication Date
CN113067989A true CN113067989A (en) 2021-07-02
CN113067989B CN113067989B (en) 2021-09-24

Family

ID=76568812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110605892.8A Active CN113067989B (en) 2021-06-01 2021-06-01 Data processing method and chip

Country Status (1)

Country Link
CN (1) CN113067989B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114528243A (en) * 2022-02-14 2022-05-24 贵州电网有限责任公司 Information interaction method and device suitable for modules in power chip

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2647202A1 (en) * 2010-12-01 2013-10-09 iMinds Method and device for correlation channel estimation
CN107729809A (en) * 2017-09-11 2018-02-23 汕头大学 A kind of method, apparatus and its readable storage medium storing program for executing of adaptive generation video frequency abstract
CN110011935A (en) * 2019-03-04 2019-07-12 平安科技(深圳)有限公司 Data flow processing method and relevant device
CN110324706A (en) * 2018-03-30 2019-10-11 优酷网络技术(北京)有限公司 A kind of generation method, device and the computer storage medium of video cover
CN110446062A (en) * 2019-07-18 2019-11-12 平安科技(深圳)有限公司 Receiving handling method, electronic device and the storage medium of large data files transmission
CN110519532A (en) * 2019-09-02 2019-11-29 中移物联网有限公司 A kind of information acquisition method and electronic equipment
CN110532425A (en) * 2019-08-19 2019-12-03 深圳市网心科技有限公司 Video data placement formula storage method, device, computer equipment and storage medium
CN110826461A (en) * 2019-10-31 2020-02-21 深圳市网心科技有限公司 Video content identification method and device, electronic equipment and storage medium
CN111464882A (en) * 2019-01-18 2020-07-28 杭州海康威视数字技术股份有限公司 Video abstract generation method, device, equipment and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2647202A1 (en) * 2010-12-01 2013-10-09 iMinds Method and device for correlation channel estimation
CN107729809A (en) * 2017-09-11 2018-02-23 汕头大学 A kind of method, apparatus and its readable storage medium storing program for executing of adaptive generation video frequency abstract
CN110324706A (en) * 2018-03-30 2019-10-11 优酷网络技术(北京)有限公司 A kind of generation method, device and the computer storage medium of video cover
CN111464882A (en) * 2019-01-18 2020-07-28 杭州海康威视数字技术股份有限公司 Video abstract generation method, device, equipment and medium
CN110011935A (en) * 2019-03-04 2019-07-12 平安科技(深圳)有限公司 Data flow processing method and relevant device
CN110446062A (en) * 2019-07-18 2019-11-12 平安科技(深圳)有限公司 Receiving handling method, electronic device and the storage medium of large data files transmission
CN110532425A (en) * 2019-08-19 2019-12-03 深圳市网心科技有限公司 Video data placement formula storage method, device, computer equipment and storage medium
CN110519532A (en) * 2019-09-02 2019-11-29 中移物联网有限公司 A kind of information acquisition method and electronic equipment
CN110826461A (en) * 2019-10-31 2020-02-21 深圳市网心科技有限公司 Video content identification method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHIHONG LI, ANHONG WANG, HAIFANG WANG: "《Distributed Video Coding Based on Conditional Entropy Hash》", 《2010 INTERNATIONAL CONFERENCE ON COMPUTATIONAL ASPECTS OF SOCIAL NETWORKS》 *
唐文杰: "公安警务领域视频图像侦查关键技术综述", 《中国公共安全》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114528243A (en) * 2022-02-14 2022-05-24 贵州电网有限责任公司 Information interaction method and device suitable for modules in power chip

Also Published As

Publication number Publication date
CN113067989B (en) 2021-09-24

Similar Documents

Publication Publication Date Title
US20220368703A1 (en) Method and device for detecting security based on machine learning in combination with rule matching
WO2017005149A1 (en) Game acceleration method and device
US9806974B2 (en) Efficient acquisition of sensor data in an automated manner
US8266097B2 (en) System analysis program, system analysis method, and system analysis apparatus
US20210227007A1 (en) Data storage method, encoding device, and decoding device
CN103023796B (en) network data compression method and system
Poisel et al. Advanced file carving approaches for multimedia files.
US20110125748A1 (en) Method and Apparatus for Real Time Identification and Recording of Artifacts
US20120239652A1 (en) Hardware Accelerated Application-Based Pattern Matching for Real Time Classification and Recording of Network Traffic
CN111782140A (en) Network data packet storage method and device, computer equipment and storage medium
CN113067989B (en) Data processing method and chip
CN114157502A (en) Terminal identification method and device, electronic equipment and storage medium
WO2023179161A1 (en) Video frame rate control method and apparatus, and electronic device and storage medium
CN112968750B (en) Satellite image compressed data block analysis method and system based on AOS frame
CN110602059B (en) Method for accurately restoring clear text length fingerprint of TLS protocol encrypted transmission data
CN116796015A (en) Visual multi-mode data acquisition, transmission and processing method
CN112104628A (en) Adaptive feature rule matching real-time malicious flow detection method
Long et al. Deep encrypted traffic detection: An anomaly detection framework for encryption traffic based on parallel automatic feature extraction
CN113037551B (en) Quick identification and positioning method for sensitive-related services based on traffic slice
CN114359815A (en) Processing method for rapidly checking video content
CN116189706A (en) Data transmission method, device, electronic equipment and computer readable storage medium
CN116546269B (en) Network traffic cleaning method, system and equipment for media stream frame insertion
CN112685128A (en) Method for detecting pornography and filtering pictures of live broadcast
CN110825940A (en) Network data packet storage and query method
CN111541864A (en) Digital retina software defined camera method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221215

Address after: 807-3, floor 8, block F, No. 9, Shangdi Third Street, Haidian District, Beijing 100080

Patentee after: Zhongcheng Hualong Computer Technology Co.,Ltd.

Address before: No.114, 14th floor, block B, building 1, No.38, Zhongguancun Street, Haidian District, Beijing 100082

Patentee before: Shenwei Super Computing (Beijing) Technology Co.,Ltd.