Video processing method, video processing device, video tracking method, video tracking device and storage medium

文档序号:410560 发布日期:2021-12-17 浏览:26次 中文

阅读说明:本技术 视频处理方法、装置、视频追踪方法、装置及存储介质 (Video processing method, video processing device, video tracking method, video tracking device and storage medium ) 是由 史罗丹 张艺 林航 于 2021-11-17 设计创作,主要内容包括:本申请公开了一种视频处理方法、装置、视频追踪方法、装置及存储介质。其中,响应于请求端对目标视频数据的获取请求,获取请求端的用户标识;生成目标视频数据对应的N份切片序列;N份切片序列中M份切片序列的单帧图像中均携带有编码标识;不同份的切片序列中编码标识的图像位置不同;基于用户标识,从N份切片序列中分别提取至少一组切片数据,得到重组后的切片序列;重组后的切片序列的m组切片数据中,编码标识的图像位置用于唯一地指示用户标识;以及将重组后的切片序列发送至请求端,以供请求端播放重组后的切片序列。可以解决现有技术中存在无法追踪翻录后的视频数据的传播源的技术问题;实现对视频数据的传播源的追踪。(The application discloses a video processing method and device, a video tracking method and device and a storage medium. Responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal; generating N slice sequences corresponding to the target video data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; in the m groups of slice data of the recombined slice sequence, the image position of the coded mark is used for uniquely indicating the user mark; and sending the recombined slice sequence to a request end so that the request end can play the recombined slice sequence. The technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; the tracking of the propagation source of the video data is realized.)

1. A video processing method, comprising:

responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal;

generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single frame images of M slice sequences in the N slice sequences carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

2. The method of claim 1,

the extracting at least one group of slice data from the N slice sequences based on the user identification to obtain recombined slice sequences comprises:

carrying out M-system coding on the user identification to obtain k-bit coded data of the user identification; k is a positive integer less than or equal to m;

determining the code j of the code bit corresponding to the value of i in the k bit code data for the ith group of slice data in the recombined slice sequence; sequentially taking integers from 1 to M for i, wherein j is an integer smaller than M; and

and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

3. The method according to claim 2, characterized in that, in case M = N,

the determining the code j of the code bit corresponding to the value of i in the k-bit code data includes:

determining a first remainder obtained by dividing i by k; and

and determining the code indicated by the coded bit corresponding to the first remainder from the k-bit coded data to obtain the code j.

4. The method according to claim 2, wherein in case M = N-1; the N slice sequences comprise a slice sequence which does not carry a coding identifier;

after the M-ary coding is performed on the user identifier to obtain the k-bit coded data of the user identifier, the method further includes:

for the ith group of slice data in the recombined slice sequence, determining whether the value of i-1 corresponds to the last coded bit of the k-bit coded data;

under the condition that the value of the i-1 corresponds to the last coded bit of the k-bit coded data, extracting the ith group of slice data from a slice sequence which does not carry a coded identifier as the ith group of slice data in the recombined slice sequence; and

under the condition that the value of i-1 does not correspond to the last bit code of the k-bit coded data, triggering to execute the code j of the code bit corresponding to the value of i in the k-bit coded data; a step of extracting the ith set of slice data from the slice sequence indicated by the code j as the ith set of slice data in the recombined slice sequence, and wherein

The determining the code j of the code bit corresponding to the value of i in the k-bit code data includes: determining a second remainder obtained by dividing i by k + 1; and determining the code indicated by the coded bits corresponding to the second remainder from the k-bit coded data to obtain the code j.

5. The method of claim 1,

before generating the N slice sequences corresponding to the target video data, the method further includes:

copying the same target video data by M;

setting coding marks on different images of the M pieces of target video data respectively to obtain M pieces of marked video data; and

and slicing the M marked video data to obtain a slice sequence of each marked video data.

6. A method for video tracking, comprising:

acquiring m groups of slice data of video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers; and

and determining a user identifier for requesting the video data to be tracked based on the coded identifiers in the m groups of slice data, wherein the image positions of the coded identifiers in the m groups of slice data are used for uniquely indicating the user identifier.

7. The method of claim 6,

the determining, based on the encoded identifier in the m sets of slice data, a user identifier requesting the video data to be tracked includes: for the ith group of slice data in the m groups of slice data, determining the image position of the coding identifier in the ith group of slice data; sequentially taking integers from 1 to m from the i; determining an index value of a slice sequence to which the ith group of slice data belongs based on the image position identified by the encoding; determining coded data of the user identification based on index values corresponding to m groups of slice data; and performing M-system restoration on the coded data to obtain the user identifier, and

in the case of M = N, the determining the encoded data of the user identifier based on the index value corresponding to the M groups of slice data includes: extracting a loop body from a loop code consisting of m index values to obtain said coded data, an

Under the condition that M = N-1, the N slice sequences include a slice sequence that does not carry a coding identifier, and determining the coding data of the user identifier based on the index values corresponding to the M groups of slice data includes: determining a first index value of a slice sequence which does not carry a coding identifier from the m index values; and determining a second index value between two adjacent first index values among the m index values as the encoded data.

8. A storage medium, characterized in that the storage medium comprises a stored program, wherein the method of any one of claims 1 to 5 is performed by a processor when the program is run; or to perform the method of any of claims 6 to 7.

9. A video processing apparatus, comprising:

the identification acquisition module is used for responding to an acquisition request of a request end for target video data and acquiring a user identification of the request end;

the sequence acquisition module is used for generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single frame images of M slice sequences in the N slice sequences carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

the sequence recombination module is used for respectively extracting at least one group of slice data from the N slice sequences based on the user identification to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and the sequence sending module is used for sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

10. A video processing apparatus, comprising:

a first processor; and

a first memory coupled to the first processor for providing instructions to the first processor to process the following process steps:

responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal;

generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single frame images of M slice sequences in the N slice sequences carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

Technical Field

The present application relates to the field of image processing technologies, and in particular, to a video processing method, an apparatus, a video tracking method, an apparatus, and a storage medium.

Background

With the development of network communication, video data played on the user equipment side may be widely spread to other user equipment. For video data that is only visible to a portion of the users, the video data needs to be processed to prevent the video data from being captured by any user.

Patent document 1 (publication No. CN 111741377A) which has been disclosed therein is a method of video processing. The method comprises the following steps: cutting an original video file into a plurality of slices according to a preset time length to form an original slice set; respectively generating N watermark slice sets according to an original slice set and N preset different watermarks; when a user needs to play a video, acquiring a unique identifier of the user, and converting the unique identifier into a numerical sequence in a preset format; extracting corresponding slices from the N watermark slice sets respectively according to the extraction strategy and the sequence and value of each numerical value of the numerical value sequence, and sequentially combining the extracted slices into a slice sequence; and playing the corresponding slices in sequence according to the sequence of the slice sequence to form a video stream. The invention can identify pirated screen recording users, effectively protect the video copyright and is an effective means for fighting against pirated video users.

The published patent document (publication number CN 110062291A) discloses a digital watermark adding and extracting method, device and system, which obtains two video streams by respectively adding digital watermarks including different watermark images to a video fragment list generated by splitting a digital video, sequentially selects video fragments in the two video streams by using binary numbers of user IDs to generate a video fragment play list bound with the user IDs, extracts watermark images in illegally recorded or copied videos to obtain arrangement information by identifying the watermark images therein by human eyes, obtains a group of binary data according to the corresponding relationship between the watermark images and the binary numbers, obtains the user IDs after conversion, realizes protection and tracking of video copyright to the user level, ensures that the mobile terminal plays videos smoothly without the problem of playing cards and does not affect the viewing quality, information association to billions of user IDs can be achieved.

The conventional video processing method includes: using a Digital Rights Management (DRM) system to verify the authority of a request end requesting the video data; when the authority verification passes, sending the video data to a request end; and when the authority verification fails, the video data is not sent to the request end, so that the controllable access to the video data is realized.

However, after the request end finishes downloading the video data, there may exist other devices that record the video data played by the request end, and the propagation source of the recorded video data cannot be tracked.

In view of the above technical problem in the prior art that the propagation source of the copied video data cannot be tracked, no effective solution has been proposed at present.

Disclosure of Invention

The embodiment of the disclosure provides a video processing method and device, a video tracking method and device, and a storage medium, so as to at least solve the technical problem that a transmission source of copied video data cannot be tracked in the prior art.

According to an aspect of an embodiment of the present disclosure, there is provided a video processing method including:

responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal;

generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single frame images of M slice sequences in the N slice sequences carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

According to another aspect of the embodiments of the present disclosure, there is also provided a video tracking method, including:

acquiring m groups of slice data of video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers; and

and determining a user identifier for requesting the video data to be tracked based on the coded identifiers in the m groups of slice data, wherein the image positions of the coded identifiers in the m groups of slice data are used for uniquely indicating the user identifier.

According to another aspect of the embodiments of the present disclosure, there is also provided a storage medium including a stored program, wherein the method of any one of the above is performed by a processor when the program is executed.

According to another aspect of the embodiments of the present disclosure, there is also provided a video processing apparatus including: the identification acquisition module is used for responding to an acquisition request of a request end for target video data and acquiring a user identification of the request end;

the sequence acquisition module is used for generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

the sequence recombination module is used for respectively extracting at least one group of slice data from the N slice sequences based on the user identification to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and the sequence sending module is used for sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

According to another aspect of the embodiments of the present disclosure, there is also provided a video tracking apparatus including: the data acquisition module is used for acquiring m groups of slice data of the video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers; and

and the video tracking module is used for determining a user identifier for requesting the video data to be tracked based on the coding identifiers in the m groups of slice data, and the image positions of the coding identifiers in the m groups of slice data are used for uniquely indicating the user identifier.

According to another aspect of the embodiments of the present disclosure, there is also provided a video processing apparatus including: a first processor; and

a first memory coupled to the first processor for providing instructions to the first processor to process the following process steps:

responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal;

generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

According to another aspect of the embodiments of the present disclosure, there is also provided a video tracking apparatus including: a second processor; and

a second memory coupled to the second processor for providing instructions to the second processor to process the following process steps:

acquiring m groups of slice data of video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers; and

and determining a user identifier for requesting the video data to be tracked based on the coded identifiers in the m groups of slice data, wherein the image positions of the coded identifiers in the m groups of slice data are used for uniquely indicating the user identifier.

In the embodiment of the disclosure, a user identifier of a request end is obtained by responding to an obtaining request of the request end for target video data; generating N slice sequences corresponding to the target video data; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; sending the recombined slice sequence to a request end for the request end to play the recombined slice sequence; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data of the recombined slice sequences can uniquely indicate the user marks, the tracking end can reversely restore the user marks according to the image positions of the coding marks, and the tracking of the transmission source of the video data is realized.

Meanwhile, in the conventional video processing mode, the user identifier may be indicated by the encoding identifier. With the increase of the user identifiers, the number of the coding identifiers required to be generated by the server increases, and accordingly, the number of videos required to be processed by the server also increases. Compared with a mode of indicating the user identifier by the coding identifier, in this embodiment, the server only needs to set the coding identifiers at different image positions for M slice sequences of the same target video data, and then combines slice data at different image positions, so as to realize the indication of the user identifier; and corresponding coding identifiers do not need to be generated for each user identifier, so that the processing efficiency of video data can be saved, and the storage cost can be reduced.

Drawings

The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:

fig. 1 is a hardware block diagram of a computing device for implementing the method according to embodiment 1 of the present disclosure;

fig. 2 is a schematic diagram of a system of a video transmission system according to embodiment 1 of the present disclosure;

fig. 3 is a schematic flow chart of a video processing method according to the first aspect of embodiment 1 of the present disclosure;

fig. 4 is a schematic flow chart of a method for generating a recombined slice sequence according to the first aspect of embodiment 1 of the present disclosure;

FIG. 5 is a schematic representation of a slice sequence after recombination according to the first aspect of example 1 of the present disclosure;

fig. 6 is a flowchart illustrating a method for generating N slice sequences according to the first aspect of embodiment 1 of the present disclosure;

fig. 7 is a schematic flow chart of a video tracking method according to a second aspect of embodiment 1 of the present disclosure;

fig. 8 is a schematic diagram of a video processing apparatus according to a first aspect of embodiment 2 of the present disclosure;

fig. 9 is a schematic diagram of a video tracking device according to a second aspect of embodiment 2 of the present disclosure;

fig. 10 is a schematic diagram of a video processing apparatus according to the first aspect of embodiment 3 of the present disclosure; and

fig. 11 is a schematic diagram of a video tracking apparatus according to a second aspect of embodiment 3 of the present disclosure.

Detailed Description

In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.

It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

First, some of the nouns or terms appearing in the description of the embodiments of the present disclosure are applicable to the following explanations:

HTTP-based adaptive bitrate Streaming protocol (HTTP Live Streaming, HLS): the system is used for cutting the file or the media stream into TS slices according to different code rates at a server side for transmission, and generating an index file M3U 8; when playing the code stream, the client can select the code stream with proper code rate to download and play in the standby sources with different code rates of the same video content according to the bandwidth and performance limit of the client. When a transmission session starts, a client first downloads an M3U8 index file describing metadata of different code streams, and then searches for a corresponding TS slice according to the M3U8 index file for playing.

The HLS is compatible with an HTTP protocol, Video coding is well compatible with a browser, Video On Demand (VOD) and Live broadcast (Live) are supported, Digital Rights Management (DRM) is supported, and the like.

Example 1

According to the present embodiment, there is provided a method embodiment of a video processing method and a video tracking method, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.

The method embodiments provided by the present embodiment may be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Fig. 1 shows a hardware configuration block diagram of a computing device for implementing a video processing method and a video tracking method. As shown in fig. 1, the computing device may include one or more processors (which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computing device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.

It should be noted that the one or more processors and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computing device. As referred to in the disclosed embodiments, the data processing circuit acts as a processor control (e.g., selection of a variable resistance termination path connected to the interface).

The memory may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the video processing method and the video tracking method in the embodiments of the present disclosure, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the video processing method and the video tracking method of the application program. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory located remotely from the processor, which may be connected to the computing device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The transmission device is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by communication providers of the computing devices. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.

The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computing device.

It should be noted here that in some alternative embodiments, the computing device shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that FIG. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in a computing device as described above.

Fig. 2 is a schematic diagram of a system of the video transmission system according to the present embodiment. Referring to fig. 2, the system includes: a server 210, a requester 220, and a tracker 230.

The request end 220 refers to a user device requesting to acquire video data, and the user device may be a computer, a mobile phone, or a tablet computer, and the present embodiment does not limit the device type of the request end 220.

Optionally, the number of the request terminals 220 is one or at least two, and the number of the request terminals 220 is not limited in this embodiment.

The requesting end 220 establishes a communication connection with the server 210. The request end 220 is used for: the acquisition request of the target video data is sent to the server 210 based on the communication connection with the server 210.

Optionally, the target video data may be video data on demand, live video data, and the like, and the present embodiment does not limit the type of the target video data.

The server 210 is used for providing the video data to the requester 220. The server 210 may be composed of a single server host, or may be composed of a plurality of server hosts, and the implementation manner of the server 210 is not limited in this embodiment.

In this embodiment, the server 210 is configured to generate a user identifier of the request end in response to an acquisition request of the request end for target video data; generating N slice sequences corresponding to the target video data; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; and sending the recombined slice sequence to a request end so that the request end can play the recombined slice sequence. N and M are integers more than 1, and M is less than or equal to N; m and n are both positive integers.

Wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same.

The reconstructed slice sequence includes m sets of slice data, and the image position of the encoded identification in the m sets of slice data is used to uniquely indicate the user identification.

Optionally, the user identifier may be login information of the requesting end 220, or an equipment number of the requesting end 220, and the like, and the implementation manner of the user identifier is not limited in this embodiment.

The request end 220 is further configured to: and playing the recombined slice sequence after receiving the recombined slice sequence.

The tracking end 230 refers to an electronic device that tracks the propagation source of the video data to be tracked. The tracking end 230 may be a computer, a mobile phone, a tablet computer, a server, or the like, and the present embodiment does not limit the device type of the tracking end 230.

The video data to be tracked can be played by the request end 220; or the video data may be played by a dubbing device, where the dubbing device refers to a device for dubbing the video data played by the requesting end 220, and the source of the video data to be tracked is not limited in this embodiment.

In this embodiment, the trace end 230 is configured to: acquiring m groups of slice data of video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; and determining a user identifier for requesting the video data to be tracked based on the coding identifiers in the m groups of slice data, wherein the image position of the coding identifier in the m groups of slice data is used for uniquely indicating the user identifier. N and M are integers more than 1, and M is less than or equal to N; m and n are both positive integers.

Wherein, m groups of slice data are respectively extracted from N slice sequences; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same.

It should be noted that both the server 210 and the tracker 230 in the system can be applied to the above hardware structure.

In the above operating environment, according to the first aspect of the present embodiment, a video processing method is provided, and the method is implemented by the server 210 shown in fig. 2. Fig. 3 shows a flow diagram of the method, which, with reference to fig. 3, comprises:

s302: responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal;

s304: generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same.

N and M are integers more than 1, and M is less than or equal to N; m and n are positive integers;

s306: based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

s308: and sending the recombined slice sequence to a request end so that the request end can play the recombined slice sequence.

Wherein m is more than or equal to N.

Specifically, each slice sequence is obtained by slicing a complete target video data, and the corresponding slice modes of different slice sequences are the same. Such as: the slicing mode is as follows: dividing the target video data according to preset time length, wherein the video data corresponding to each preset time length is a slice data, and obtaining m groups of slice data arranged from front to back according to a time playing sequence. The preset duration may be 10s, 8s, and the like, and the value of the preset duration is not limited in this embodiment.

The recombined slice sequence corresponds to a complete target video data.

Optionally, the encoding identifier may be a preset watermark, a two-dimensional code, a label, or the like, and the implementation manner of the encoding identifier is not limited in this embodiment.

Optionally, before sending the recombined slice sequence to the request end, the recombined slice sequence may be encrypted in an Advanced Encryption Standard (AES) symmetric Encryption manner; alternatively, an asymmetric encryption method may be used, and the encryption method of the reconstructed slice sequence is not limited in this embodiment.

In summary, the video processing method provided in this embodiment obtains the user identifier of the requesting end by responding to the request for obtaining the target video data from the requesting end; generating N slice sequences corresponding to the target video data; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; sending the recombined slice sequence to a request end for the request end to play the recombined slice sequence; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data of the recombined slice sequences can uniquely indicate the user marks, the tracking end can reversely restore the user marks according to the image positions of the coding marks, and the tracking of the transmission source of the video data is realized.

Meanwhile, in the conventional video processing mode, the user identifier may be indicated by the encoding identifier. With the increase of the user identifiers, the number of the coding identifiers required to be generated by the server increases, and accordingly, the number of videos required to be processed by the server also increases. Compared with a mode of indicating the user identifier by the coding identifier, in this embodiment, the server only needs to set the coding identifiers at different image positions for M slice sequences of the same target video data, and then combines slice data at different image positions, so as to realize the indication of the user identifier; and corresponding coding identifiers do not need to be generated for each user identifier, so that the processing efficiency of video data can be saved, and the storage cost can be reduced.

Optionally, based on the user identifier, extracting at least one set of slice data from the N slice sequences, respectively, to obtain a recombined slice sequence, including: carrying out M-system coding on the user identification to obtain k-bit coded data of the user identification; determining the code j of the code bit corresponding to the value of i in the k bit code data for the ith group of slice data in the recombined slice sequence; and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

k is a positive integer less than or equal to m; i is an integer from 1 to M in sequence, and j is a positive integer less than or equal to M.

In this embodiment, the user identifier is M-ary coded, so that each code under the M-ary coding has a corresponding slice sequence, and thus, each bit of code of the user identifier can find a corresponding slice sequence, and the code is indicated by the image position of the code identifier of the slice data in the slice sequence, so that different user identifiers can be indicated.

In one example, M = N. In other words, the N slice sequences are all provided with coding identifiers. In this case, determining the code j of the coded bit corresponding to the value i in the k-bit coded data includes: determining a first remainder obtained by dividing i by k; and determining the code indicated by the coded bit corresponding to the first remainder from the k-bit coded data to obtain a code j.

Assume that the server and the request perform video transmission based on HLS protocol, and the M-ary encoded data is k bits, and the x-th bit is encoded as r (x). If the number of a set of slice data to be fetched is i, the real fetched slice value address Uniform Resource Locator (URL) is TS (i, R (i mod k)). Where i mod k represents the first remainder of i divided by k. According to the HLS protocol requirement, TS (i, R (i mod k)), sequence address sets with i values of [1, m ] are combined into a play list (usually in m3u8 format), and a recombined slice sequence is obtained. And m is the total number of slice data groups, and the sum of the time lengths of m groups of slice data is the video length of the target video data.

According to the HLS protocol, the symmetric encrypted secret key acquisition address of the TS file can be subjected to user authentication; according to the Content Delivery Network (CDN) storage function, the TS file URL address can be used for user authentication again.

The above example only illustrates that the server and the request perform video transmission based on the HLS protocol, and in actual implementation, the server and the request may also perform video transmission based on other protocols, where the other protocols support slicing of video data, and the video transmission protocol is not limited in this embodiment.

In order to more clearly understand the generation manner of the recombined slice sequence provided in this embodiment, referring to fig. 4, the generation manner of the recombined slice sequence is described below as an example, and the generation manner at least includes the following steps:

s401: receiving an acquisition request of target video data, and acquiring a user identifier of a request end;

s402: carrying out identity verification on the request terminal based on the user identification; when the verification passes, executing S402; when the verification fails, the process is ended;

s403: carrying out M-system coding on the user identification to obtain k-bit coded data of the user identification;

s404: for the ith group of slice data to be extracted, determining the code indicated by the ith mod k bit from the k bit coded data to obtain a code j;

s405: extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence;

s406: determining whether i is equal to m; if yes, go to step 407; if not, let i = i +1, and execute S404 again;

s407: merging the extracted URL addresses of the m groups of slice data to obtain a video play list, wherein the video play list indicates the recombined slice sequence;

s408: and sending the video play list to the request end so that the request end obtains the recombined slice sequence according to the video play list to play the video, and ending the process.

Assuming that N has a value of 2, m = 10. N slice sequences corresponding to the target video data comprise:

0 sequence: 0_001, 0_002, 0_003, 0_004, 0_005 … 0_ 010;

1, sequence: 1_001, 1_002, 1_003, 1_004, 1_005 … 1_ 010;

assuming that the user identifier is 5, the 2-ary coding is performed on the user identifier to obtain coded data of 101. According to the generation process of the recombined slice sequence, the finally generated video sequence is as follows:

1_001, 0_002, 1_003, 1_004, 0_005, 1_006, 1_007, 0_008, 1_009, 1_010。

in another example, since the encoded data of the user identifier may be a character string with a non-fixed length, in order to improve the tracking efficiency of the user identifier, in this example, slice data without carrying an encoded identifier is further inserted into the reconstructed slice sequence, and the slice data is set as a partition identifier after every k groups of slice data.

Specifically, M = N-1. In other words, the N slice sequences include one slice sequence that does not carry a coding identity. At this time, after performing M-ary coding on the user identifier to obtain k-bit coded data of the user identifier, the method further includes: for the ith group of slice data in the recombined slice sequence, determining whether the value of i-1 corresponds to the last coded bit of the k-bit coded data; under the condition that the value of i-1 corresponds to the last coded bit of the k-bit coded data, extracting the ith group of slice data from a slice sequence which does not carry a coding identifier as the ith group of slice data in the recombined slice sequence; and determining the code j indicated by the value of i in the k-bit coded data under the condition that the value of i-1 does not correspond to the last coded code bit of the k-bit coded data; and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

Accordingly, determining the code j indicated by the value of i in the k-bit encoded data comprises: determining a second remainder obtained by dividing i by k + 1; and determining the code indicated by the coded bit corresponding to the second remainder from the k-bit coded data to obtain a code j.

Referring to fig. 5, assume that N has a value of 2 and m = 10. N slice sequences corresponding to the target video data comprise:

0 sequence (see fig. 5 solid line box): 0_001, 0_002, 0_003, 0_004, 0_005 … 0_ 010;

1 sequence (see dashed box in fig. 5): 1_001, 1_002, 1_003, 1_004, 1_005 … 1_ 010;

sequence without coding identification (see bold implementation box in fig. 5): 2_001, 2_002, 2_003, 2_004, 2_005 … 2_ 010.

According to the generation process of the recombined slice sequence and after adding the segmentation identifier, the finally generated video sequence is as follows:

1_001, 0_002, 1_003, 2_004, 1_005, 0_006, 1_007, 2_008, 1_009, 0_010。

assuming that the time length of the slice data is 10s, then 0-10 s, and the coding mark is at the position corresponding to the 1 slice sequence; 11-20 seconds, and the coded mark is at the position corresponding to the 0 slice sequence; 21-30 seconds, and the code mark is at the position corresponding to the 1 slice sequence; 31-40 seconds without coded identification.

Optionally, before generating the N slice sequences corresponding to the target video data, the method further includes: copying the same target video data by M; setting coding marks on different images of the M pieces of target video data respectively to obtain M pieces of marked video data; and slicing the M pieces of marked video data to obtain a slice sequence of each piece of marked video data.

It should be added that, in a scene where M = N-1, the server further needs to slice the original target video data to obtain a slice sequence of video data without identification.

In order to more clearly understand the acquisition process of the slice sequence provided in the present application, referring to fig. 6, the following describes an example of the acquisition process, which includes at least the following steps:

s601: copying the same target video data by M;

s602: setting coding marks on different images of the M pieces of target video data respectively to obtain M pieces of marked video data;

such as: referring to fig. 7, M has a value of 8. Setting a coding identifier at the upper left of a single-frame image for first target video data; for the second target video data, setting a coding identifier above and in the middle of the single-frame image; for the third target video data, setting a coding identifier at the upper right of the single-frame image; for the fourth target video data, setting a coding identifier at the upper left middle of the single-frame image; for the fifth piece of target video data, setting a coding identifier at the right middle part of the single-frame image; setting a coding identifier at the lower left of the single-frame image for the sixth piece of target video data; setting a coding identifier below and in the middle of a single-frame image for the seventh piece of target video data; for the eighth target video data, a coding flag is set at the lower right of the single-frame image.

S603: and respectively slicing the original target video data and the M mark marked video data to obtain N mark slice sequences.

In this embodiment, each slice sequence corresponds to an index value, and the index value corresponds to each code in the M-ary system.

Therefore, according to the first aspect of this embodiment, by inserting slice data without a coding flag as a segmentation flag in the generation process of the recombined slice sequence, the end of indication of the user flag can be identified, thereby improving the tracking efficiency of the user flag.

Further, according to the second aspect of the present embodiment, there is provided a video tracking method, which is implemented by the tracking end 230 shown in fig. 2. Fig. 7 shows a flow diagram of the method, and referring to fig. 7, the method comprises:

s702: acquiring m groups of slice data of video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same.

N and M are integers more than 1, and M is less than or equal to N; m and n are positive integers; and

s704: and determining the user identification requesting the video data to be tracked based on the coding identification in the m groups of slice data.

The image position of the encoded identification in the m sets of slice data is used to uniquely indicate the user identification.

The m groups of slice data are obtained by slicing the video data to be tracked by the tracking end. The method for slicing the video data to be tracked by the tracking end is the same as the method for slicing the target video data by the service end.

Optionally, the encoding identifier may be a preset watermark, a two-dimensional code, a label, or the like, and the implementation manner of the encoding identifier is not limited in this embodiment.

In summary, the video processing method provided in this embodiment obtains m sets of slice data of video data to be tracked; determining a user identifier for requesting the video data to be tracked based on the coding identifiers in the m groups of slice data; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data can uniquely indicate the user marks, the user marks can be reversely restored according to the image positions of the coding marks, and the tracking of the propagation source of the video data is realized.

Optionally, the determining, based on the encoded identifier in the m sets of slice data, a user identifier for requesting video data to be tracked includes: for the ith group of slice data in the m groups of slice data, determining the image position of the coding identifier in the ith group of slice data; determining an index value of a slice sequence to which the ith group of slice data belongs based on the image position of the encoding identifier; determining coded data of the user identification based on index values corresponding to the m groups of slice data; and carrying out M-system restoration on the coded data to obtain the user identification.

Wherein, the M-ary restoring process is an inverse process of the M-ary encoding process, such as: the encoding process of the M system is to convert the 10 system into the M system, and the restoring process of the M system is to convert the M system into the 10 system.

In this embodiment, each slice sequence corresponds to an index value, and the index value corresponds to each code in the M-ary system.

In one example, M = N, in other words, N slice sequences are all with a coding identification. Determining the coded data of the user identifier based on the index values corresponding to the m groups of slice data, including: and extracting a loop body from the loop code consisting of the m index values to obtain coded data.

Such as: the loop code composed of M index values is 1011011011, the loop body is 101 according to the loop code, and the M-ary reduction is performed on the loop body to obtain the user identifier 5.

In another example, M = N-1, the N slice sequences include one slice sequence that does not carry a coding identity. The slice sequence that does not carry the coded identity is used to indicate the end of the user identity. At this time, the determining the encoded data of the user identifier based on the index values corresponding to the m sets of slice data includes: determining a first index value of a slice sequence which does not carry a coding identifier from the m index values; and determining a second index value between two adjacent first index values among the m index values as encoded data.

Such as: the cyclic coding formed by M index values is 1012101210, 2 is a first index value of a slice sequence which does not carry a coding identifier, according to the cyclic coding, a second index value between two adjacent first index values is 101, and the index value is subjected to M-ary reduction to obtain a user identifier of 5.

Thus, according to the second aspect of the present embodiment, by acquiring m sets of slice data of video data to be tracked; determining a user identifier for requesting the video data to be tracked based on the coding identifiers in the m groups of slice data; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data can uniquely indicate the user marks, the user marks can be reversely restored according to the image positions of the coding marks, and the tracking of the propagation source of the video data is realized.

In addition, the coding data of the user identifier is extracted through the first index value of the slice sequence which does not carry the coding identifier, the coding data corresponding to the user identifier can be extracted without traversing all slice data, and the tracking efficiency of the user identifier can be improved.

Further, referring to fig. 1, according to a third aspect of the present embodiment, there is provided a storage medium. The storage medium comprises a stored program, wherein the method of any of the above is performed by a processor when the program is run.

Therefore, according to the embodiment, the user identifier of the request end is obtained by responding to the request for obtaining the target video data from the request end; generating N slice sequences corresponding to the target video data; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; sending the recombined slice sequence to a request end for the request end to play the recombined slice sequence; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data of the recombined slice sequences can uniquely indicate the user marks, the tracking end can reversely restore the user marks according to the image positions of the coding marks, and the tracking of the transmission source of the video data is realized.

Meanwhile, in the conventional video processing mode, the user identifier may be indicated by the encoding identifier. With the increase of the user identifiers, the number of the coding identifiers required to be generated by the server increases, and accordingly, the number of videos required to be processed by the server also increases. Compared with a mode of indicating the user identifier by the coding identifier, in this embodiment, the server only needs to set the coding identifiers at different image positions for M slice sequences of the same target video data, and then combines slice data at different image positions, so as to realize the indication of the user identifier; and corresponding coding identifiers do not need to be generated for each user identifier, so that the processing efficiency of video data can be saved, and the storage cost can be reduced.

By inserting slice data without coding marks as segmentation marks in the generation process of the recombined slice sequence, the end of indication of the user mark can be marked, and the tracking efficiency of the user mark is improved.

It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.

Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.

Example 2

Fig. 8 shows a video processing apparatus 800 according to the first aspect of the present embodiment, the apparatus 800 corresponding to the method according to the first aspect of embodiment 1. Referring to fig. 8, the apparatus 800 includes: an identifier obtaining module 810, a sequence obtaining module 820, a sequence reassembling module 830, and a sequence transmitting module 840.

The identifier obtaining module 810 is configured to, in response to a request for obtaining target video data from a requesting end, obtain a user identifier of the requesting end;

a sequence obtaining module 820, configured to generate N slice sequences corresponding to the target video data, where the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single frame images of M slice sequences in the N slice sequences carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

a sequence recombination module 830, configured to extract at least one set of slice data from the N slice sequences respectively based on the user identifier, so as to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

a sequence sending module 840, configured to send the recombined slice sequence to the request end, so that the request end plays the recombined slice sequence.

Optionally, the sequence reassembly module 830 is configured to:

carrying out M-system coding on the user identification to obtain k-bit coded data of the user identification; k is a positive integer less than or equal to m;

determining the code j of the code bit corresponding to the value of i in the k bit code data for the ith group of slice data in the recombined slice sequence; i is an integer from 1 to M in sequence, and j is a positive integer smaller than M; and

and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

Optionally, in the case of M = N, the sequence reassembly module 830 is configured to:

determining a first remainder obtained by dividing i by k; and

the code indicated by the coded bit corresponding to the first remainder is determined from the k-bit coded data, and a code j is obtained.

Alternatively, in the case of M = N-1; the N slice sequences comprise a slice sequence which does not carry a coding identifier; the sequence recombination module 830 is further configured to:

after M-system coding is carried out on the user identification to obtain k-bit coded data of the user identification, whether the value of i-1 corresponds to the last coded bit of the k-bit coded data or not is determined for the ith group of slice data in the recombined slice sequence;

under the condition that the value of i-1 corresponds to the last coded bit of the k-bit coded data, extracting the ith group of slice data from a slice sequence which does not carry a coded identifier as the ith group of slice data in the recombined slice sequence; and

under the condition that the value of i-1 does not correspond to the last coded bit of the k-bit coded data, triggering and executing the code j of the coded bit corresponding to the value of i in the k-bit coded data; and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

Optionally, the sequence reassembly module 830 is further configured to:

determining a second remainder obtained by dividing i by k + 1; and

and determining the code indicated by the coded bit corresponding to the second remainder from the coded data of the k bits to obtain a code j.

Optionally, the apparatus further comprises: a video copy module 850, an identification setting module 860, and a video slice module 870.

A video copy module 850, configured to copy M portions of the same target video data before generating N portions of slice sequences corresponding to the target video data;

the identifier setting module 860 is configured to set encoding identifiers for the M pieces of target video data in different images, respectively, to obtain M pieces of identifier video data; and

and the video slicing module 870 is configured to slice the M logo video data to obtain a slice sequence of each logo video data.

Furthermore, fig. 9 shows a video tracking apparatus 900 according to the second aspect of the present embodiment, the apparatus 900 corresponding to the method according to the second aspect of the embodiment 1. Referring to fig. 9, the apparatus 900 includes: a data acquisition module 910 and a video tracking module 920.

A data obtaining module 910, configured to obtain m sets of slice data of video data to be tracked, where each set of slice data includes n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers; and

a video tracking module 920, configured to determine, based on the coding identifier in the m sets of slice data, a user identifier requesting the video data to be tracked; the image position of the encoded identification in the m sets of slice data is used to uniquely indicate the user identification.

Optionally, the video tracking module 920 is configured to:

for the ith group of slice data in the m groups of slice data, determining the image position of the coding identifier in the ith group of slice data; sequentially taking integers from 1 to m from the i;

determining an index value of a slice sequence to which the ith group of slice data belongs based on the image position identified by the encoding;

determining coded data of the user identification based on index values corresponding to m groups of slice data; and

and carrying out M-system restoration on the coded data to obtain the user identification.

Optionally, in the case of M = N, the video tracking module 920 is configured to:

and extracting a loop body from the loop code consisting of the m index values to obtain the coded data.

Optionally, in the case of M = N-1, the N slice sequences include one slice sequence that does not carry a coding identifier; the video tracking module 920 is configured to:

determining a first index value of a slice sequence which does not carry a coding identifier from the m index values;

determining a second index value between two adjacent first index values among the m index values as the encoded data.

Therefore, according to the embodiment, the user identifier of the request end is obtained by responding to the request for obtaining the target video data from the request end; generating N slice sequences corresponding to the target video data; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; sending the recombined slice sequence to a request end for the request end to play the recombined slice sequence; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data of the recombined slice sequences can uniquely indicate the user marks, the tracking end can reversely restore the user marks according to the image positions of the coding marks, and the tracking of the transmission source of the video data is realized.

Meanwhile, in the conventional video processing mode, the user identifier may be indicated by the encoding identifier. With the increase of the user identifiers, the number of the coding identifiers required to be generated by the server increases, and accordingly, the number of videos required to be processed by the server also increases. Compared with a mode of indicating the user identifier by the coding identifier, in this embodiment, the server only needs to set the coding identifiers at different image positions for M slice sequences of the same target video data, and then combines slice data at different image positions, so as to realize the indication of the user identifier; and corresponding coding identifiers do not need to be generated for each user identifier, so that the processing efficiency of video data can be saved, and the storage cost can be reduced.

By inserting slice data without coding marks as segmentation marks in the generation process of the recombined slice sequence, the end of indication of the user mark can be marked, and the tracking efficiency of the user mark is improved.

Example 3

Fig. 10 shows a video processing apparatus 1000 according to the first aspect of the present embodiment, the apparatus 1000 corresponding to the method according to the first aspect of embodiment 1. Referring to fig. 10, the apparatus 1000 includes: a first processor 1010; and

a first memory 1020, coupled to the first processor 1010, for providing instructions to the first processor 1010 to process the following steps:

responding to an acquisition request of a request terminal for target video data, and acquiring a user identifier of the request terminal;

generating N slice sequences corresponding to the target video data, wherein the N slice sequences have the same slice data; each slice sequence comprises m sets of slice data; each group of slice data comprises n frames of single-frame images; the single frame images of M slice sequences in the N slice sequences carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers;

based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; the recombined slice sequence comprises m groups of slice data, and the image position of the coded identifier in the m groups of slice data is used for uniquely indicating the user identifier; and

and sending the recombined slice sequence to the request end so that the request end can play the recombined slice sequence.

Optionally, the extracting at least one set of slice data from the N slice sequences respectively based on the user identifier to obtain a recombined slice sequence includes:

carrying out M-system coding on the user identification to obtain k-bit coded data of the user identification; k is a positive integer less than or equal to m;

determining the code j of the code bit corresponding to the value of i in the k bit code data for the ith group of slice data in the recombined slice sequence; sequentially taking integers from 1 to M for i, wherein j is a positive integer smaller than M; and

and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

Optionally, in the case of M = N, the determining the code j indicated by the value of i in the k-bit encoded data includes:

determining a first remainder obtained by dividing i by k; and

and determining the code indicated by the coded bit corresponding to the first remainder from the k-bit coded data to obtain the code j.

Alternatively, in the case of M = N-1; the N slice sequences comprise a slice sequence which does not carry a coding identifier;

after the M-ary coding is performed on the user identifier to obtain the k-bit coded data of the user identifier, the method further includes:

for the ith group of slice data in the recombined slice sequence, determining whether the value of i-1 corresponds to the last coded bit of the k-bit coded data;

under the condition that the value of the i-1 corresponds to the last coded bit of the k-bit coded data, extracting the ith group of slice data from a slice sequence which does not carry a coded identifier as the ith group of slice data in the recombined slice sequence; and

under the condition that the value of i-1 does not correspond to the last coded bit of the k-bit coded data, triggering to execute the coding j of the coded bit corresponding to the value of i in the k-bit coded data; and extracting the ith group of slice data from the slice sequence indicated by the code j as the ith group of slice data in the recombined slice sequence.

Optionally, the determining the code j indicated by the value of i in the k-bit encoded data includes:

determining a second remainder obtained by dividing i by k + 1; and

and determining the code indicated by the coded bit corresponding to the second remainder from the k-bit coded data to obtain the code j.

Optionally, before generating the N slice sequences corresponding to the target video data, the method further includes:

copying the same target video data by M;

setting coding marks on different images of the M pieces of target video data respectively to obtain M pieces of marked video data; and

and slicing the M marked video data to obtain a slice sequence of each marked video data.

Furthermore, fig. 11 shows a video tracking apparatus 1100 according to the second aspect of the present embodiment, the apparatus 1100 corresponding to the method according to the second aspect of embodiment 1. Referring to fig. 11, the apparatus 1100 includes: a second processor; and

a second memory coupled to the second processor for providing instructions to the second processor to process the following process steps:

acquiring m groups of slice data of video data to be tracked, wherein each group of slice data comprises n frames of single-frame images; the m groups of slice data are respectively extracted from N slice sequences, and the N slice sequences have the same slice data; the single-frame images of M slice sequences in the N slice sequences all carry coding identifications; the positions of the images of the coding marks in the slice sequences of different parts are different, and the positions of the images of the coding marks in the slice sequences of the same part are the same; n and M are integers which are more than 1, and M is less than or equal to N; both m and n are positive integers; and

and determining a user identifier for requesting the video data to be tracked based on the coding identifiers in the m groups of slice data.

Optionally, the determining, based on the encoded identifier in the m sets of slice data, a user identifier for requesting the video data to be tracked includes:

for the ith group of slice data in the m groups of slice data, determining the image position of the coding identifier in the ith group of slice data; sequentially taking integers from 1 to m from the i;

determining an index value of a slice sequence to which the ith group of slice data belongs based on the image position identified by the encoding;

determining coded data of the user identification based on index values corresponding to m groups of slice data; and

and carrying out M-system restoration on the coded data to obtain the user identification.

Optionally, in the case that M = N, the determining, based on the index value corresponding to the M groups of slice data, the encoded data of the user identifier includes:

and extracting a loop body from the loop code consisting of the m index values to obtain the coded data.

Optionally, in the case of M = N-1, the N slice sequences include one slice sequence that does not carry a coding identifier;

the determining the encoded data of the user identifier based on the index values corresponding to the m groups of slice data includes:

determining a first index value of a slice sequence which does not carry a coding identifier from the m index values; and

determining a second index value between two adjacent first index values among the m index values as the encoded data.

Therefore, according to the embodiment, the user identifier of the request end is obtained by responding to the request for obtaining the target video data from the request end; generating N slice sequences corresponding to the target video data; based on the user identification, respectively extracting at least one group of slice data from the N slice sequences to obtain recombined slice sequences; sending the recombined slice sequence to a request end for the request end to play the recombined slice sequence; the technical problem that the transmission source of the copied video data cannot be tracked in the prior art can be solved; because the image positions of the coding marks in the slice sequences of different shares are different, and the image positions of the coding marks in the m groups of slice data of the recombined slice sequences can uniquely indicate the user marks, the tracking end can reversely restore the user marks according to the image positions of the coding marks, and the tracking of the transmission source of the video data is realized.

Meanwhile, in the conventional video processing mode, the user identifier may be indicated by the encoding identifier. With the increase of the user identifiers, the number of the coding identifiers required to be generated by the server increases, and accordingly, the number of videos required to be processed by the server also increases. Compared with a mode of indicating the user identifier by the coding identifier, in this embodiment, the server only needs to set the coding identifiers at different image positions for M slice sequences of the same target video data, and then combines slice data at different image positions, so as to realize the indication of the user identifier; and corresponding coding identifiers do not need to be generated for each user identifier, so that the processing efficiency of video data can be saved, and the storage cost can be reduced.

By inserting slice data without coding marks as segmentation marks in the generation process of the recombined slice sequence, the end of indication of the user mark can be marked, and the tracking efficiency of the user mark is improved.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频处理方法及设备、服务器、电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类