A streaming media data distribution method and system
Through the division of labor between the streaming media server and the storage server, the problems of low efficiency and poor reliability of streaming media data distribution caused by insufficient load on the management server are solved, and efficient and reliable large-scale streaming media data distribution is achieved.
Patent Information
- Application Number
- CN202210473515.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-04-29
AI Technical Summary
In the prior art, the management server lacks load capacity during the distribution of streaming media data, resulting in low efficiency and poor reliability of large-scale streaming media data distribution, and prone to data loss problems.
By introducing the division of labor between the streaming media server and the storage server, the streaming media server is responsible for processing the client's streaming media data requests, the storage server is responsible for storing and allocating the original streaming media data code stream of the image acquisition device, and sending the target code stream to the streaming media server. , the streaming media server processes the code stream and sends play address information, and the client obtains the processed code stream based on the play address.
It effectively reduces the load pressure of a single server, improves the efficiency and reliability of streaming media data distribution, and ensures the stable distribution of large streaming media data.
Smart Images

Figure CN114945018B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of streaming media, and in particular to a streaming media data distribution method and system. Background Art
[0002] Streaming media technology is a technology that streams media data such as audio data and video data. Usually, a monitoring platform provides live or on-demand streaming media data to the client.
[0003] In the related streaming media data distribution technology, the NVR (Network Video Recorder) receives and stores the streaming media data code stream collected by the camera, and forwards the streaming media collected by the camera to the monitoring platform through the IP network, so that the client can obtain the streaming media data from the monitoring platform. Due to the limited processing resources and storage resources of the NVR network video recorder, the streaming media data distribution technology based on the NVR network video recorder is not suitable for the distribution of large streaming media data.
[0004] Based on this, the related technology uses a management server to receive the streaming media data code stream collected by the camera, and the management server forwards the received streaming media data code stream to the central computer room through the IP network, and allocates storage space for the streaming media data code stream. The central computer room stores the streaming media data code stream according to the storage space allocated by the management server. When the streaming media data code stream needs to be distributed, the management server forwards the streaming media data code stream stored in the central computer room to the monitoring platform, so that the client can obtain the streaming media data from the monitoring platform. In this way, it can be applied to the storage and distribution of large-scale streaming media data.
[0005] However, the streaming media data distribution technology based on the management server requires that the management server respond to the client's live broadcast and on-demand streaming media data read requests, and respond to the camera's streaming media data write storage requests, which places high requirements on the management server's load capacity. If the amount of streaming media data to be distributed is large, the limited resources of a single management server will directly affect the streaming media data distribution efficiency. Alternatively, the interruption of the management server network connection or the failure of the management server can easily lead to the loss of streaming media data, affecting the reliability of streaming media data distribution. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide a streaming media data distribution method and system to improve the streaming media data distribution efficiency and reliability. The specific technical solution is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a method for distributing streaming media data, the method comprising:
[0008] The streaming media server receives a first streaming media data request instruction sent by the monitoring platform; wherein the first streaming media data request instruction is an instruction message generated by the monitoring platform in response to the streaming media data request of the client;
[0009] The streaming media server sends a second streaming media data request instruction to the storage server according to the first streaming media data request instruction; wherein the original streaming media data code stream requested by the first streaming media data request instruction and the second streaming media data request instruction are the same;
[0010] The storage server obtains the original streaming media data code stream requested by the second streaming media data request instruction from the disk array as the target code stream; wherein the disk array is used to store the original streaming media data code stream collected by the image acquisition device under the management of the storage server;
[0011] The storage server sends the target code stream to the streaming media server;
[0012] The streaming media server processes the target code stream and sends the playback address information to the monitoring platform, so that the monitoring platform sends the playback address information to the client, so that the client obtains the processed target code stream according to the playback address information.
[0013] In combination with the first aspect, in a second possible embodiment, the method further includes:
[0014] The storage server allocates a communication address and a disk storage address for the original streaming media data code stream sent by the image acquisition device;
[0015] The storage server stores the original streaming media data code stream in the target disk in the disk array; wherein the communication address of the target disk is the same as the communication address of the recipient assigned by the storage server, and the storage address of the target disk is the same as the disk storage address.
[0016] In combination with the first aspect, in a third possible embodiment, the first streaming media data request instruction carries a streaming media data channel number, and the streaming media server sends a second streaming media data request instruction to the storage server according to the first streaming media data request instruction, including:
[0017] The streaming media server generates a second streaming media data request instruction carrying the streaming media data channel number according to the streaming media data channel number, and sends the second streaming media data request instruction to the storage server;
[0018] The storage server obtains the original streaming media data code stream requested by the second streaming media data request instruction from the disk array, including: the storage server obtains the original streaming media data code stream corresponding to the streaming media data channel number from the disk array.
[0019] In combination with the first aspect, in a third possible embodiment, the streaming media server processes the target code stream and sends the playback address information to the monitoring platform, including:
[0020] The streaming media server converts the format of the target code stream into a preset streaming media data format, and obtains the transcoded streaming media data code stream;
[0021] The streaming media server generates playback address information for obtaining the transcoded streaming media data stream according to the transcoded streaming media data stream.
[0022] In combination with the first aspect, in a fourth possible embodiment, the monitoring platform includes an intelligent processing module; and the method further includes:
[0023] The storage server obtains the target code stream from the disk array according to the third streaming media data request instruction sent by the intelligent processing module;
[0024] The storage server sends the target code stream to the intelligent processing module;
[0025] The intelligent processing module performs intelligent analysis on the target code stream to obtain an intelligent analysis result.
[0026] In combination with the fourth possible embodiment of the first aspect, in a fifth possible embodiment, the method further includes:
[0027] The intelligent processing module sends the intelligent analysis result to the streaming media server;
[0028] The streaming media server transcodes the intelligent analysis result to generate a transcoded intelligent analysis result;
[0029] The streaming media server uploads the transcoded intelligent analysis result to the target object storage device;
[0030] The target object storage device generates a sharing link according to the transcoded intelligent analysis result;
[0031] The target object storage device sends the shared link to the streaming media server;
[0032] The streaming media server forwards the shared link to the monitoring platform, so that the client obtains the transcoded intelligent analysis result according to the shared link.
[0033] In a second aspect, an embodiment of the present invention provides a streaming media data distribution system, the system comprising: a streaming media server, a storage server, a disk array, and a monitoring platform;
[0034] The streaming media server is configured to receive a first streaming media data request instruction sent by the monitoring platform; wherein the first streaming media data request instruction is an instruction message generated by the monitoring platform in response to a streaming media data request from a client; and according to the first streaming media data request instruction, send a second streaming media data request instruction to the storage server; wherein the original streaming media data code stream requested by the first streaming media data request instruction and the second streaming media data request instruction are the same;
[0035] The storage server is used to obtain the original streaming media data code stream requested by the second streaming media data request instruction from the disk array as a target code stream; and send the target code stream to the streaming media server;
[0036] The disk array is used to store the original streaming media data code stream collected by the image acquisition device under the management of the storage server;
[0037] The streaming media server is further used to process the target code stream and send the playback address information to the monitoring platform, so that the monitoring platform sends the playback address information to the client, so that the client obtains the processed target code stream according to the playback address information.
[0038] In conjunction with the second aspect, in a first possible embodiment, the storage server is further used to:
[0039] Assign a communication address and a disk storage address to the original streaming media data code stream sent by the image acquisition device; store the original streaming media data code stream in a target disk in the disk array; wherein, the communication address of the target disk is the same as the communication address of the recipient assigned by the storage server, and the storage address of the target disk is the same as the disk storage address.
[0040] In combination with the second aspect, in a second possible embodiment, the first streaming media data request instruction carries a streaming media data channel number;
[0041] The streaming media server is further configured to generate a second streaming media data request instruction carrying the streaming media data channel number according to the streaming media data channel number, and send the second streaming media data request instruction to the storage server;
[0042] The storage server is further used to obtain the original streaming media data code stream corresponding to the streaming media data channel number from the disk array.
[0043] In combination with the second aspect, in a third possible embodiment, the streaming media server is further used for:
[0044] Convert the target code stream into a preset streaming media data format to obtain a transcoded streaming media data code stream;
[0045] According to the transcoded streaming media data code stream, playback address information for obtaining the transcoded streaming media data code stream is generated.
[0046] In combination with the second aspect, in a fourth possible embodiment, the monitoring platform includes an intelligent processing module;
[0047] The storage server is further used to obtain a target code stream from the disk array according to a third streaming media data request instruction sent by the intelligent processing module; and send the target code stream to the intelligent processing module;
[0048] The intelligent processing module is used to perform intelligent analysis on the target code stream to obtain intelligent analysis results.
[0049] In combination with the fourth possible embodiment of the second aspect, in a fifth possible embodiment, the system further includes a target object storage device;
[0050] The intelligent processing module is also used to send the intelligent analysis result to the streaming media server;
[0051] The streaming media server is further used to transcode the intelligent analysis result to generate a transcoded intelligent analysis result; and upload the transcoded intelligent analysis result to the target object storage device;
[0052] The target object storage device is used to generate a shared link according to the intelligent analysis result after the transcoding; and send the shared link to the streaming media server;
[0053] The streaming media server is further used to forward the shared link to the monitoring platform, so that the client can obtain the transcoded intelligent analysis result according to the shared link. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0055] Figure 1 A schematic diagram of a streaming media data distribution method according to an embodiment of the present invention;
[0056] Figure 2 A structural diagram of a streaming media data distribution system according to an embodiment of the present invention;
[0057] Figure 3 A schematic diagram of a possible application scenario of the streaming media data distribution method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on the present invention belong to the scope of protection of the present invention.
[0059] In the related art, the streaming media distribution technology based on NVR network video recorders is not suitable for the distribution of large streaming media data due to the limitations of the processing resources and storage resources of NVR network video recorders. Therefore, the related art proposes to use a management server in combination with a central computer room, where the management server responds to the client's live broadcast and on-demand streaming media data reading request, distributes streaming media data to the client, and responds to the writing request of the streaming media data collected by the camera, and stores the streaming media data collected by the camera. However, if the amount of streaming media data to be distributed is large, the limited processing resources and load capacity of a single management server will directly affect the distribution efficiency and reliability of the streaming media data.
[0060] In view of this, an embodiment of the present invention provides a streaming media data distribution method, see Figure 1 , the method comprising:
[0061] S110: The streaming media server receives a first streaming media data request instruction sent by the monitoring platform, wherein the first streaming media data request instruction is an instruction message generated by the monitoring platform in response to the streaming media data request of the client.
[0062] S120: The streaming media server sends a second streaming media data request instruction to the storage server according to the first streaming media data request instruction, wherein the original streaming media data code stream requested by the first streaming media data request instruction and the second streaming media data request instruction are the same.
[0063] S130, the storage server obtains the original streaming media data code stream requested by the second streaming media data request instruction from the disk array as the target code stream. The disk array is used to store the original streaming media data code stream collected by the image acquisition device under the management of the storage server.
[0064] S140: The storage server sends the target code stream to the streaming media server.
[0065] S150: The streaming media server processes the target bitstream and sends the playback address information to the monitoring platform. The monitoring platform sends the playback address information to the client, so that the client obtains the processed target bitstream according to the playback address information.
[0066] In the embodiment of the present invention, in response to the streaming media data request of the client, the streaming media server is responsible for processing the streaming media data requested by the client, and the storage server is responsible for receiving the original streaming media data collected by the image acquisition device and storing the original streaming media data in the disk array. Because the streaming media server and the storage server have different divisions of labor and cooperate with each other, the pressure of a large amount of streaming media data on the load capacity of a single server can be effectively reduced, and the impact of a single server processing resource on the streaming media data distribution efficiency can be reduced, effectively improving the streaming media data distribution efficiency and reliability.
[0067] In S110, the streaming data request may carry the streaming data type, streaming data format, streaming data channel number, streaming data processing method and other related information representing the streaming data required by the client. When the client has a streaming data demand, the client sends a streaming data request to the monitoring platform to inform the monitoring platform of the related information of the streaming data required by the client, so that the monitoring platform can distribute the requested streaming data to the client according to the streaming data request.
[0068] For example, when a client needs to play a live video of a certain channel, the client sends a streaming media data request to the monitoring platform to request the monitoring platform to distribute streaming media data to it. The streaming media data request may include: the requested streaming media data type is real-time streaming media data, the requested real-time streaming media data format, the requested real-time streaming data operation mode is pull streaming / push streaming, etc.
[0069] Alternatively, when the client needs to play the on-demand picture of a certain channel, the client sends a streaming media data request to the monitoring platform. The streaming media data request may include: the requested streaming media data type is historical streaming media data, the start and end time of the requested historical streaming media data, the channel number of the requested historical streaming media data, the operation mode of the historical streaming media data is pull streaming / push streaming, etc.
[0070] The monitoring platform can generate a first streaming media data request instruction according to the content carried by the streaming media data request, and send the first streaming media data request instruction to the streaming media server to notify the streaming media server of the relevant information of the streaming media data requested by the client. The first streaming media data request instruction can be transmitted according to a preset transmission mode or protocol. For example, the first streaming media data request can be transmitted using the Hyper Text Transfer Protocol (HTTP) or the Small Computer System Interface (SCSI-3), or other transmission protocols that can be used to send messages. Those skilled in the art can adjust the transmission mode or transmission protocol according to actual needs, and the embodiments of the present invention do not specifically limit it.
[0071] In S120, after receiving the first streaming media data request instruction from the monitoring platform, the streaming media server can parse out the data type, channel number, data format and other related information of the streaming media data required by the client from the first streaming media data request instruction. The streaming media server will generate a second streaming media data request instruction based on the relevant information of the streaming media data obtained by the parsing, and send the second streaming media data request instruction to the storage server to inform the storage server of the specific requirements of the client for the streaming media data, so as to facilitate the subsequent streaming media server to obtain the streaming media data requested by the client from the storage server. In the embodiment of the present invention, the transmission protocols used by the first streaming media data request instruction and the second streaming media data request instruction are different, but the requested original streaming media data code streams are the same, both of which are the original streaming media data code streams corresponding to the streaming media data requested by the client.
[0072] In S130, the storage server is used to manage the disk array (Redundant Arrays of Independent Disks, RAID). Exemplarily, the storage server divides the disk array. For example, the storage server can plan the disk array according to the total amount of data of the original streaming media data stream. In an embodiment of the present invention, the disk array is used to store the original streaming media data stream. The disk array supports multiple RAID levels, such as RAID 0, RAID 1, RAID 0+1, RAID3 and other levels. The specific level can be set according to actual needs, and the present invention does not make specific limitations.
[0073] In an embodiment of the present invention, the storage capacity required by all image acquisition devices can be calculated in advance, combined with the required number of storage management disks and the required number of backup disks, to determine the number of disks required and the division method of the disk array. For example, assuming that the resolution of the video captured by one image acquisition device is 1080P, the codec format is H.264 format, and 51.2G of storage space is required per day, assuming that there are a total of 100 image acquisition devices, and a total of 5120G of storage space is required per day, and the storage space of a disk in the disk array is 512G, then the number of storage disks required per day is 10. Assuming that the number of backup disks is 2 and the number of storage management disks is 1, the number of disks required per day is approximately 13. It can be calculated that the number of disks required for the disk array per day is 13, of which 10 disks are primary storage disks, 2 are backup disks, and 1 is a storage management disk. Among them:
[0074] Backup disks are used to protect data security. When a disk in a disk array fails, the backup disk will immediately start working to take over the failed disk for data storage, which can protect data to the greatest extent and reduce data loss.
[0075] In an embodiment of the present invention, the storage server is also used to manage each image acquisition device connected to the storage server. Exemplarily, the storage server records the attribute information of each image acquisition device, such as the device number of each image acquisition device, the channel number of each original streaming media data stream generated by each image acquisition device, etc. The storage server is also used to allocate a storage address for each original streaming media data stream according to the channel number of the recorded original streaming media data stream.
[0076] The storage device stores metadata generated when storing the original data code stream data in the storage management disk. The metadata is the attribute information of the stored streaming media data code stream, and the metadata may include the storage path assigned by the storage server to each original streaming media data code stream, the name and size of each stored original streaming media data code stream, and the channel number of each original streaming media data code stream.
[0077] Based on this, the stored original streaming media data code stream can be obtained from the disk array according to the metadata. For example, the recorded content of the metadata is indexed, the storage path corresponding to the original streaming media data code stream of the channel number is determined, and the original streaming media data code stream of the channel number is obtained from the storage path as the target code stream.
[0078] In S140, the storage server may send the acquired target bitstream to the streaming media server by means of push streaming, or after acquiring the target bitstream, the storage server may send a notification message to the streaming media server to inform the streaming media server to acquire the target bitstream from the storage server by means of pull streaming.
[0079] In S150, after receiving the target code stream, the streaming media server may transcode the original streaming media data code stream, and then generate playback address information according to the transcoded streaming media data, and send the playback address information to the monitoring platform, so that the monitoring platform sends the playback address to the client, and finally the client obtains the required streaming media data according to the playback address.
[0080] On the basis of the above step S130, the streaming media data distribution method provided by the embodiment of the present invention may further include the following steps:
[0081] The storage server allocates a communication address and a disk storage address to the original streaming media data code stream sent by the image acquisition device; and stores the original streaming media data code stream sent by the image acquisition device in a target disk in the disk array.
[0082] When the image acquisition device is connected and generates the original streaming media data stream, the storage server needs to allocate communication address information and disk storage address for the original streaming media data stream acquired by the image acquisition device, so that the image acquisition device can establish a communication connection with the disk in the disk array according to the provided communication address information. Among them, the communication address information includes: the communication address and port of the two communicating parties. When the image acquisition device sends the original streaming media data stream to the target disk, the image acquisition device is the communication sender and the target disk is the communication receiver. The disk storage address is the storage path in the target disk for storing the original streaming media data stream. For example, the disk storage address of the first target disk is D: storage / , which means that the space under the path "D: storage / " of the D disk of the first target disk is used to store the original streaming media data stream.
[0083] Exemplarily, the storage server records the communication address port mapping table between each image acquisition device and each disk in the disk array, and the storage server can allocate a disk for storing the original streaming media data code stream collected by the image acquisition device according to the communication address port mapping table. In a possible embodiment, the storage server records the RTSP communication address port mapping table between each image acquisition device and each disk in the disk array, and the storage server allocates RTSP communication address information and port information to the newly connected image acquisition device by searching the RTSP communication address port mapping table. The storage server can allocate a target disk to the newly connected image acquisition device according to the storage space margin of each disk in the disk array, and inform the allocated target disk of the RTSP communication address information and port information of the newly connected image acquisition device. At the same time, the storage server informs the newly connected image acquisition device of the storage address of the allocated target disk for storing the original streaming media data code stream. So that the allocated target disk can establish a communication connection with the image acquisition device according to the RTSP communication address information and port information, so as to realize the storage of the original streaming media data code stream collected by the image acquisition device in the storage space corresponding to the disk storage address information. That is, the communication address of the target disk is the same as the communication address of the recipient assigned by the storage server, and the storage address of the target disk is the same as the disk storage address assigned by the storage server.
[0084] By adopting the embodiment of the present invention, a communication connection can be established between each image acquisition device and each disk in the disk array. When the image acquisition device generates the original streaming media data code stream, the original streaming media data code stream is directly stored in each disk in the disk array according to the communication address and disk storage address assigned by the storage server. The storage server is responsible for managing the storage and does not participate in the actual storage of the original streaming media data code stream, so that the storage server can have sufficient processing resources to manage the storage of the original streaming media data code stream, which can effectively ensure the storage reliability of the original streaming media data code stream.
[0085] In an embodiment provided by the present invention, a first streaming media request instruction carries a streaming media data channel number. After the streaming media server can parse the streaming media data channel number carried in the first streaming media request instruction, it generates a second streaming media data request instruction carrying the streaming media data channel number according to the streaming media data channel number, and sends the second streaming media data request instruction to a storage server to inform the storage server of the streaming media data channel number of the streaming media data requested by the client. The second streaming media data request instruction can be transmitted using a transmission protocol different from that used by the first streaming media data request instruction. For example, the second streaming media data request instruction is transmitted using the Real Time Streaming Protocol (RTSP), and the channel number corresponding to the streaming media data requested by the client can be sent to the storage service in real time.
[0086] Since the storage server records the attribute information and communication address of each original streaming media data stream, as well as the mapping relationship between the communication address and disk storage address information of each disk in the disk array storing each original streaming media data stream, wherein the attribute information of each original streaming media data stream includes the channel number of the original streaming media data stream, after receiving the second streaming media data request instruction sent by the streaming media server, the storage server can determine the specific position of the original streaming media data stream with the same channel number as the streaming media data channel number in the disk array after querying the recorded mapping relationship according to the streaming media data channel number carried by the second streaming media data request instruction, and then read the target original streaming media data stream according to the specific position.
[0087] By adopting the embodiment of the present invention, the storage server can obtain the channel number of the streaming data requested by the client in real time according to the second streaming data request instruction sent by the streaming server, and then determine the original streaming data code stream with the same channel number as the channel number requested by the client from the disk array according to the channel number as the target code stream.
[0088] Since the decoders of different clients are different, the streaming media data formats that can be supported for decoding are also different. In a possible embodiment provided by the present invention, after the streaming media server obtains the target streaming media data code stream sent by the storage server, it is necessary to convert the format of the target code stream into a preset streaming media data format. Exemplarily, the target code stream can be transcoded according to the decoding streaming media data format supported by the client. Exemplarily, the streaming media server receives a first streaming media data request instruction sent from the monitoring platform, which will carry the streaming media data format, which is used to inform the streaming media server to transcode according to the carried streaming media data format. For example, the streaming media data format information carried in the first streaming media data request instruction indicates that the format of the streaming media data requested by the client should be FLV (FLASHVIDEO, a streaming media data format), then the streaming media server converts the target code stream into FLV format, and obtains FLV streaming media data.
[0089] In order to facilitate the client to simply and quickly receive the requested streaming media data, in the embodiment provided by the present invention, the streaming media server generates playback address information for the transcoded streaming media data code stream, such as live broadcast address information and on-demand address information. The streaming media server sends the generated playback address information to the monitoring platform, and the monitoring platform then sends the playback address information to the client, and the client can directly access the playback address information to obtain the transcoded streaming media data.
[0090] In the embodiment of the present invention, the number of streaming media servers can be one or more. If the number of streaming media servers is two or more, in order to improve the streaming media server's ability to process large streaming media data, in the embodiment of the present invention, a distributed deployment solution with load balancing can be adopted to manage each streaming media server. Specifically, when the current streaming media server receives a streaming media data task to be processed, it will give priority to judging its current load. If its current load exceeds a preset load threshold, it can be determined that the current load is too high, and the streaming media data task to be processed needs to be forwarded to other streaming media servers through load balancing.
[0091] Specifically, a database can be set up for all streaming media servers, and the database can be used to record the management data generated by each streaming media server during operation, such as the processing resource usage of each streaming media server, the storage resource usage of each streaming media server, the thread usage of each streaming media server, and the number of streaming media data request instructions received by each streaming media server, etc. The streaming media server can determine whether its own load condition is overloaded based on the management data recorded in the database.
[0092] There is a possible situation that when a large number of clients or network terminals are accessing a certain streaming media, it is easy to cause the streaming media server load to be unable to cope with the access requests with greater pressure. At this time, in order to ensure that the streaming media server does not have a low streaming media data distribution efficiency due to excessive access pressure, the embodiment of the present invention sets a neighbor balance list for each streaming media server to record the load occupancy of each streaming media server. The neighbor balance list can be set in a database or inside the streaming media server.
[0093] If the current load of a streaming media server exceeds the preset load threshold, the streaming media server can determine the streaming media server with the smallest load in the same local area network or in the same physical space as the target streaming media server according to the neighbor balancing list, and the streaming media server with the largest load forwards the streaming media data task to be processed to the target streaming media server through the task forwarding instruction, so that the target streaming media server with the smallest load can process the streaming media data task to be processed. The task forwarding instruction can be:
[0094] [Task, IP, Conns (Push, Pull, Play)], where Task is the task information of the streaming media data to be processed, such as the live streaming media data to be processed. IP is the communication address of the target streaming media server. Conns () is the load information of the streaming media data task to be processed. Push means push, Pull means pull, and Play means play (including live and on-demand).
[0095] By adopting the embodiment of the present invention, since the client can directly access the streaming media server according to the playback address to obtain the requested streaming media data, the monitoring platform only needs to forward the playback address information, and the amount of data required to be forwarded is relatively small, which can effectively save the processing resources of the monitoring platform and save the communication bandwidth between the monitoring platform and the streaming media server and the client.
[0096] In the streaming media data distribution method provided by the present invention, the monitoring platform includes an intelligent processing module, which is used to perform intelligent analysis on the original streaming media data code stream to obtain an intelligent analysis result. The intelligent processing module can be a chip with intelligent analysis capability, or a hardware module composed of components with intelligent analysis capability, which is not specifically limited by the present invention.
[0097] In the embodiment of the present invention, the intelligent analysis may be face recognition, vehicle recognition, safety warning recognition, etc., and the obtained intelligent information results may carry one or more marking information. For example, after the intelligent processing module performs face recognition, vehicle recognition, and safety warning recognition on the original streaming media data code stream, the obtained streaming media data code stream may carry one or more marking information such as face mark, vehicle mark, and safety warning mark.
[0098] The streaming media data request sent by the client to the monitoring platform can also be used to indicate that the streaming media data required by the client is the streaming media data stream after intelligent analysis. The streaming media data request may include: the requested streaming media data type is intelligent analysis streaming media data, the requested intelligent analysis streaming media data format, the requested intelligent analysis streaming media data channel number, the intelligent analysis streaming media data operation mode is pull stream / push stream, etc.
[0099] The intelligent processing module generates a third streaming data request instruction according to the streaming data request, and sends the third streaming data request instruction to the storage server to notify the storage server of the relevant information of the streaming data requested by the client. The third streaming data request instruction can be transmitted using the RTSP (Real Time Streaming Protocol) real-time transmission protocol to send the relevant information of the streaming data requested by the client to the storage service in real time.
[0100] After receiving the third streaming media data request instruction sent by the intelligent processing module, the storage server can obtain the target code stream from the disk according to the content carried in the third streaming media data request instruction. The specific method of obtaining the target code stream is the same as the method of obtaining the target code stream in the above step S130, which will not be repeated here.
[0101] The storage server can send the acquired target bitstream to the intelligent processing module by means of push streaming. Alternatively, after acquiring the target bitstream, the storage server sends a notification message to the intelligent processing module to inform the intelligent processing module to acquire the target bitstream from the storage server by means of pull streaming.
[0102] The intelligent processing module performs intelligent analysis such as voice recognition, face recognition, and vehicle recognition on the received target code stream to obtain a streaming media data stream carrying one or more tags. The intelligent analysis streaming media data stream carrying the tags is the intelligent analysis result generated by the intelligent processing module.
[0103] By adopting the embodiment of the present invention, for streaming media data that needs to be intelligently analyzed, the intelligent processing module can directly obtain the target code stream from the storage server through the third streaming media data request instruction, and there is no need to obtain the target code stream through the streaming media server. In addition, the streaming media server does not need to allocate additional resources to perform intelligent analysis on the streaming media data, which can effectively reduce the overhead of the streaming media server.
[0104] In an embodiment of the present invention, the intelligent processing module sends the intelligent analysis result to the streaming media server. The streaming media server converts the format of the intelligent analysis result into a preset streaming media data format, and then uploads the transcoded intelligent analysis result to the target object storage device. When the intelligent analysis result is uploaded to the target object storage device, metadata will be generated, and the metadata includes attribute information of the stored intelligent analysis streaming media data, such as the name, size, storage path and other attribute information of the stored intelligent analysis streaming media data. The intelligent processing module can send the intelligent analysis streaming media data to the streaming media server by pushing the stream. Alternatively, the streaming media server can obtain the intelligent analysis streaming media data from the intelligent processing module by pulling the stream.
[0105] In an embodiment of the present invention, the target object storage device can be used to store intelligent analysis streaming media data and metadata generated when storing intelligent analysis streaming media data. The target object storage device can also be used to generate a shared link for the intelligent analysis streaming media data, and send the shared link to the streaming media server, which forwards the shared link to the monitoring platform, and finally enables the client to download the intelligent analysis streaming media data according to the shared link. Among them, the shared link is an address that supports the client to open or download the intelligent analysis streaming media data through network access, and the address is used to indicate the specific storage location of the intelligent analysis streaming media data. Exemplarily, if the shared link is a URL (uniform resource locator) address, the client can directly enter the URL address through the browser to open or download the intelligent analysis streaming media data stored in the storage location indicated by the URL.
[0106] In the embodiment of the present invention, the target object storage device may be a server independent of the storage server, the target object storage device may also be a storage module in the storage server, or the target object storage device may be one or more disks in the disk array that the storage server allocates specifically for the intelligent analysis results. The specific method for determining the target object storage device is selected by those skilled in the art according to actual needs, and the present invention does not specifically limit it.
[0107] After receiving the intelligent analysis streaming media data, the target object storage device can store the content of the intelligent analysis streaming media data and the metadata of the intelligent analysis streaming media data separately. That is, different storage disks or storage units can be used to store the intelligent analysis streaming media data itself and the attribute information of the intelligent analysis streaming media data respectively. In this way, when reading the intelligent analysis streaming media data, the specific storage path of the intelligent analysis streaming media data is obtained by first accessing the storage disk or storage unit that stores the metadata of the intelligent analysis streaming media data, and then the storage disk or storage unit that stores the content of the intelligent analysis streaming media data is retrieved according to the obtained storage path to obtain the intelligent analysis streaming media data stored under the storage path.
[0108] In an embodiment of the present invention, a preset intelligent analysis model is used in the intelligent processing module to perform intelligent analysis on the original streaming media data stream. The preset intelligent analysis model can be a model set according to actual needs, such as a speech recognition model, a face recognition model, a vehicle recognition model, etc. In an embodiment of the present invention, the intelligent processing module can directly obtain the original streaming media data stream from the storage server through a third streaming media data request instruction, and use the obtained original streaming media data stream as training data to train the preset intelligent analysis model. The intelligent processing module can also obtain intelligent analysis streaming media data from the target object storage device according to the obtained shared link by obtaining a shared link from the streaming media server. The obtained intelligent analysis streaming media data is used as training data to train the preset intelligent analysis model to achieve training iterations of the preset intelligent analysis model.
[0109] By adopting the embodiment of the present invention, the streaming media server can transcode the intelligent analysis streaming media data obtained by the intelligent processing module and upload it to the target object storage device. The target object storage device then generates a shared link for the transcoded intelligent analysis streaming media data, and forwards the shared link to the client through the streaming media server and the monitoring platform, so that the client can directly obtain the transcoded intelligent analysis streaming media data from the target object storage device according to the shared link. It can effectively reduce the consumption of computing resources and storage resources of the streaming media server by the intelligent analysis streaming media data, thereby enabling the streaming media server to better serve the processing operations such as transcoding, pushing and pulling of streaming media data, and effectively improve the efficiency of streaming media data distribution.
[0110] Corresponding to the above method embodiment, the embodiment of the present invention also provides a streaming media data distribution system. Figure 2 As shown, the streaming media data distribution system provided by the embodiment of the present invention may include:
[0111] The streaming media server 210 is used to receive the first streaming media data request instruction sent by the monitoring platform 240, and send the second streaming media data request instruction to the storage server 220 according to the first streaming media data request instruction. The first streaming media data request instruction is an instruction message generated by the monitoring platform 240 in response to the streaming media data request of the client, and the original streaming media data code stream requested by the first streaming media data request instruction and the second streaming media data request instruction are the same.
[0112] The storage server 220 is used to obtain the original streaming media data code stream requested by the second streaming media data request instruction from the disk array 230 as the target code stream, and send the target code stream to the streaming media server 210.
[0113] The disk array 230 is used to store the original streaming media data code stream collected by the image acquisition device under the management of the storage server 220.
[0114] The monitoring platform 240 is used to generate a first streaming media data request instruction in response to the streaming media data request instruction message from the client.
[0115] The streaming media server 210 is also used to process the target code stream and send the playback address information to the monitoring platform 240, so that the monitoring platform 240 sends the playback address to the client, so that the client obtains the processed target code stream according to the playback address information.
[0116] In a possible embodiment, the storage server 220 is further used to assign a communication address and a disk storage address to the original streaming media data code stream sent by the image acquisition device; and store the original streaming media data code stream in a target disk in the disk array 230. The communication address of the target disk is the same as the communication address of the recipient assigned by the storage server 220, and the storage address of the target disk is the same as the disk storage address.
[0117] In a possible embodiment, the first streaming data request instruction carries a streaming data channel number, and the streaming server 210 is used to generate a second streaming data request instruction carrying the streaming data channel number based on the streaming data channel number, and send the second streaming data request instruction to the storage server 220.
[0118] The storage server 220 is further configured to obtain the original streaming media data code stream corresponding to the streaming media data channel number from the disk array 230 .
[0119] In a possible embodiment, the streaming media server 210 is also used to convert the format of the target code stream into a preset streaming media data format to obtain a transcoded streaming media data code stream; and generate playback address information for obtaining the transcoded streaming media data code stream based on the transcoded streaming media data code stream.
[0120] In a possible embodiment, the monitoring platform 240 includes an intelligent processing module, and the storage server 220 is used to obtain the target code stream from the disk array 230 according to the third streaming media data request instruction sent by the intelligent processing module, and send the target code stream to the intelligent processing module. The intelligent processing module is used to perform intelligent analysis on the target code stream and obtain intelligent analysis results.
[0121] In a possible embodiment, the streaming media data distribution system also includes a target object storage device and a database. The database is used to store management data generated during the operation of the streaming media server 210. The intelligent processing module is used to send the intelligent analysis result to the streaming media server 210. The streaming media server 210 is also used to transcode the intelligent analysis result, generate the transcoded intelligent analysis result, and upload the transcoded intelligent analysis result to the target object storage device, and the target object storage device generates a shared link based on the transcoded intelligent analysis result. The target object storage device sends the shared link to the streaming media server 210, and the streaming media server 210 forwards the shared link to the monitoring platform 240, so that the client can obtain the transcoded intelligent analysis result according to the shared link.
[0122] In order to more clearly explain the streaming media data distribution method provided by the present invention, the principle of the streaming media data distribution method provided by the present invention will be explained in combination with a specific application scenario. Figure 3 ,include:
[0123] Client, monitoring platform, streaming media server, storage server, target object storage device, database, disk array, image acquisition device, and the monitoring platform includes an intelligent processing module. Among them:
[0124] The client may be a WEB client or a mobile terminal, and the specific form is not specifically limited in the present invention.
[0125] The monitoring platform is used to respond to the streaming media data request instruction message of the client and send a first streaming media data request instruction to the streaming media server, wherein the first streaming media data request instruction is transmitted in HTTP protocol.
[0126] The streaming media server is used to generate a second streaming media data request instruction according to the content carried by the first streaming media data request instruction after receiving the first streaming media data request instruction, so as to obtain the original streaming media data code stream from the storage server. For the specific generation of the second streaming media data request instruction and the acquisition of part of the original streaming media data code stream from the storage server, please refer to the contents recorded in the aforementioned steps S120 and S130, which will not be repeated here.
[0127] The storage server is used to manage the disk array and the connected image acquisition device. The storage server is used to push the stream to the streaming server in response to the second streaming data request instruction sent by the streaming server, or the streaming server pulls the stream from the storage server. Among them, the original streaming data code stream can be transmitted using the RTSP protocol. For the specific disk array management and image acquisition device management content, please refer to the content recorded in the aforementioned step S120, which will not be repeated here.
[0128] The target object storage device is used to store the transcoded intelligent analysis results uploaded by the streaming media server and generate a shared link so that the monitoring platform and the client can download the transcoded intelligent analysis results according to the shared link. For the specific content of generating the shared link, please refer to the above-mentioned content related to the target object storage device, which will not be repeated here.
[0129] The intelligent processing module is used to obtain the original streaming media data code stream from the storage server and perform intelligent analysis on the original streaming media data code stream to obtain intelligent analysis results. The specific method of obtaining the original streaming media data code stream and the steps of performing intelligent analysis on the original streaming media data can be referred to the relevant records of the aforementioned intelligent processing module, which will not be repeated here.
[0130] The database is used to record and store the management data generated during the operation of the streaming media server. The specific management data content can be found in the above step S150, which is recorded in the database part and will not be repeated here.
[0131] The disk array is used to store the original streaming media data code stream sent by the image acquisition device under the management of the storage server. The specific disk array planning method and the specific storage content allocation method can be referred to the content recorded in the above step S130, which will not be repeated here.
[0132] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0133] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0134] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A streaming media data distribution method, characterized in that: The method comprises: The streaming media server receives a first streaming media data request instruction sent by the monitoring platform; wherein the first streaming media data request instruction is an instruction message generated by the monitoring platform in response to the streaming media data request of the client; The streaming media server sends a second streaming media data request instruction to the storage server according to the first streaming media data request instruction; wherein the original streaming media data code stream requested by the first streaming media data request instruction and the second streaming media data request instruction are the same; The storage server obtains the original streaming media data code stream requested by the second streaming media data request instruction from the disk array as the target code stream; wherein the disk array is used to store the original streaming media data code stream collected by the image acquisition device under the management of the storage server; The storage server sends the target code stream to the streaming media server; The streaming media server processes the target code stream and sends the playback address information to the monitoring platform, so that the monitoring platform sends the playback address information to the client, so that the client obtains the processed target code stream according to the playback address information; The monitoring platform includes an intelligent processing module, and the intelligent processing module is used to perform intelligent analysis on the original streaming media data code stream. The method also includes: The intelligent processing module generates a third streaming media data request instruction according to the streaming media data request, and sends the third streaming media data request instruction to the storage server, wherein the third streaming media data request instruction can be transmitted using the RTSP real-time transmission protocol to send the streaming media data information requested by the client to the storage server in real time; the storage server obtains the target code stream from the disk array according to the third streaming media data request instruction sent by the intelligent processing module; The storage server sends the target code stream to the intelligent processing module; The intelligent processing module performs intelligent analysis on the target bitstream to obtain an intelligent analysis result, wherein the intelligent analysis result carries one or more types of marking information; In the case where there are multiple streaming media servers, the resource occupancy of each of the streaming media servers is stored in a preset database, the resource occupancy includes: processing resource occupancy, storage resource occupancy, thread usage, and the number of streaming media data requests received by each of the streaming media servers. Each of the streaming media servers can determine the load occupancy through the resource occupancy and store it in a neighbor balancing table. The neighbor balancing table is set in the preset database or inside the streaming media server and is used to record the load occupancy of each of the streaming media servers. When the load occupancy of any of the streaming media servers is greater than a preset threshold, the streaming media server reads the neighbor balancing table, and uses another streaming media server in the neighbor balancing table that is closest to the streaming media server in physical space or in the same local area network and has a load occupancy less than the preset threshold as the target streaming media server. The streaming media server sends a task forwarding instruction to the target streaming media server, and the target streaming media server completes the streaming media data task in the task forwarding instruction sent by the streaming media server.
2. The method according to claim 1, characterized in that The method further comprises: The storage server allocates a communication address and a disk storage address for the original streaming media data code stream sent by the image acquisition device; The storage server stores the original streaming media data code stream in the target disk in the disk array; wherein the communication address of the target disk is the same as the communication address of the recipient assigned by the storage server, and the storage address of the target disk is the same as the disk storage address.
3. The method according to claim 1, characterized in that The first streaming media data request instruction carries a streaming media data channel number, and the streaming media server sends a second streaming media data request instruction to the storage server according to the first streaming media data request instruction, including: The streaming media server generates a second streaming media data request instruction carrying the streaming media data channel number according to the streaming media data channel number, and sends the second streaming media data request instruction to the storage server; The storage server obtains the original streaming media data code stream requested by the second streaming media data request instruction from the disk array, including: The storage server obtains the original streaming media data code stream corresponding to the streaming media data channel number from the disk array.
4. The method according to claim 1, characterized in that: The streaming media server processes the target code stream and sends the playback address information to the monitoring platform, including: The streaming media server converts the format of the target code stream into a preset streaming media data format, and obtains the transcoded streaming media data code stream; The streaming media server generates playback address information for obtaining the transcoded streaming media data stream according to the transcoded streaming media data stream.
5. The method according to claim 1, characterized in that The method further comprises: the intelligent processing module sending the intelligent analysis result to the streaming media server; The streaming media server transcodes the intelligent analysis result to generate a transcoded intelligent analysis result; The streaming media server uploads the transcoded intelligent analysis result to the target object storage device; The target object storage device generates a sharing link according to the transcoded intelligent analysis result; The target object storage device sends the shared link to the streaming media server; The streaming media server forwards the shared link to the monitoring platform, so that the client obtains the transcoded intelligent analysis result according to the shared link.
6. A streaming media data distribution system, characterized in that: The system comprises: Streaming media servers, storage servers, disk arrays, and monitoring platforms; The streaming media server is configured to receive a first streaming media data request instruction sent by the monitoring platform; wherein the first streaming media data request instruction is an instruction message generated by the monitoring platform in response to a streaming media data request from a client; and according to the first streaming media data request instruction, send a second streaming media data request instruction to the storage server; wherein the original streaming media data code stream requested by the first streaming media data request instruction and the second streaming media data request instruction are the same; The storage server is used to obtain the original streaming media data code stream requested by the second streaming media data request instruction from the disk array as a target code stream; and send the target code stream to the streaming media server; The disk array is used to store the original streaming media data code stream collected by the image acquisition device under the management of the storage server; The streaming media server is further used to process the target code stream and send the playback address information to the monitoring platform, so that the monitoring platform sends the playback address information to the client, so that the client obtains the processed target code stream according to the playback address information; The monitoring platform includes an intelligent processing module, which is used to perform intelligent analysis on the original streaming media data stream: The intelligent processing module generates a third streaming media data request instruction according to the streaming media data request, and sends the third streaming media data request instruction to the storage server, wherein the third streaming media data request instruction can be transmitted using the RTSP real-time transport protocol to send the streaming media data information requested by the client to the storage server in real time; The storage server is further used to obtain a target code stream from the disk array according to a third streaming media data request instruction sent by the intelligent processing module; and send the target code stream to the intelligent processing module; the intelligent processing module is used to perform intelligent analysis on the target code stream to obtain an intelligent analysis result, wherein the intelligent analysis result carries one or more marking information; in the case where there are multiple streaming media servers, the resource occupancy of each of the streaming media servers is stored through a preset database, and the resource occupancy includes: processing resource occupancy, storage resource occupancy, thread usage, and the number of streaming media data requests received by each of the streaming media servers. Each of the streaming media servers can determine the load occupancy through the resource occupancy and store it in a neighbor balancing table, and the neighbor balancing table is set in a preset database or inside the streaming media server, and is used to record the load occupancy of each of the streaming media servers; When the load occupancy of any of the streaming media servers is greater than a preset threshold, the streaming media server reads the neighbor balancing table, and uses another streaming media server in the neighbor balancing table that is closest to the streaming media server in physical space or in the same local area network and has a load occupancy less than the preset threshold as the target streaming media server. The streaming media server sends a task forwarding instruction to the target streaming media server, and the target streaming media server completes the streaming media data task in the task forwarding instruction sent by the streaming media server.
7. The system according to claim 6, characterized in that The storage server is further used for: Assign a communication address and a disk storage address to the original streaming media data stream sent by the image acquisition device; store the original streaming media data stream in a target disk in the disk array; wherein the communication address of the target disk is the same as the communication address of the recipient assigned by the storage server, and the storage address of the target disk is the same as the disk storage address.
8. The system according to claim 6, characterized in that The first streaming media data request instruction carries a streaming media data channel number; The streaming media server is further configured to generate a second streaming media data request instruction carrying the streaming media data channel number according to the streaming media data channel number, and send the second streaming media data request instruction to the storage server; The storage server is further used to obtain the original streaming media data code stream corresponding to the streaming media data channel number from the disk array.
9. The system according to claim 6, characterized in that The streaming media server is further used for: The format of the target code stream is converted into a preset streaming media data format to obtain a transcoded streaming media data code stream; and according to the transcoded streaming media data code stream, playback address information for obtaining the transcoded streaming media data code stream is generated.
10. The system according to claim 6, characterized in that The system also includes a target object storage device; The intelligent processing module is also used to send the intelligent analysis result to the streaming media server; The streaming media server is further used to transcode the intelligent analysis result to generate a transcoded intelligent analysis result; and upload the transcoded intelligent analysis result to the target object storage device; The target object storage device is used to generate a shared link according to the intelligent analysis result after the transcoding; and send the shared link to the streaming media server; The streaming media server is further used to forward the shared link to the monitoring platform, so that the client can obtain the transcoded intelligent analysis result according to the shared link.
