WO2021147556A1 - 一种视频数据展示方法、装置、终端设备及存储介质 - Google Patents

一种视频数据展示方法、装置、终端设备及存储介质 Download PDF

Info

Publication number
WO2021147556A1
WO2021147556A1 PCT/CN2020/135512 CN2020135512W WO2021147556A1 WO 2021147556 A1 WO2021147556 A1 WO 2021147556A1 CN 2020135512 W CN2020135512 W CN 2020135512W WO 2021147556 A1 WO2021147556 A1 WO 2021147556A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
grpc
data
request
client
Prior art date
Application number
PCT/CN2020/135512
Other languages
English (en)
French (fr)
Inventor
丁伟
姜禹
张国辉
宋晨
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021147556A1 publication Critical patent/WO2021147556A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of big data technology, and in particular to a video data display method, device, terminal device and storage medium.
  • Video (such as pedestrian tracking, face recognition, video structuring, etc.) display systems are basically client/server architectures.
  • the server is generally deployed on a GPU (Graphic Processing Unit) graphics algorithm server in the group's computer room.
  • the client can be deployed on a Windows display/demo host terminal without a GPU graphics card and can support multiple display terminals at the same time.
  • the server with GPU graphics card in the computer room analyzes the video source to obtain video structured data, and then the server pushes the video frame and video structured real-time data to the client, and the client displays the real-time video and video structured data.
  • the inventor realizes that in the prior art, the communication between the client and the server in the video display process directly adopts the underlying transmission control protocol (TCP) or the internetwork protocol (IP) communication architecture, which makes it necessary to understand a lot
  • TCP transmission control protocol
  • IP internetwork protocol
  • the embodiments of the present application provide a video data display method, device, terminal device, and storage medium to solve the problem that the communication between the client and the server needs to consider network abnormalities and load conditions during the video display process in the prior art.
  • the resulting inefficiency of video display is a problem that the communication between the client and the server needs to consider network abnormalities and load conditions during the video display process in the prior art.
  • the first aspect of the embodiments of the present application provides a video data display method, which is applied to any server, and the gRPC communication framework is adopted between the server and the client, including:
  • the second aspect of the embodiments of the present application provides a video data display device, which is applied to any server, and the gRPC communication framework is adopted between the server and the client, including:
  • the video source query unit is configured to receive the gRPC video request instruction sent by the client, and perform video source query according to the gRPC video request instruction to obtain the target video source;
  • a video decoding unit configured to obtain video data of the target video source, and perform video decoding on the video data to obtain a video frame
  • a structured analysis unit configured to perform structured analysis on the video frame to obtain video structured data
  • the video display unit is configured to send the video structured data and the video data to the client in a server-side data stream mode, and instruct the client to control the video structured data and the video according to a preset control instruction.
  • the video data is video displayed.
  • the third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program
  • a terminal device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program
  • the fourth aspect of the embodiments of the present application provides a storage medium that stores a computer program, wherein the computer program is executed by a processor to implement the following steps:
  • the embodiment of the present application has the beneficial effect that by adopting the gRPC communication framework, the server and the client do not need to consider the underlying network details, network abnormalities and load conditions, and improve the efficiency of video display.
  • the gRPC video request command can effectively query the target video source, thereby ensuring the acquisition of video data.
  • the structured analysis of the video data is guaranteed, and the video structure is structured in the server data stream mode.
  • the data and video data are sent to the client, which effectively guarantees the data integrity of the video structured data and the video data transmission process, thereby improving the accuracy of video display.
  • FIG. 1 is an implementation flowchart of a video data display method provided by an embodiment of the present application
  • FIG. 2 is an implementation flowchart of a video data display method provided by another embodiment of the present application.
  • FIG. 3 is an implementation flowchart of a video data display method provided by still another embodiment of the present application.
  • FIG. 4 is a structural block diagram of a video data display device provided by an embodiment of the present application.
  • Fig. 5 is a structural block diagram of a terminal device provided by an embodiment of the present application.
  • the federated learning model training method involved in the embodiment of the present application may be executed by a control device or a terminal (hereinafter referred to as a “mobile terminal”).
  • Figure 1 shows an implementation flow chart of a video data display method provided by an embodiment of the present application.
  • the video data display method is applied to any server, and a gRPC communication framework is adopted between the server and the client.
  • Methods include:
  • Step S10 Receive a gRPC video request instruction sent by the client, and perform a video source query according to the gRPC video request instruction to obtain a target video source.
  • gRPC remote procedure call
  • server server
  • client client
  • the gRPC communication framework can Define interface files according to requirements, which can effectively manage interface constraints and improve the stability of data communication between the server and the client.
  • the gRPC communication framework can generate interface dependent files based on the protoc (protocol) compilation tool, for example, videostruct .pb.h dependent files, videostruct.pb.cc dependent files, videostruct.grpc.pb.h dependent files or videostruct.grpc.pb.cc dependent files, etc., and through the use of gRPC communication framework, so that the server and client When data exchange, only need to add interface dependency suffixes pb.h, pb.cc, grpc.pb.h, grpc.pb.cc files, the gRPC communication framework can make the client call the service provided by the remote server just like calling the local method , Which enables the client and server applications to communicate transparently, and makes it easier to build a connection system. Direct communication is based on the server/client model. The server and the client do not need to consider the underlying network details, network abnormalities and The load situation improves the efficiency of video display.
  • a gRPC video request instruction sent by any client if a gRPC video request instruction sent by any client is received, it is determined that the video data needs to be displayed on the client.
  • the gRPC video request instruction stores the video source address, and the video source address Used to point to the corresponding target video source.
  • the video source can be a camera or any device with video shooting and video storage functions.
  • the target video source can be obtained by querying the video source according to the gRPC video request instruction, which effectively guarantees the subsequent video data acquisition Accuracy.
  • Step S20 Obtain the video data of the target video source, and perform video decoding on the video data to obtain a video frame.
  • the target video source can be acquired according to a preset acquisition rule, and the preset acquisition rule can be set according to requirements.
  • the preset acquisition rule may be acquiring video data within a preset time range, and acquiring All the video data stored in the target video source, or obtain the video data of the target video source according to the video volume threshold.
  • the video data can be decoded based on a video decoder.
  • the video decoder refers to a program or device capable of compressing or decompressing video data. Decompress to get the video frame.
  • the video decoder includes a hardware decoder and a software decoder.
  • the hardware decoder includes an Opus decoder, Aac decoder, Ogg decoder, Speex decoder, etc.
  • the software decoder is provided with a video decoding algorithm.
  • the software decoder is used to run the corresponding decoding program according to the video decoding algorithm to achieve the effect of decompressing the video decoder to obtain the corresponding video frame.
  • the video frame is obtained by video decoding the video data, which effectively guarantees The subsequent operations of structured analysis of video data.
  • Step S30 Perform structural analysis on the video frame to obtain video structured data.
  • structured analysis is a technology for structured extraction of important information in the content of a video frame.
  • the content of the video frame is used in accordance with the semantic relationship, and processing methods such as spatio-temporal segmentation, feature extraction, object recognition, and deep learning are used to organize it into Text information or visual graphic information that can be understood by computers and people to obtain corresponding video structured data.
  • the structured data of the video is obtained by collecting pedestrian characteristic information, vehicle characteristic information, crowd characteristic information, and behavior characteristic information in the video frame.
  • the pedestrian characteristic information includes the gender, age, and whether the pedestrian is Use a mobile phone, whether to wear glasses, whether to wear a hat, lower body clothing color, lower body clothing, upper body clothing color, upper body clothing, upper body clothing subdivision, upper body clothing texture, body orientation, whether to bring an umbrella, etc. information.
  • the vehicle characteristic information includes one or more combination information of the vehicle's license plate number, license plate color, license plate type, body color, vehicle brand, presence or absence of sunroof, interior decorations, annual inspection mark, luggage rack and other information.
  • the crowd characteristic information includes one or more combinations of information such as crowd density, crowd distribution, crowd movement direction, crowd movement speed, crowd abnormality, etc.
  • the behavior characteristic information includes crowd gathering, crowd dispersal, reverse walking, falling, etc. One or more of the combined information.
  • the video frame can be analyzed based on the structured analysis model to obtain corresponding video structured data.
  • the video structured data includes multiple structured sub-information.
  • the sub-information is the structured result of the corresponding video frame in the video data, and each structured sub-information contains attribute information such as the tag, location, trajectory tracking, related gender, and clothing posture of the person in the corresponding video frame.
  • Step S40 Send the video structured data and the video data to the client in a server-side data stream mode, and instruct the client to control the video structured data and the video according to a preset control instruction.
  • the data is displayed in video.
  • the preset control instruction is used to trigger the client's video display operation on the video structured data and video data.
  • the preset control instruction carries the video structured data and the data identifier of the video data respectively, and based on the data identifier, the client is controlled to perform video display of the corresponding video structured data and video data, In turn, the accuracy of video data display is improved.
  • the one-way data stream mode is used when the server receives the gRPC video request command sent by the client, and the server does not respond to the gRPC video request command; the server-side data stream mode is used to act as a server and multiple Two clients communicate.
  • the server receives a gRPC video request instruction sent by any client, it will query the target video source, obtain video data, and analyze the structure of the video frame according to the gRPC video request instruction. The customized data and video data are sent to the client as the command response.
  • This client-side data stream mode is used when the server receives gRPC video request commands sent by different clients, and only one response is made to the gRPC video request commands sent by different clients.
  • This client-side data stream mode is used for client active streaming The scenario where data is pushed to the server in a mode; this two-way data flow mode is used for both the server and the customer to actively push data to achieve the effect of two-way communication.
  • the method before receiving the gRPC video request instruction sent by the client, the method further includes:
  • the preset interface file includes interface basic information, request parameter information, and response information.
  • the interface basic information includes interface name, interface URL (Uniform Resource Locator), request method and description information
  • the request parameter information includes request header information and request body information
  • the response information includes the data type returned in the response;
  • the gRPC interface effectively guarantees the gRPC video request command sent by the client to the server based on the gRPC interface, and the server monitors the command reception status of the gRPC interface in real time. Get the gRPC video request instruction sent by the client to the server.
  • the target can be effectively inquired
  • the video source guarantees the acquisition of video data.
  • decoding the video data the structured analysis of the video data is guaranteed.
  • sending the video structured data and video data to the client in the server-side data stream mode it is effective This ensures the integrity of the video structured data and the data during the video data transmission process, thereby improving the accuracy of video display.
  • FIG. 2 is an implementation flowchart of a video data display method provided by another embodiment of the present application. Compared with the embodiment corresponding to FIG. 1, the video data display method provided in this embodiment is a further refinement of step S20 in the embodiment corresponding to FIG. 1, and includes:
  • Step S21 Decapsulate the video data to obtain a video file, and obtain a video stream in the video file.
  • a decapsulation lookup table is pre-stored, and the decapsulation lookup table stores the correspondence between different header identifiers and corresponding decapsulation programs. Therefore, the packet header in the header information in the video data is stored in advance. The identification is matched with the decapsulation query table to obtain the corresponding decapsulation program, which effectively guarantees the decapsulation operation of the video data.
  • the data in the video file is filtered based on a preset video format to obtain a corresponding video stream.
  • the preset video format can be set according to requirements, for example, the preset video format can be Set to MPEG, baiAVI, nAVI, ASF or MOV format, etc.
  • Step S22 Query the index position of the video stream in the video file, and obtain a decoder context according to the index position.
  • the index position can be queried by traversing the video stream, or the index position of the video stream in the video file can be queried by using the "av_find_best_stream" function, and the corresponding decoder context can be queried based on the index position;
  • a context lookup table is pre-stored, and the context lookup table stores the correspondence between different index positions and corresponding decoder contexts. Therefore, the query is performed by comparing the queried index positions with the context lookup table. Match to obtain the corresponding decoder context, which is used to query the decoder corresponding to the video stream.
  • Step S23 query the decoder ID according to the decoder context, and obtain the decoder according to the decoder ID;
  • the decoder ID Identity document, identity identification number
  • the preset identification bit can be set according to requirements, and the preset identification bit in this step is the character position corresponding to the "codecID" identification.
  • a decoder ID table is pre-stored, and the decoder ID table stores the correspondence between different decoder IDs and corresponding decoders. Therefore, by combining the queried decoder ID with the decoder ID table, the corresponding relationship between the decoder ID and the corresponding decoder is stored. The device ID table is matched to obtain the corresponding decoder.
  • Step S24 Run the acquired decoder, and decode the video stream according to the decoder to obtain the video frame.
  • the video file is obtained by decapsulating the video data, and the video stream in the video file is obtained, which effectively guarantees the subsequent structured analysis operation of the video data, and improves the accuracy of the video structured data.
  • the corresponding decoder context can be effectively obtained. Based on the acquisition of the decoder context, the decoder corresponding to the video stream can be effectively queried, thereby improving the accuracy of video stream decoding .
  • FIG. 3 is a flowchart of an implementation of a video data display method provided by another embodiment of the present application.
  • the video data display method provided in this embodiment is a further refinement of step S10 in the embodiment corresponding to FIG. 1, and includes:
  • Step S11 checking the validity of the gRPC request message header in the gRPC video request instruction
  • the gRPC request message header in the gRPC video request command is checked for validity to determine whether the gRPC video request command is valid. If the validity check of the gRPC request message header fails, the gRPC video request command is judged to be invalid , Does not respond to the gRPC video request command.
  • the checking the validity of the gRPC request message header in the gRPC video request instruction includes:
  • the requested content type is not a preset content type, it is determined that the validity check of the gRPC request message header is unqualified;
  • the requested content type is the preset content type, determining that the validity check of the gRPC request message header is qualified;
  • the information corresponding to the "Content-Type" in the gRPC request message header is obtained, and the request content type is obtained.
  • the preset content type can be set according to requirements, for example, the preset content type can be set to application type or grpc Types of.
  • Step S12 if the legality of the gRPC request message header is verified to be qualified, obtain the gRPC request message body in the gRPC video request instruction;
  • the gRPC request message body stores instruction information in the gRPC video request instruction, and the instruction information is used to characterize the instruction requirements of the gRPC video request instruction.
  • Step S13 Decode the gRPC request message body to obtain gRPC decoding information, and obtain the video source address in the gRPC decoding information;
  • a message body decoder is pre-stored in this embodiment, and the message body decoder is used to decode the gRPC request message body corresponding to the gRPC request message header that has passed the validity check to obtain corresponding gRPC decoding information.
  • the gRPC decoding information stores a video source address preset by the client, and the video source address is used to query the video source, that is, the client needs to perform video on the video source corresponding to the video source address. Data acquisition.
  • Step S14 Perform a video source query according to the video source address to obtain the target video source.
  • the sending the video structured data and the video data to the client in a server-side data stream mode includes:
  • the transmission of the video structured data and video data is effectively guaranteed.
  • the response message header and gRPC response message body construct a gRPC response message, and send the gRPC response message to the client according to the gRPC interface, which can effectively send video structured data and video data to the client based on the gRPC communication framework.
  • the gRPC request message header in the gRPC video request command by checking the validity of the gRPC request message header in the gRPC video request command, it can be effectively judged whether the received gRPC video request command is a valid command, and by obtaining the gRPC request message in the gRPC video request command
  • the body of the gRPC request message is decoded, and the corresponding gRPC decoding information and the video source address carried in the gRPC decoding information can be effectively obtained, thereby improving the accuracy of the target video source query.
  • the video data is obtained based on the target video source
  • the video structured data is obtained based on the structured analysis of the video frame.
  • Uploading video data and video structured data to the blockchain can ensure its security and fairness and transparency to users.
  • the user equipment can download the video data and the video structured data from the blockchain to verify whether the video data and the video structured data have been tampered with.
  • the blockchain referred to in this example is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • FIG. 4 is a structural block diagram of a video data display device 100 provided by an embodiment of the present application.
  • the units included in the video data display device 100 are used to execute the steps in the embodiments corresponding to FIGS. 1 to 3.
  • the video data display device 100 is applied to any server, and the gRPC communication framework is adopted between the server and the client, including: a video source query unit 10, a video decoding unit 11, a structured analysis unit 12, and a video display unit 13, of which:
  • the video source query unit 10 is configured to receive a gRPC video request instruction sent by the client, and perform a video source query according to the gRPC video request instruction to obtain a target video source.
  • the video source query unit 10 is further configured to: perform a legality check on the gRPC request message header in the gRPC video request instruction;
  • the video source query unit 10 is further configured to: obtain the request content type of the gRPC request message header;
  • the requested content type is not a preset content type, it is determined that the validity check of the gRPC request message header is unqualified;
  • the requested content type is the preset content type, it is determined that the validity check of the gRPC request message header is qualified.
  • the video decoding unit 11 is configured to obtain video data of the target video source, and perform video decoding on the video data to obtain a video frame.
  • the video decoding unit 11 is further configured to: decapsulate the video data to obtain a video file, and obtain a video stream in the video file;
  • Run the acquired decoder and decode the video stream according to the decoder to obtain the video frame.
  • the structured analysis unit 12 is configured to perform structured analysis on the video frame to obtain video structured data.
  • the video display unit 13 is configured to send the video structured data and the video data to the client in a server-side data stream mode, and instruct the client to control the video structured data according to a preset control instruction Perform a video display with the video data.
  • the video display unit 13 is further configured to: obtain the port address of the client, and generate a gRPC response message header according to the port address;
  • a gRPC response message is constructed according to the gRPC response message header and the gRPC response message body, and the gRPC response message is sent to the client according to the gRPC interface.
  • the video data display device 100 further includes:
  • the interface setting unit 14 is configured to query a preset interface file, and generate a gRPC interface according to the preset interface file.
  • the preset interface file includes interface basic information, request parameter information, and response information, and the interface basic information includes the interface Name, interface URL, request method and description information, the request parameter information includes request header information and request body information, and the response information includes the type of data returned in the response;
  • the adoption of the gRPC communication framework eliminates the need to consider the underlying network details, network abnormalities and load conditions between the server and the client, and improves the efficiency of video display.
  • the video source guarantees the acquisition of video data.
  • decoding the video data the structured analysis of the video data is guaranteed.
  • sending the video structured data and video data to the client in the server-side data stream mode it is effective This ensures the integrity of the video structured data and the data during the video data transmission process, thereby improving the accuracy of video display.
  • This embodiment also provides a storage medium, which is applied to any server.
  • the gRPC communication framework is adopted between the server and the client.
  • the storage medium stores a computer program.
  • the storage medium may be non-volatile or It is volatile, in which the following steps are implemented when the computer program is executed by the processor:
  • FIG. 5 is a structural block diagram of a terminal device 2 provided by another embodiment of the present application.
  • the terminal device 2 of this embodiment includes: a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and running on the processor 20, such as a video data display method program.
  • the processor 20 executes the computer program 23 the steps in each embodiment of the above-mentioned video data display method are implemented, for example, S10 to S40 shown in FIG. 1, or S21 to S24 shown in FIG. 2, or S21 to S24 shown in FIG. S11 to S14.
  • the processor 20 executes the computer program 22, the functions of the units in the embodiment corresponding to FIG. 4 are implemented, for example, the functions of the units 10 to 13 shown in FIG. 4, please refer to the corresponding implementation in FIG. 5 for details The related description in the example will not be repeated here.
  • the computer program 22 may be divided into one or more units, and the one or more units are stored in the memory 21 and executed by the processor 20 to complete the application.
  • the one or more units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 22 in the terminal device 2.
  • the computer program 22 can be divided into a video source query unit 10, a video decoding unit 11, a structured analysis unit 12, a video display unit 13, and an interface setting unit 14. The specific functions of each unit are as described above.
  • the terminal device may include, but is not limited to, a processor 20 and a memory 21.
  • FIG. 5 is only an example of the terminal device 2 and does not constitute a limitation on the terminal device 2. It may include more or less components than those shown in the figure, or a combination of certain components, or different components.
  • the terminal device may also include input and output devices, network access devices, buses, and so on.
  • the so-called processor 20 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processors, etc.). Signal Processor, DSP), Application Specific Integrated Circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 21 may be an internal storage unit of the terminal device 2, for example, a hard disk or a memory of the terminal device 2.
  • the memory 21 may also be an external storage device of the terminal device 2, such as a plug-in hard disk equipped on the terminal device 2, a smart memory card (Smart Media Card, SMC), Secure Digital (SD) card, Flash Card, etc. Further, the memory 21 may also include both an internal storage unit of the terminal device 2 and an external storage device.
  • the memory 21 is used to store the computer program and other programs and data required by the terminal device.
  • the memory 21 can also be used to temporarily store data that has been output or will be output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请适用于大数据技术领域,提供了一种视频数据展示方法、装置、终端设备及存储介质,其中,通过采用gRPC通信框架,使得服务器与客户端之间无需考虑底层网络细节、网络异常情况和负载情况,提高了视频展示效率,通过接收gRPC视频请求指令,能有效的查询到目标视频源,进而保障了视频数据的获取,通过对视频数据进行视频解码,保障了对视频数据的结构化分析,通过以服务端数据流模式将视频结构化数据和视频数据发送至客户端,有效的保障了视频结构化数据和视频数据传输过程中数据完整性,进而提高了视频展示的准确性。

Description

一种视频数据展示方法、装置、终端设备及存储介质
本申请要求于2020年09月08日提交中国专利局、申请号为202010935388.X,发明名称为“视频数据展示方法、装置、终端设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及大数据技术领域,尤其涉及一种视频数据展示方法、装置、终端设备及存储介质。
背景技术
视频(如行人轨迹追踪、人脸识别、视频结构化等)展示系统基本都是客户端/服务端架构。服务端一般部署在集团机房中带有GPU(Graphic Processing Unit,图形处理器)显卡算法服务器上,客户端可部署在Windows展示/演示主机终端,无需GPU显卡,可同时支持多种展示终端。由机房中带有GPU显卡的服务器分析视频源获取视频结构化数据,然后服务器端将视频帧及视频结构化实时数据推送给客户端,由客户端展示实时视频及视频结构化数据。
技术问题
综上,发明人意识到,现有技术中,视频展示过程中的客户端与服务器之间的通信直接采用底层传输控制协议(TCP)或网际互连协议(IP)通信架构,使得需要了解很多传输控制协议或网际互连协议底层网络细节,需要考虑网络异常情况和负载情况,进而导致视频展示效率低下。
技术解决方案
本申请实施例提供了一种视频数据展示方法、装置、终端设备及存储介质,以解决现有技术在视频展示过程中,由于客户端与服务器之间的通信需要考虑网络异常情况和负载情况,所导致视频展示效率低下的问题。
本申请实施例的第一方面提供了一种视频数据展示方法,应用于任一服务器,所述服务器与客户端之间采用gRPC通信框架,包括:
接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
对所述视频帧进行结构化分析,得到视频结构化数据;
以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
本申请实施例的第二方面提供了一种视频数据展示装置,应用于任一服务器,所述服务器与客户端之间采用gRPC通信框架,包括:
视频源查询单元,用于接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
视频解码单元,用于获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
结构化分析单元,用于对所述视频帧进行结构化分析,得到视频结构化数据;
视频展示单元,用于以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
本申请实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
接收客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
对所述视频帧进行结构化分析,得到视频结构化数据;
以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
本申请实施例的第四方面提供了一种存储介质,所述存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
接收客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
对所述视频帧进行结构化分析,得到视频结构化数据;
以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
有益效果
本申请实施例与现有技术相比存在的有益效果是:通过采用gRPC通信框架,使得服务器与客户端之间无需考虑底层网络细节、网络异常情况和负载情况,提高了视频展示效率,通过接收gRPC视频请求指令,能有效的查询到目标视频源,进而保障了视频数据的获取,通过对视频数据进行视频解码,保障了对视频数据的结构化分析,通过以服务端数据流模式将视频结构化数据和视频数据发送至客户端,有效的保障了视频结构化数据和视频数据传输过程中数据完整性,进而提高了视频展示的准确性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种视频数据展示方法的实现流程图;
图2是本申请另一实施例提供的一种视频数据展示方法的实现流程图;
图3是本申请再一实施例提供的一种视频数据展示方法的实现流程图;
图4是本申请实施例提供的一种视频数据展示装置的结构框图;
图5是本申请实施例提供的一种终端设备的结构框图。
本发明的实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例所涉及的联邦学习模型训练方法,可以由控制设备或终端(以下称“移动终端”)执行。
请参阅图1,图1示出了本申请实施例提供的一种视频数据展示方法的实现流程图,该视频数据展示方法应用于任一服务器,服务器与客户端之间采用gRPC通信框架,该方法包括:
步骤S10,接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源。
其中,通过在服务器与客户端之间采用gRPC(remote procedure call 远程过程调用)通信框架,使得在服务器和客户端中对应设置server(服务器)模型和client(客户端)模型,基于server和client模型进行服务器与客户端之间的通信,gRPC通信框架可以根据需求定义接口文件,进而可以有效的管理接口约束条件,提高了服务器与客户端之间数据通信的稳定性,该gRPC通信框架可以基于protoc(协议)编译工具生成接口的依赖文件,例如,videostruct.pb.h依赖文件、videostruct.pb.cc依赖文件、videostruct.grpc.pb.h依赖文件或videostruct.grpc.pb.cc依赖文件等,且通过采用gRPC通信框架,使得服务端和客户端在数据交换时只需加入接口依赖后缀pb.h、pb.cc、grpc.pb.h、grpc.pb.cc文件,gRPC通信框架可以使得客户端像调用本地方法一样,调用远程的服务器提供的服务,可使客户端和服务器应用程序能够透明地进行通信,并使构建连接系统变得更加容易,基于server/client模型直接进行通信,服务器与客户端之间无需考虑底层网络细节、网络异常情况和负载情况,提高了视频展示效率。
具体的,该步骤中,若接收到任一客户端发送的gRPC视频请求指令,则判定该客户端上需要进行视频数据的展示,该gRPC视频请求指令中存储有视频源地址,该视频源地址用于指向对应的目标视频源。
可选的,该步骤中,该视频源可以为摄像机或任一具有视频拍摄和视频存储功能的设备,通过根据gRPC视频请求指令进行视频源查询得到目标视频源,有效的保障了后续视频数据获取的准确性。
步骤S20,获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧。
其中,可以根据预设获取规则对该目标视频源进行视频数据的获取,该预设获取规则可以根据需求进行设置,例如,该预设获取规则可以为获取预设时间范围内的视频数据、获取该目标视频源中存储的所有视频数据,或根据视频量阈值对该目标视频源进行视频数据的获取。
可选的,该步骤中,可以基于视频解码器对该视频数据进行解码,该视频解码器是指能够对视频数据进行压缩或者解压缩的程序或者设备,通过将视频数据输入该视频解码器进行解压缩,以得到该视频帧。
具体的,该视频解码器包括硬件解码器和软件解码器,该硬件解码器包括Opus解码器、Aac解码器、Ogg解码器、Speex解码器等,该软件解码器中设置有视频解码算法,该软件解码器用于根据该视频解码算法运行对应的解码程序,以达到对视频解码器解压缩的效果,得到对应的视频帧,该步骤中,通过对视频数据进行视频解码得到视频帧,有效的保障了后续对视频数据的结构化分析的操作。
步骤S30,对所述视频帧进行结构化分析,得到视频结构化数据。
其中,结构化分析是一种将视频帧内容中的重要信息进行结构化提取的技术,利用对视频帧内容按照语义关系,采用时空分割、特征提取、对象识别、深度学习等处理手段,组织成可供计算机和人理解的文本信息或可视化图形信息,以得到对应的视频结构化数据。
具体的,该步骤中,通过对采集视频帧中的行人特征信息、车辆特征信息、人群特征信息和行为特征信息,以得到该视频结构化数据,该行人特征信息包括行人的性别、年龄、是否使用手机、是否戴眼镜、是否戴帽子、下身服饰颜色、下身服饰、上身服饰颜色、上身服饰、上身服饰细分类、上身服饰纹理、身体朝向、是否带伞等信息中一种或多种的组合信息。
该车辆特征信息包括车辆的号牌号码、号牌颜色、号牌种类、车身颜色、车辆品牌、有无天窗、车内摆件、年检标、行李架等信息中一种或多种的组合信息。
该人群特征信息包括人群的密度、人群分布、人群运动方向、人群运动速度、人群异常等信息中一种或多种的组合信息,该行为特征信息包括群聚群散、逆向穿行、跌倒等信息中一种或多种的组合信息。
可选的,该步骤中,可以基于结构化分析模型对该视频帧进行视频结构化分析,以得到对应的视频结构化数据,该视频结构化数据中包括多个结构化子信息,该结构化子信息为该视频数据中对应视频帧的结构化结果,每个结构化子信息均包含对应视频帧中人员的标签、位置、轨迹跟踪、相关性别和服装姿态等属性信息。
步骤S40,以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
其中,当采用gRPC通信框架进行服务器与客户端之间的通信时,服务器与客户端之间具有四种不同的通信模式,分别为:单向数据流模式、服务端数据流模式、客户端数据流模式和双向数据流模式,该步骤中,该预设控制指令用于触发该客户端对视频结构化数据和视频数据的视频展示操作。
可选的,该步骤中,该预设控制指令中分别携带有视频结构化数据和视频数据的数据标识,基于该数据标识控制该客户端对对应的视频结构化数据和视频数据进行视频展示,进而提高了视频数据展示的准确性。
具体的,该单向数据流模式用于当服务器接收到客户端发送的gRPC视频请求指令,且该服务器针对该gRPC视频请求指令不进行响应;该服务端数据流模式用于当一个服务器与多个客户端进行通信,当服务器接收到任一客户端发送的gRPC视频请求指令,针对该gRPC视频请求指令进行目标视频源的查询、视频数据的获取、视频帧的结构化分析,并将视频结构化数据和视频数据作为指令响应发送至客户端。
该客户端数据流模式用于当服务器接收到不同客户端发送的gRPC视频请求指令,针对不同客户端发送的gRPC视频请求指令只进行一个响应回复,该客户端数据流模式应用于客户端主动流式给服务端推送数据的场景;该双向数据流模式用于服务端和客户均可主动推送数据,实现双向通信的效果。
可选的,本实施例中,所述接收所述客户端发送的gRPC视频请求指令之前,还包括:
查询预设接口文件,根据所述预设接口文件生成gRPC接口;
其中,该预设接口文件包括接口基本信息、请求参数信息和响应信息,该接口基本信息包括接口名称、接口URL(Uniform Resource Locator,资源定位符)、请求方法和描述信息,该请求参数信息包括请求头信息和请求体信息,该响应信息包括响应返回的数据类型;
将所述gRPC接口的接口URL发送至所述客户端。
具体的,该步骤中,通过将gRPC接口的接口URL发送至客户端,基于该gRPC接口有效保障了客户端向服务器发送的gRPC视频请求指令,服务器通过监听该gRPC接口的指令接收状态,以实时获取客户端向服务器发送的gRPC视频请求指令。
本实施例中,通过采用gRPC通信框架,使得服务器与客户端之间无需考虑底层网络细节、网络异常情况和负载情况,提高了视频展示效率,通过接收gRPC视频请求指令,能有效的查询到目标视频源,进而保障了视频数据的获取,通过对视频数据进行视频解码,保障了对视频数据的结构化分析,通过以服务端数据流模式将视频结构化数据和视频数据发送至客户端,有效的保障了视频结构化数据和视频数据传输过程中数据完整性,进而提高了视频展示的准确性。
请参阅图2,图2是本申请另一实施例提供的一种视频数据展示方法的实现流程图。相对于图1对应的实施例,本实施例提供的视频数据展示方法是对图1对应的实施例中步骤S20的进一步细化,包括:
步骤S21,对所述视频数据进行解封装,得到视频文件,并获取所述视频文件中的视频流。
其中,通过获取视频数据的包头信息,基于该包头信息中的包头标识查询对应的解封装程序,基于查询到的解封装程序对该视频数据进行解封装,得到对应的视频文件。
具体的,本实施例中预存储有解封装查询表,该解封装查询表中存储有不同包头标识与对应解封装程序之间的对应关系,因此,通过将该视频数据内包头信息中的包头标识与解封装查询表进行匹配,以得到对应的解封装程序,进而有效的保障了视频数据的解封装操作。
可选的,该步骤中,通过基于预设视频格式对该视频文件中的数据进行筛选,以得到对应的视频流,该预设视频格式可以根据需求进行设置,例如,该预设视频格式可以设置为MPEG、baiAVI、nAVI、ASF或MOV格式等。
步骤S22,查询所述视频文件中所述视频流的索引位置,并根据所述索引位置获取解码器上下文。
其中,可以通过遍历该视频流以查询该索引位置,或通过采用“av_find_best_stream”函数查询视频文件中视频流的索引位置,并基于所述索引位置查询对应的解码器上下文;
具体的,本实施例中预存储有上下文查询表,该上下文查询表中存储有不同索引位置与对应解码器上下文之间的对应关系,因此,通过将查询到的索引位置与该上下文查询表进行匹配,以得到对应的解码器上下文,该解码器上下文用于查询视频流对应的解码器。
步骤S23,根据所述解码器上下文查询解码器ID,并根据所述解码器ID获取解码器;
其中,通过查询该解码器上下文中预设标识位对应的信息,以得到该解码器ID(Identity document,身份标识号),该预设标识位可以根据需求进行设置,该步骤中的预设标识位为“codecID”标识对应的字符位置。
可选的,本实施例中预存储有解码器ID表,该解码器ID表中存储有不同解码器ID与对应解码器之间的对应关系,因此,通过将查询到的解码器ID与解码器ID表进行匹配,以获取对应的解码器。
步骤S24,运行获取到的所述解码器,并根据所述解码器对所述视频流进行解码,得到所述视频帧。
本实施例中,通过对视频数据进行解封装得到视频文件,并获取视频文件中的视频流,有效的保障了后续对视频数据的结构化分析的操作,提高了视频结构化数据的准确性,通过查询视频文件中视频流的索引位置,能有效的获取到对应的解码器上下文,基于解码器上下文的获取能有效的查询到该视频流对应的解码器,进而提高了视频流解码的准确性。
请参阅图3,图3是本申请另一实施例提供的一种视频数据展示方法的实现流程图。相对于图1对应的实施例,本实施例提供的视频数据展示方法是对图1对应的实施例中步骤S10的进一步细化,包括:
步骤S11,对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验;
其中,通过对gRPC视频请求指令中的gRPC请求消息头进行合法性校验,以判断该gRPC视频请求指令是否有效,若gRPC请求消息头合法性校验不合格,则判定该gRPC视频请求指令无效,针对该gRPC视频请求指令不进行响应。
可选的,本实施例中,所述对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验包括:
获取所述gRPC请求消息头的请求内容类型;
若所述请求内容类型不是预设内容类型,则判定所述gRPC请求消息头的合法性校验不合格;
若所述请求内容类型是所述预设内容类型,则判定所述gRPC请求消息头的合法性校验合格;
其中,获取该gRPC请求消息头中的“Content-Type”对应的信息,得到该请求内容类型,该预设内容类型可以根据需求进行设置,例如,该预设内容类型可以设置为application类型或grpc类型。
步骤S12,若所述gRPC请求消息头合法性校验合格,则获取所述gRPC视频请求指令中的gRPC请求消息体;
其中,该gRPC请求消息体中存储有gRPC视频请求指令中的指令信息,该指令信息用于表征该gRPC视频请求指令的指令需求。
步骤S13,对所述gRPC请求消息体进行解码,得到gRPC解码信息,并获取所述gRPC解码信息中的视频源地址;
其中,本实施例中预存储有消息体解码器,该消息体解码器用于对合法性校验合格的gRPC请求消息头对应的gRPC请求消息体进行解码,以得到对应的gRPC解码信息。
具体的,该步骤中,该gRPC解码信息中存储有客户端预设置的视频源地址,该视频源地址用于进行视频源的查询,即客户端需要对该视频源地址对应的视频源进行视频数据的获取。
步骤S14,根据所述视频源地址进行视频源查询,得到所述目标视频源。
可选的,本实施例中,所述以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端包括:
获取所述客户端的端口地址,并根据所述端口地址生成gRPC响应消息头;
对所述视频结构化数据和所述视频数据进行封装,并将封装后的所述视频结构化数据和所述视频数据设置为gRPC响应消息体;
根据所述gRPC响应消息头和gRPC响应消息体构建gRPC响应消息,并根据所述gRPC接口将所述gRPC响应消息发送至所述客户端;
其中,通过对视频结构化数据和视频数据进行封装,并将封装后的视频结构化数据和视频数据设置为gRPC响应消息体,有效的保障了视频结构化数据和视频数据的传输,通过根据gRPC响应消息头和gRPC响应消息体构建gRPC响应消息,并根据gRPC接口将gRPC响应消息发送至客户端,能基于gRPC通信框架有效的将视频结构化数据和视频数据发送至该客户端。
本实施例中,通过对gRPC视频请求指令中的gRPC请求消息头进行合法性校验,能有效的判断接收到的gRPC视频请求指令是否为有效指令,通过获取gRPC视频请求指令中的gRPC请求消息体,并对gRPC请求消息体进行解码,能有效的得到对应的gRPC解码信息和gRPC解码信息中携带的视频源地址,进而提高了目标视频源查询的准确性。
在本申请的所有实施例中,基于目标视频源得到视频数据、基于对视频帧的结构化分析得到视频结构化数据。将视频数据和视频结构化数据上传至区块链可保证其安全性和对用户的公正透明性。用户设备可以从区块链中下载得该视频数据和视频结构化数据,以便查证出视频数据和视频结构化数据是否被篡改。本示例所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
请参阅图4,图4是本申请实施例提供的一种视频数据展示装置100的结构框图。本实施例中该视频数据展示装置100包括的各单元用于执行图1至图3对应的实施例中的各步骤。具体请参阅图1至图3以及图1至图3所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图4,视频数据展示装置100应用于任一服务器,所述服务器与客户端之间采用gRPC通信框架,包括:视频源查询单元10、视频解码单元11、结构化分析单元12和视频展示单元13,其中:
视频源查询单元10,用于接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源。
其中,所述视频源查询单元10还用于:对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验;
若所述gRPC请求消息头合法性校验合格,则获取所述gRPC视频请求指令中的gRPC请求消息体;
对所述gRPC请求消息体进行解码,得到gRPC解码信息,并获取所述gRPC解码信息中的视频源地址;
根据所述视频源地址进行视频源查询,得到所述目标视频源。
可选的,所述视频源查询单元10还用于:获取所述gRPC请求消息头的请求内容类型;
若所述请求内容类型不是预设内容类型,则判定所述gRPC请求消息头的合法性校验不合格;
若所述请求内容类型是所述预设内容类型,则判定所述gRPC请求消息头的合法性校验合格。
视频解码单元11,用于获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧。
其中,所述视频解码单元11还用于:对所述视频数据进行解封装,得到视频文件,并获取所述视频文件中的视频流;
查询所述视频文件中所述视频流的索引位置,并根据所述索引位置获取解码器上下文;
根据所述解码器上下文查询解码器ID,并根据所述解码器ID获取解码器;
运行获取到的所述解码器,并根据所述解码器对所述视频流进行解码,得到所述视频帧。
结构化分析单元12,用于对所述视频帧进行结构化分析,得到视频结构化数据。
视频展示单元13,用于以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
其中,所述视频展示单元13还用于:获取所述客户端的端口地址,并根据所述端口地址生成gRPC响应消息头;
对所述视频结构化数据和所述视频数据进行封装,并将封装后的所述视频结构化数据和所述视频数据设置为gRPC响应消息体;
根据所述gRPC响应消息头和gRPC响应消息体构建gRPC响应消息,并根据所述gRPC接口将所述gRPC响应消息发送至所述客户端。
此外,所述视频数据展示装置100还包括:
接口设置单元14,用于查询预设接口文件,并根据所述预设接口文件生成gRPC接口,所述预设接口文件包括接口基本信息、请求参数信息和响应信息,所述接口基本信息包括接口名称、接口URL、请求方法和描述信息,所述请求参数信息包括请求头信息和请求体信息,所述响应信息包括响应返回的数据类型;
将所述gRPC接口的接口URL发送至所述客户端。
以上可以看出,通过采用gRPC通信框架,使得服务器与客户端之间无需考虑底层网络细节、网络异常情况和负载情况,提高了视频展示效率,通过接收gRPC视频请求指令,能有效的查询到目标视频源,进而保障了视频数据的获取,通过对视频数据进行视频解码,保障了对视频数据的结构化分析,通过以服务端数据流模式将视频结构化数据和视频数据发送至客户端,有效的保障了视频结构化数据和视频数据传输过程中数据完整性,进而提高了视频展示的准确性。
本实施例还提供一种存储介质,应用于任一服务器,所述服务器与客户端之间采用gRPC通信框架,所述存储介质存储有计算机程序,所述存储介质可以是非易失性,也可以是易失性,其中,所述计算机程序被处理器执行时实现如下步骤:
接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
对所述视频帧进行结构化分析,得到视频结构化数据;
以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
图5是本申请另一实施例提供的一种终端设备2的结构框图。如图5所示,该实施例的终端设备2包括:处理器20、存储器21以及存储在所述存储器21中并可在所述处理器20上运行的计算机程序22,例如视频数据展示方法的程序。处理器20执行所述计算机程序23时实现上述各个视频数据展示方法各实施例中的步骤,例如图1所示的S10至S40,或者图2所示的S21至S24,或者图3所示的S11至S14。或者,所述处理器20执行所述计算机程序22时实现上述图4对应的实施例中各单元的功能,例如,图4所示的单元10至13的功能,具体请参阅图5对应的实施例中的相关描述,此处不赘述。
示例性的,所述计算机程序22可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器21中,并由所述处理器20执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序22在所述终端设备2中的执行过程。例如,所述计算机程序22可以被分割成视频源查询单元10、视频解码单元11、结构化分析单元12和视频展示单元13和接口设置单元14,各单元具体功能如上所述。
所述终端设备可包括,但不仅限于,处理器20、存储器21。本领域技术人员可以理解,图5仅仅是终端设备2的示例,并不构成对终端设备2的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器20可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器21可以是所述终端设备2的内部存储单元,例如终端设备2的硬盘或内存。所述存储器21也可以是所述终端设备2的外部存储设备,例如所述终端设备2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器21还可以既包括所述终端设备2的内部存储单元也包括外部存储设备。所述存储器21用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器21还可以用于暂时地存储已经输出或者将要输出的数据。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种视频数据展示方法,应用于任一服务器,所述服务器与客户端之间采用gRPC通信框架,其中,包括:
    接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
    获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
    对所述视频帧进行结构化分析,得到视频结构化数据;
    以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
  2. 根据权利要求1所述的视频数据展示方法,其中,所述对所述视频数据进行视频解码,得到视频帧包括:
    对所述视频数据进行解封装,得到视频文件,并获取所述视频文件中的视频流;
    查询所述视频文件中所述视频流的索引位置,并根据所述索引位置获取解码器上下文;
    根据所述解码器上下文查询解码器ID,并根据所述解码器ID获取解码器;
    运行获取到的所述解码器,并根据所述解码器对所述视频流进行解码,得到所述视频帧。
  3. 根据权利要求1所述的视频数据展示方法,其中,所述接收所述客户端发送的gRPC视频请求指令之前,还包括:
    查询预设接口文件,并根据所述预设接口文件生成gRPC接口,所述预设接口文件包括接口基本信息、请求参数信息和响应信息,所述接口基本信息包括接口名称、接口URL、请求方法和描述信息,所述请求参数信息包括请求头信息和请求体信息,所述响应信息包括响应返回的数据类型;
    将所述gRPC接口的接口URL发送至所述客户端。
  4. 根据权利要求3所述的视频数据展示方法,其中,所述根据所述gRPC视频请求指令进行视频源查询,得到目标视频源包括:
    对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验;
    若所述gRPC请求消息头合法性校验合格,则获取所述gRPC视频请求指令中的gRPC请求消息体;
    对所述gRPC请求消息体进行解码,得到gRPC解码信息,并获取所述gRPC解码信息中的视频源地址;
    根据所述视频源地址进行视频源查询,得到所述目标视频源。
  5. 根据权利要求3所述的视频数据展示方法,其中,所述以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端包括:
    获取所述客户端的端口地址,并根据所述端口地址生成gRPC响应消息头;
    对所述视频结构化数据和所述视频数据进行封装,并将封装后的所述视频结构化数据和所述视频数据设置为gRPC响应消息体;
    根据所述gRPC响应消息头和gRPC响应消息体构建gRPC响应消息,并根据所述gRPC接口将所述gRPC响应消息发送至所述客户端。
  6. 根据权利要求4所述的视频数据展示方法,其中,所述对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验包括:
    获取所述gRPC请求消息头的请求内容类型;
    若所述请求内容类型不是预设内容类型,则判定所述gRPC请求消息头的合法性校验不合格;
    若所述请求内容类型是所述预设内容类型,则判定所述gRPC请求消息头的合法性校验合格。
  7. 根据权利要求1所述的视频数据展示方法,其中,所述方法还包括:
    将所述视频结构化数据和所述视频数据上传至区块链中。
  8. 一种视频数据展示装置,应用于任一服务器,所述服务器与客户端之间采用gRPC通信框架,其中,包括:
    视频源查询单元,用于接收所述客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
    视频解码单元,用于获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
    结构化分析单元,用于对所述视频帧进行结构化分析,得到视频结构化数据;
    视频展示单元,用于以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
  9. 根据权利要求8所述的视频数据展示装置,其中,所述视频解码单元还用于:
    对所述视频数据进行解封装,得到视频文件,并获取所述视频文件中的视频流;
    查询所述视频文件中所述视频流的索引位置,并根据所述索引位置获取解码器上下文;
    根据所述解码器上下文查询解码器ID,并根据所述解码器ID获取解码器;
    运行获取到的所述解码器,并根据所述解码器对所述视频流进行解码,得到所述视频帧。
  10. 根据权利要求8所述的视频数据展示装置,其中,所述视频数据展示装置还包括:
    接口设置单元,用于查询预设接口文件,并根据所述预设接口文件生成gRPC接口,所述预设接口文件包括接口基本信息、请求参数信息和响应信息,所述接口基本信息包括接口名称、接口URL、请求方法和描述信息,所述请求参数信息包括请求头信息和请求体信息,所述响应信息包括响应返回的数据类型;
    将所述gRPC接口的接口URL发送至所述客户端。
  11. 根据权利要求10所述的视频数据展示装置,其中,所述视频源查询单元还用于:
    对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验;
    若所述gRPC请求消息头合法性校验合格,则获取所述gRPC视频请求指令中的gRPC请求消息体;
    对所述gRPC请求消息体进行解码,得到gRPC解码信息,并获取所述gRPC解码信息中的视频源地址;
    根据所述视频源地址进行视频源查询,得到所述目标视频源。
  12. 根据权利要求10所述的视频数据展示装置,其中,所述视频展示单元还用于:
    获取所述客户端的端口地址,并根据所述端口地址生成gRPC响应消息头;
    对所述视频结构化数据和所述视频数据进行封装,并将封装后的所述视频结构化数据和所述视频数据设置为gRPC响应消息体;
    根据所述gRPC响应消息头和gRPC响应消息体构建gRPC响应消息,并根据所述gRPC接口将所述gRPC响应消息发送至所述客户端。
  13. 根据权利要求11所述的视频数据展示装置,其中,所述视频源查询单元还用于:
    获取所述gRPC请求消息头的请求内容类型;
    若所述请求内容类型不是预设内容类型,则判定所述gRPC请求消息头的合法性校验不合格;
    若所述请求内容类型是所述预设内容类型,则判定所述gRPC请求消息头的合法性校验合格。
  14. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
    接收客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
    获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
    对所述视频帧进行结构化分析,得到视频结构化数据;
    以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
  15. 一种存储介质,所述存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
    接收客户端发送的gRPC视频请求指令,并根据所述gRPC视频请求指令进行视频源查询,得到目标视频源;
    获取所述目标视频源的视频数据,并对所述视频数据进行视频解码,得到视频帧;
    对所述视频帧进行结构化分析,得到视频结构化数据;
    以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端,并根据预设控制指令指示所述客户端对所述视频结构化数据和所述视频数据进行视频展示。
  16. 如权利要求15所述的存储介质,其中,所述对所述视频数据进行视频解码,得到视频帧包括:
    对所述视频数据进行解封装,得到视频文件,并获取所述视频文件中的视频流;
    查询所述视频文件中所述视频流的索引位置,并根据所述索引位置获取解码器上下文;
    根据所述解码器上下文查询解码器ID,并根据所述解码器ID获取解码器;
    运行获取到的所述解码器,并根据所述解码器对所述视频流进行解码,得到所述视频帧。
  17. 如权利要求15所述的存储介质,其中,所述接收客户端发送的gRPC视频请求指令之前,还包括:
    查询预设接口文件,并根据所述预设接口文件生成gRPC接口,所述预设接口文件包括接口基本信息、请求参数信息和响应信息,所述接口基本信息包括接口名称、接口URL、请求方法和描述信息,所述请求参数信息包括请求头信息和请求体信息,所述响应信息包括响应返回的数据类型;
    将所述gRPC接口的接口URL发送至所述客户端。
  18. 如权利要求17所述的存储介质,其中,所述根据所述gRPC视频请求指令进行视频源查询,得到目标视频源包括:
    对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验;
    若所述gRPC请求消息头合法性校验合格,则获取所述gRPC视频请求指令中的gRPC请求消息体;
    对所述gRPC请求消息体进行解码,得到gRPC解码信息,并获取所述gRPC解码信息中的视频源地址;
    根据所述视频源地址进行视频源查询,得到所述目标视频源。
  19. 如权利要求17所述的存储介质,其中,所述以服务端数据流模式将所述视频结构化数据和所述视频数据发送至所述客户端包括:
    获取所述客户端的端口地址,并根据所述端口地址生成gRPC响应消息头;
    对所述视频结构化数据和所述视频数据进行封装,并将封装后的所述视频结构化数据和所述视频数据设置为gRPC响应消息体;
    根据所述gRPC响应消息头和gRPC响应消息体构建gRPC响应消息,并根据所述gRPC接口将所述gRPC响应消息发送至所述客户端。
  20. 如权利要求18所述的存储介质,其中,所述对所述gRPC视频请求指令中的gRPC请求消息头进行合法性校验包括:
    获取所述gRPC请求消息头的请求内容类型;
    若所述请求内容类型不是预设内容类型,则判定所述gRPC请求消息头的合法性校验不合格;
    若所述请求内容类型是所述预设内容类型,则判定所述gRPC请求消息头的合法性校验合格。
PCT/CN2020/135512 2020-09-08 2020-12-11 一种视频数据展示方法、装置、终端设备及存储介质 WO2021147556A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010935388.X 2020-09-08
CN202010935388.XA CN112040269B (zh) 2020-09-08 2020-09-08 视频数据展示方法、装置、终端设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021147556A1 true WO2021147556A1 (zh) 2021-07-29

Family

ID=73584979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135512 WO2021147556A1 (zh) 2020-09-08 2020-12-11 一种视频数据展示方法、装置、终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN112040269B (zh)
WO (1) WO2021147556A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697306A (zh) * 2022-02-24 2022-07-01 青岛海尔科技有限公司 一种http客户端和数据通信方法
CN116155516A (zh) * 2021-11-15 2023-05-23 拓尔思天行网安信息技术有限责任公司 视频传输系统、方法、设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040269B (zh) * 2020-09-08 2023-04-25 平安科技(深圳)有限公司 视频数据展示方法、装置、终端设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070220024A1 (en) * 2004-09-23 2007-09-20 Daniel Putterman Methods and apparatus for integrating disparate media formats in a networked media system
CN107809681A (zh) * 2017-10-19 2018-03-16 广东省南方数字电视无线传播有限公司 切片视频传输的方法及装置
CN108900898A (zh) * 2018-08-21 2018-11-27 北京深瞐科技有限公司 视频结构化方法、装置及系统
US10452868B1 (en) * 2019-02-04 2019-10-22 S2 Systems Corporation Web browser remoting using network vector rendering
CN111402120A (zh) * 2020-03-19 2020-07-10 北京远鉴信息技术有限公司 一种标注图像处理方法及装置
CN111629278A (zh) * 2020-05-22 2020-09-04 新石器慧通(北京)科技有限公司 图像传输方法、装置、可移动平台、服务器及存储介质
CN112040269A (zh) * 2020-09-08 2020-12-04 平安科技(深圳)有限公司 视频数据展示方法、装置、终端设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262669B (zh) * 2004-06-23 2011-07-20 华为技术有限公司 一种移动终端内存储的资料信息的安全保障方法
CN101150707B (zh) * 2006-09-19 2010-09-29 中兴通讯股份有限公司 一种实现移动多媒体广播安全的方法
CN101540755B (zh) * 2008-03-18 2013-03-13 华为技术有限公司 一种修复数据的方法、系统和装置
CN105376585B (zh) * 2015-11-04 2018-11-06 四川大学华西医院 一种帧图像组合提高视频传输速度的方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070220024A1 (en) * 2004-09-23 2007-09-20 Daniel Putterman Methods and apparatus for integrating disparate media formats in a networked media system
CN107809681A (zh) * 2017-10-19 2018-03-16 广东省南方数字电视无线传播有限公司 切片视频传输的方法及装置
CN108900898A (zh) * 2018-08-21 2018-11-27 北京深瞐科技有限公司 视频结构化方法、装置及系统
US10452868B1 (en) * 2019-02-04 2019-10-22 S2 Systems Corporation Web browser remoting using network vector rendering
CN111402120A (zh) * 2020-03-19 2020-07-10 北京远鉴信息技术有限公司 一种标注图像处理方法及装置
CN111629278A (zh) * 2020-05-22 2020-09-04 新石器慧通(北京)科技有限公司 图像传输方法、装置、可移动平台、服务器及存储介质
CN112040269A (zh) * 2020-09-08 2020-12-04 平安科技(深圳)有限公司 视频数据展示方法、装置、终端设备及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116155516A (zh) * 2021-11-15 2023-05-23 拓尔思天行网安信息技术有限责任公司 视频传输系统、方法、设备及存储介质
CN116155516B (zh) * 2021-11-15 2023-12-26 拓尔思天行网安信息技术有限责任公司 视频传输系统、方法、设备及存储介质
CN114697306A (zh) * 2022-02-24 2022-07-01 青岛海尔科技有限公司 一种http客户端和数据通信方法
CN114697306B (zh) * 2022-02-24 2024-03-22 青岛海尔科技有限公司 一种http客户端和数据通信方法

Also Published As

Publication number Publication date
CN112040269A (zh) 2020-12-04
CN112040269B (zh) 2023-04-25

Similar Documents

Publication Publication Date Title
US10885713B2 (en) Method, apparatus, and system for generating an AR application and rendering an AR instance
WO2021147556A1 (zh) 一种视频数据展示方法、装置、终端设备及存储介质
TWI387933B (zh) 用於安全模組間通訊機制之方法及裝置
WO2022037343A1 (zh) 一种视频信息处理方法、装置、电子设备及存储介质
CN112104892B (zh) 一种多媒体信息处理方法、装置、电子设备及存储介质
CN107390994B (zh) 界面呈现方法和装置
US20170155937A1 (en) Method and apparatus for transmitting video data
US10165058B2 (en) Dynamic local function binding apparatus and method
WO2015062205A1 (zh) 教学方法及系统
WO2021164620A1 (zh) 运动数据处理方法、装置、设备和存储介质
CN111026982A (zh) 智能合约处理方法、计算机设备及存储介质
CN112791399B (zh) 云游戏画面的显示方法及装置、系统、介质、电子设备
US11546317B2 (en) Systems and methods for providing services
WO2017080167A1 (zh) 第三方视频推送方法和系统
CN111327921A (zh) 视频数据处理方法及设备
WO2020034981A1 (zh) 编码信息的生成方法和识别方法
US20160269446A1 (en) Template representation of security resources
CN112150030A (zh) 基于多单位多身份的账号管理方法、终端设备及存储介质
CN107517188A (zh) 一种基于安卓系统的数据处理方法和装置
US10231004B2 (en) Network recording service
US10506272B1 (en) Parameterizable encoding profiles
CN114666408A (zh) 基于互联网的行情因子数据透传方法、装置、设备及介质
CN110189388B (zh) 动画检测方法、可读存储介质及计算机设备
CN113254123A (zh) 云桌面场景的识别方法和装置、存储介质及电子装置
US20170171331A1 (en) Method and electronic device for pushing videos between different clients

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20915829

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20915829

Country of ref document: EP

Kind code of ref document: A1