CN114679630A - Data transmission method, device and computer readable storage medium - Google Patents
Data transmission method, device and computer readable storage medium Download PDFInfo
- Publication number
- CN114679630A CN114679630A CN202210585964.1A CN202210585964A CN114679630A CN 114679630 A CN114679630 A CN 114679630A CN 202210585964 A CN202210585964 A CN 202210585964A CN 114679630 A CN114679630 A CN 114679630A
- Authority
- CN
- China
- Prior art keywords
- gateway
- data
- stream
- information
- platform
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a data transmission method, a device and a computer readable storage medium, wherein the data transmission method comprises the following steps: the lower platform receives request information which is sent by the upper platform and used for requesting the data flow of the data acquisition device, and sends the request information to the first gateway; the first gateway acquires the stream taking address of the data acquisition device according to the request information, and sends the acquisition result of the stream taking address to the second gateway through the lower platform; the second gateway acquires a stream-taking address from the first gateway based on the acquisition result, and acquires the data stream to be transmitted according to the stream-taking address; the second gateway processes the data stream to be transmitted to obtain a data packet in a program stream format; the second gateway distributes a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to the third-party media server based on source information of the source port. The application can pull the data stream of the non-national standard data acquisition device to the third-party media server.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method, an apparatus, and a computer-readable storage medium.
Background
The security monitoring industry is generally applied to GB/T28181 (national standard, information transmission, exchange and control technical requirements of a security video monitoring networking system), and a data stream of a national standard data acquisition device can be pulled to a third-party media server through a third-party national standard platform, for example, video, audio and image data of a national standard camera are pulled to the third-party media server. However, there are still a lot of non-national standard data acquisition devices, and the existing third-party national standard platform cannot pull the data stream of the non-national standard data acquisition device to the third-party media server.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device and a computer readable storage medium, which can pull data streams of a non-national standard data acquisition device to a third-party media server.
In one aspect, the present application provides a data transmission method, where the data transmission method is applied to a data transmission device, where the data transmission device includes an upper platform, a lower platform, a first gateway and a second gateway, the upper platform, the lower platform and the first gateway are sequentially in communication connection, and the second gateway is in communication connection with the first gateway and the lower platform, and the data transmission method includes:
the lower platform receives request information which is sent by the upper platform and used for requesting a data stream of a data acquisition device, and sends the request information to the first gateway, wherein the request information comprises an equipment identifier of the data acquisition device;
the first gateway acquires the stream taking address of the data acquisition device according to the request information, and sends the acquisition result of the stream taking address to the second gateway through the lower platform;
the second gateway acquires the stream taking address from the first gateway based on the acquisition result, and acquires the data stream to be transmitted according to the stream taking address;
the second gateway processes the data stream to be transmitted to obtain a data packet in a program stream format;
the second gateway distributes a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to a third-party media server based on source end information of the source port, wherein the source port is a port used by the second gateway for transmitting the data packet in the program stream format, and the source end information is port information of the source port.
In some embodiments of the present application, the obtaining, by the second gateway, the streaming address from the first gateway based on the obtaining result, and obtaining the data stream to be transmitted according to the streaming address includes:
the second gateway creates a first transmission control link and a video transmission link based on the acquisition result;
and the second gateway acquires the stream taking address from the first gateway through the first transmission control link and acquires the data stream to be transmitted according to the stream taking address through the video transmission link.
In some embodiments of the present application, the second gateway creates a first transmission control link and a video transmission link based on the obtained result, including:
the second gateway compares the obtained result with a preset reference result;
and when the acquisition result is matched with the preset reference result, a first transmission control link and a video transmission link are established.
In some embodiments of the present application, the processing, by the second gateway, the data stream to be transmitted to obtain a data packet in a program stream format includes:
the second gateway packages the data stream to be transmitted to obtain a bare data stream;
and the second gateway unpacks the bare data stream based on the program stream format to obtain a data packet in the program stream format.
In some embodiments of the present application, the transmitting, by the second gateway, the data packet in the program stream format to the third party media server based on the source information of the source port includes:
the second gateway sends the source end information of the source port to the subordinate platform, and receives a confirmation message returned by the subordinate platform based on the source end information, wherein the confirmation message carries target end information, and the target end information is port information of a target port used by the third-party media server for receiving the data packet in the program stream format;
and the second gateway transmits the data packet in the program stream format to a third-party media server based on the target end information and the source end information.
In some embodiments of the present application, when the obtained result matches the preset reference result, the method further includes:
and the second gateway creates a video control link, and the video control link is used for processing the data stream to be transmitted into a data packet in a program stream format.
In some embodiments of the present application, the lower platform includes a second transmission control link, the first gateway includes a third transmission control link, a session between the second transmission control link and the third transmission control link is an active process session, a session between the second transmission control link and the second gateway, a session between the second gateway and the video control link, and a session between the video transmission link and the video control link are all passive process sessions, and after the second gateway compares the obtained result with a preset reference result, the method further includes:
and when the acquisition result is not matched with the preset reference result, the second gateway closes the passive process session and informs the lower platform to close the active process session.
In some embodiments of the present application, the data transmission apparatus further includes a process management module communicatively connected to the lower platform and the second gateway, and after the second gateway transmits the data packet in the program stream format to a third-party media server based on source information of the source port, the method further includes:
when the superior platform sends a data closing request to the subordinate platform or the second gateway sends a session closing request, the process management module informs the subordinate platform to close the active process session after waiting for a preset first time length and informs the second gateway to close the passive process session after waiting for a preset second time length.
In another aspect, the present application provides a data transmission apparatus, including: the system comprises a superior platform, an inferior platform, a first gateway and a second gateway;
the lower platform is used for receiving request information which is sent by the upper platform and used for requesting a data stream of a data acquisition device, and sending the request information to the first gateway, wherein the request information comprises an equipment identifier of the data acquisition device;
the first gateway is used for acquiring the stream taking address of the data acquisition device according to the request information and sending the acquisition result of the stream taking address to the second gateway through the lower-level platform;
the second gateway is used for acquiring the stream-taking address from the first gateway based on the acquisition result, acquiring the data stream to be transmitted according to the stream-taking address, processing the data stream to be transmitted to obtain a data packet in a program stream format, distributing a source port for the data packet in the program stream format, transmitting the data packet in the program stream format to a third-party media server based on source port information of the source port, wherein the source port is a port used by the second gateway for transmitting the data packet in the program stream format, and the source port information is port information of the source port.
In a third aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to perform the steps in the data transmission method according to any one of the first aspect.
The method and the device have the advantages that the stream taking address of the data acquisition device is obtained through the first gateway, the data stream to be transmitted is pulled through the second gateway according to the stream taking address, the data stream to be transmitted is processed into a data packet in a program stream format and then is transmitted to the third-party media server, and the data stream of the non-national standard data acquisition device can be pulled to the third-party media server.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a system architecture diagram illustrating operation of a data transmission device according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an embodiment of a data transmission method provided in an embodiment of the present application;
fig. 3 is a link session diagram of a data transmission apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an embodiment of a data transmission device provided in the embodiment of the present application.
Detailed Description
The terms "first," "second," and the like in the description and in the claims of the embodiments of the application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules expressly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, such that the division of modules presented in the present application is merely a logical division and may be implemented in a practical application in a different manner, such that multiple modules may be combined or integrated into another system or some features may be omitted or not implemented, and such that couplings or direct couplings or communicative connections shown or discussed may be through interfaces, indirect couplings or communicative connections between modules may be electrical or the like, the embodiments of the present application are not limited. Moreover, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
The embodiment of the application provides a data transmission method, which is mainly applied to a city monitoring alarm networking system, a smart traffic system and a traffic police monitoring system in an actual scene, and is used for pulling a data stream of a non-national standard data acquisition device to a third-party media server, for example, pulling a data stream of an ONVIF camera to the third-party media server. The data acquisition device can be various non-national standard cameras which are arranged on a monitoring field and used for information acquisition, coding, processing, storage, transmission and safety control.
The data transmission method provided in the embodiment of the present application is executed by a data transmission device, and the data transmission device may operate in the system architecture shown in fig. 1, please refer to fig. 1, where fig. 1 is a system architecture diagram of an operation of the data transmission device provided in the embodiment of the present application. As shown in fig. 1, the system includes an upper platform (GB upper), a lower platform (GB lower), a first gateway (ovif web gateway), a second gateway (rtsp gateway), a data collection device, and a third-party media server, where the upper platform and the lower platform communicate using a national standard protocol (GBT/28181 protocol), the lower platform and the first gateway communicate using a hypertext transfer protocol, the lower platform and the second gateway communicate using a transmission control protocol, and the first gateway and the second gateway communicate using a transmission control protocol. The upper platform and the lower platform form a third-party national standard platform, the data acquisition device is a non-national standard data acquisition device and comprises various cameras which are installed on a monitoring site and used for information acquisition, encoding, processing, storage, transmission and safety control, and a user can send request information for requesting data streams of the data acquisition device to the lower platform through the upper platform.
As shown in fig. 1, when a user needs to request a data stream of a data acquisition device, request information (invite request) for requesting the data stream of the data acquisition device may be sent to a lower platform through an upper platform, and the request information is sent to a first gateway, and after receiving the request information, the first gateway obtains a streaming address (RTSP address) from the data acquisition device based on the request information, and sends an obtaining result of the streaming address to a second gateway through the lower platform. And the second gateway acquires the stream taking address from the first gateway based on the acquisition result, and acquires the data stream to be transmitted in the data acquisition device according to the stream taking address. And then the second gateway processes the data stream to be transmitted to obtain a data packet in a program stream format, distributes a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to a third-party media server based on source information of the source port. In this embodiment, the stream taking address of the data acquisition device is obtained through the first gateway, the data stream to be transmitted is pulled through the second gateway according to the stream taking address, the data stream to be transmitted is processed into a data packet in a program stream format and then transmitted to the third-party media server, and the data stream of the non-national standard data acquisition device can be pulled to the third-party media server.
With reference to the above, the following will describe a data transmission method in the present application, and refer to fig. 2, which is a schematic flow chart of an embodiment of the data transmission method in the embodiment of the present application, where the data transmission method includes:
s100, the lower platform receives request information which is sent by the upper platform and used for requesting data flow of a data acquisition device, and sends the request information to the first gateway, wherein the request information comprises equipment identification of the data acquisition device.
The data acquisition device is a non-national standard data acquisition device, and comprises various cameras which are installed on a monitoring site and used for information acquisition, coding, processing, storage, transmission and safety control, for example, the data acquisition device can be an Open Network Video Interface Forum (ONVIF) camera, a dahua camera, a Haikang camera and the like. The request information is request information which is sent to a lower platform by a user through a higher platform and is used for requesting data flow of the data acquisition device, the request information comprises equipment identification of the data acquisition device, and the equipment identification is used for identifying the data acquisition device.
In this embodiment, when a user needs to pull a data stream of the data acquisition device, the client of the upper platform may send request information for requesting the data stream of the data acquisition device to the lower platform, and after receiving the request information for requesting the data stream of the data acquisition device sent by the upper platform, the lower platform may send the request information to the first gateway, so that the first gateway obtains a stream-taking address of the data acquisition device according to the request information.
S200, the first gateway obtains the stream taking address of the data acquisition device according to the request information, and sends the obtaining result of the stream taking address to the second gateway through the lower platform.
The Streaming address is also called a Real Time Streaming Protocol (RTSP) address, and is a live data upload address uniquely pointing to a single live event, and is defined by rtmp: the head part comprises an uploading service address, an uploading directory name (APP) and an uploading node (stream), and the data stream of the data acquisition device can be acquired through the stream taking address. The first gateway is used for acquiring a streaming address of the data acquisition device, different data acquisition devices correspond to different first gateways, for example, when the data acquisition device is an ONVIF camera, the first gateway is an ONVIF gateway, when the data acquisition device is a dahua camera, the first gateway is a dahua gateway, and when the data acquisition device is a haikang camera, the first gateway is a haikang gateway. In this embodiment, after the first gateway receives the request information sent by the lower platform, the device identifier of the data acquisition device is analyzed from the request information, the stream-taking address of the data acquisition device is obtained based on the device identifier, and the obtained result of the stream-taking address is sent to the second gateway through the lower platform, so that the second gateway obtains the stream-taking address from the first gateway based on the obtained result.
S300, the second gateway obtains the stream taking address from the first gateway based on the obtaining result, and obtains the data stream to be transmitted according to the stream taking address.
The second gateway is a Real Time Streaming Protocol (RTSP) gateway, and is configured to obtain a data stream to be transmitted according to a stream fetching address of the data acquisition device. And after receiving the acquisition result of the stream taking address sent by the first gateway through the lower platform, the second gateway acquires the stream taking address of the data acquisition device from the first gateway based on the acquisition result, and acquires the data stream to be transmitted based on the stream taking address of the data acquisition device.
In one embodiment, step S300 includes:
s310, the second gateway creates a first transmission control link and a video transmission link based on the obtained result;
and S320, the second gateway acquires the stream taking address from the first gateway through the first transmission control link, and acquires the data stream to be transmitted according to the stream taking address through the video transmission link.
The first transmission control link is an RTSP transmission control link, the video transmission link is an RTSP video transmission link, the first transmission control link is used for acquiring a stream taking address of the data acquisition device from the first gateway, and the video transmission link is used for acquiring a data stream to be transmitted according to the stream taking address of the data acquisition device. In this embodiment, after receiving the acquisition result of the stream taking address sent by the first gateway, the second gateway creates a first transmission control link and a video transmission link based on the acquisition result, acquires the stream taking address of the data acquisition device from the first gateway through the first transmission control link, and acquires the data stream to be transmitted according to the stream taking address of the data acquisition device through the video transmission link.
In one embodiment, step S310 includes:
s311, the second gateway compares the obtained result with a preset reference result;
and S312, when the acquisition result is matched with the preset reference result, creating a first transmission control link and a video transmission link.
The first gateway has two conditions of success and failure when acquiring the stream-taking address of the data acquisition device, so that the acquisition result of the stream-taking address has two conditions, and the reference result is preset reference information for measuring the acquisition result of the stream-taking address. In this embodiment, when the second gateway creates the first transmission control link and the video transmission link, the obtained result is compared with the preset reference result, and when the obtained result is matched with the preset reference result, it indicates that the first gateway has successfully obtained the stream fetching address of the data acquisition device, and the second gateway creates the first transmission control link and the video transmission link, so as to subsequently obtain the stream fetching address of the data acquisition device from the first gateway and obtain the data stream to be transmitted according to the stream fetching address. The matching here means that the obtaining result is the same as the preset reference result, or the obtaining result is similar to the preset reference result in meaning, for example, the obtaining result is "successful", the preset reference result is "successful", and the obtaining result is matched with the preset reference result.
S400, the second gateway processes the data stream to be transmitted to obtain a data packet in a program stream format.
A Program Stream (PS) is a single data Stream formed by combining (re-checking) one or more digital television Elementary Streams (PES) having a common time reference, and GB28181 specifies that audio/video data is encapsulated in a PS format and transmitted by a Real-time Transport Protocol (RTP). In this embodiment, after obtaining the data stream to be transmitted based on the stream taking address, the second gateway processes the data stream to be transmitted, and processes the data stream to be transmitted into a data packet in a program stream format, so that the data stream to be transmitted can be transmitted to the third-party media server in the following.
In one embodiment, step S400 includes:
s410, the second gateway packages the data stream to be transmitted to obtain a bare data stream;
and S420, the second gateway unpacks the bare data stream based on the program stream format to obtain a data packet in the program stream format.
After the second gateway acquires the data stream to be transmitted, the data stream to be transmitted is packed based on the RFC3984 code stream format, where the RFC3984 code stream is essentially a Real-time transport Protocol (RTP) plus H264 bare code stream (also called elementary stream, ES), and after the data stream to be transmitted is packed based on the RFC3984 code stream format, the bare data stream can be obtained. And then the second gateway unpacks the bare data stream based on the program stream format to obtain the data packet of the program stream format.
S500, the second gateway distributes a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to a third-party media server based on source information of the source port, wherein the source port is a port used by the second gateway for transmitting the data packet in the program stream format, and the source information is port information of the source port.
The source port is a port used by the second gateway for transmitting the data packet in the program stream format, the source information of the source port is port information of the source port, and the source information includes, but is not limited to, an IP address, a port number, and the like of the source port. In this embodiment, after processing the data stream to be transmitted into the data packet in the program stream format, the second gateway allocates a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to the third-party media server based on the source information of the source port, so that the data stream of the non-national-standard data acquisition device can be pulled to the third-party media server.
In one embodiment, step S500 includes:
s510, the second gateway sends the source information of the source port to the subordinate platform, and receives a confirmation message returned by the subordinate platform based on the source information, where the confirmation message carries destination information, and the destination information is port information of a destination port used by the third-party media server to receive the packet in the program stream format;
s520, the second gateway transmits the data packet in the program stream format to a third-party media server based on the target end information and the source end information.
The third-party media server receives the data packet in the program stream format sent by the second gateway through the port, the destination information is the port information of the destination port used by the third-party media server for receiving the data packet in the program stream format, and the destination information includes but is not limited to the IP address, the port number and the like of the destination port. When the second gateway forwards the data packet in the program stream format based on the source information of the source port, the source information of the source port is firstly sent to the lower platform, the lower platform sends a Response message (SDP Response) to the upper platform after receiving the source information, and the upper platform sends a confirmation message to the second gateway through the lower platform after receiving the Response message, wherein the confirmation message carries the target information. And after receiving the confirmation message, the second gateway transmits the data packet in the program stream format to a third-party media server based on the target end information and the source end information.
Considering that the second gateway may need to execute multiple request messages simultaneously, that is, data streams of multiple data acquisition devices need to be transmitted to multiple third-party multimedia servers at the same time, in order to avoid missing or mistakenly sending data packets in the program stream format, in this embodiment, the second gateway creates a port module for each data acquisition device, where the port module includes a packet receiving module and a forwarding list, the packet receiving module is configured to store data packets in the program stream format, and the forwarding list is configured to store destination information corresponding to the data packets in the program stream format. For example, the second gateway needs to stream the data of the data acquisition device A to the third-party media server A and the third-party media server B, and transmitting the data stream of the data acquisition device B to a third party media server C and a third party media server D, the second gateway creates a port module for the data acquisition device a and a port module for the data acquisition device B, the packet receiving module of the port module corresponding to the data acquisition device a stores the data stream of the data acquisition device a, the forwarding list of the port module corresponding to the data acquisition device a stores the port information of the third-party media server a and the third-party media server B, the packet receiving module of the port module corresponding to the data acquisition device B stores the data stream of the data acquisition device B, and the forwarding list of the port module corresponding to the data acquisition device B stores the port information of the third-party media server C and the third-party media server D.
In a specific embodiment, in step S312, when the obtained result matches the preset reference result, the method further includes:
s313, the second gateway creates a video control link, and the video control link is used for processing the data stream to be transmitted into a data packet in a program stream format.
When the acquisition result of the stream taking address is matched with the preset reference result, the second gateway further creates a video control link, wherein the video control link is a national standard (GB) video control link, and the video control link is used for processing the data stream to be transmitted into a data packet in a program stream format.
In a specific embodiment, after step S311, the method further includes:
and R312, when the acquisition result is not matched with the preset reference result, the second gateway closes the passive process session and informs the lower platform to close the active process session.
As shown in fig. 3, the lower platform includes a second transmission control link, the first gateway includes a third transmission control link, the second transmission control link is a national standard (GB) transmission control link, and the third transmission control link is a web transmission control link. When the lower platform mentioned in the foregoing step sends the request information to the first gateway and the first gateway sends the acquisition result of the streaming address to the second gateway through the lower platform, specifically, the second transmission control link sends the request information to the third transmission control link, and the third transmission control link sends the acquisition result of the streaming address to the second gateway through the second transmission control link. The session between the second transmission control link and the third transmission control link is an active process session, and the session between the second transmission control link and the second gateway, the session between the second gateway and the video control link, and the session between the video transmission link and the video control link are all passive process sessions.
When the acquisition result of the flow taking address is not matched with the preset reference result, the first gateway is indicated to not acquire the flow taking address of the data acquisition device, and the second gateway cannot acquire the flow taking address of the data acquisition device from the first gateway at the moment.
In a specific embodiment, after step S500, the method further includes:
s600, when the superior platform sends a data closing request to the subordinate platform or the second gateway sends a session closing request, the process management module informs the subordinate platform to close the active process session after waiting for a preset first time length, and informs the second gateway to close the passive process session after waiting for a preset second time length.
The data transmission device of the embodiment further comprises a process management module in communication connection with the lower platform and the second gateway, after the second gateway transmits the data packet in the program stream format to the third-party media server based on the source information of the source port, if the upper platform sends a data closing request to the lower platform or the second gateway sends a session closing request, the process management module informs the lower platform to close the active-party process session after waiting for a preset first time length, and informs the second gateway to close the passive-party process session after waiting for a preset second time length, so that the active-party process session and the passive-party process session are asynchronously recovered, various critical problem lags in session recovery are changed into simple synchronous problems, and the security of session termination is ensured. For example, when the upper platform sends a "BYE" message to the lower platform, the process management module notifies the lower platform and the second gateway to respectively close the active process session and the passive process session after waiting for 10 to 30 seconds.
In order to better implement the data transmission method in the embodiment of the present application, on the basis of the data transmission method, an embodiment of the present application further provides a data transmission device, as shown in fig. 4, where the data transmission device includes: an upper platform 601, a lower platform 602, a first gateway 603 and a second gateway 604, wherein the upper platform 601, the lower platform 602 and the first gateway 603 are sequentially in communication connection, and the second gateway 604 is in communication connection with the first gateway 603 and the lower platform 602;
the lower platform 602 is configured to receive request information, which is sent by the upper platform 601 and used for requesting a data stream of a data acquisition device, and send the request information to the first gateway 603, where the request information includes a device identifier of the data acquisition device;
the first gateway 603 is configured to obtain a streaming address of the data acquisition apparatus according to the request information, and send an obtaining result of the streaming address to the second gateway 604 through the lower platform 602;
the second gateway 604 is configured to obtain the streaming address from the first gateway 603 based on the obtaining result, obtain a data stream to be transmitted according to the streaming address, process the data stream to be transmitted, obtain a data packet in a program streaming format, allocate a source port for the data packet in the program streaming format, and transmit the data packet in the program streaming format to a third-party media server based on source information of the source port, where the source port is a port used by the second gateway 604 to transmit the data packet in the program streaming format, and the source information is port information of the source port.
In the embodiment of the application, the stream taking address of the data acquisition device is obtained through the first gateway, the data stream to be transmitted is pulled through the second gateway according to the stream taking address, the data stream to be transmitted is processed into the data packet in the program stream format and then is transmitted to the third-party media server, and the data stream of the non-national standard data acquisition device can be pulled to the third-party media server.
In some embodiments of the present application, the second gateway 604 is specifically configured to:
creating a first transmission control link and a video transmission link based on the acquisition result;
and acquiring the stream taking address from the first gateway through the first transmission control link, and acquiring a data stream to be transmitted according to the stream taking address through the video transmission link.
In some embodiments of the present application, the second gateway 604 is further specifically configured to:
comparing the obtained result with a preset reference result;
and when the acquisition result is matched with the preset reference result, a first transmission control link and a video transmission link are established.
In some embodiments of the present application, the second gateway 604 is further specifically configured to:
packaging the data stream to be transmitted to obtain a bare data stream;
and unpacking the bare data stream based on the program stream format to obtain a data packet in the program stream format.
In some embodiments of the present application, the second gateway 604 is further specifically configured to:
sending the source end information of the source port to the lower platform 602, and receiving a confirmation message returned by the lower platform 602 based on the source end information, where the confirmation message carries destination end information, and the destination end information is port information of a destination port used by the third-party media server to receive the data packet in the program stream format;
and transmitting the data packet in the program stream format to a third-party media server based on the target end information and the source end information.
In some embodiments of the present application, the second gateway 604 is further specifically configured to:
and creating a video control link, wherein the video control link is used for processing the data stream to be transmitted into a data packet in a program stream format.
In some embodiments of the present application, the second gateway 603 is further specifically configured to:
and when the acquisition result is not matched with the preset reference result, closing the passive process session, and informing the lower platform 602 to close the active process session.
In some embodiments of the present application, the data transmission apparatus further includes: the process management module is in communication connection with the lower platform and the second gateway;
the process management module is configured to notify the lower platform 602 to close the active process session after waiting for a preset first duration and notify the second gateway 604 to close the passive process session after waiting for a preset second duration, when the upper platform 601 sends a data close request to the lower platform 602 or the second gateway 604 sends a session close request.
Furthermore, an embodiment of the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. The data transmission method comprises a data transmission method and a data transmission system, wherein the data transmission method comprises a data transmission method and a data transmission system. For example, the computer program may be loaded by a processor to perform the steps of:
the lower platform receives request information which is sent by the upper platform and used for requesting a data stream of a data acquisition device, and sends the request information to the first gateway, wherein the request information comprises an equipment identifier of the data acquisition device;
the first gateway acquires the stream taking address of the data acquisition device according to the request information, and sends the acquisition result of the stream taking address to the second gateway through the lower platform;
the second gateway acquires the stream taking address from the first gateway based on the acquisition result, and acquires the data stream to be transmitted according to the stream taking address;
the second gateway processes the data stream to be transmitted to obtain a data packet in a program stream format;
the second gateway distributes a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to a third-party media server based on source information of the source port, wherein the source port is a port used by the second gateway for transmitting the data packet in the program stream format, and the source information is port information of the source port.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed descriptions of other embodiments, and are not described herein again.
In a specific implementation, each unit or structure may be implemented as an independent entity, or may be combined arbitrarily to be implemented as one or several entities, and the specific implementation of each unit or structure may refer to the foregoing method embodiment, which is not described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The data transmission method, the data transmission device, and the computer-readable storage medium provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A data transmission method is applied to a data transmission device, the data transmission device comprises an upper platform, a lower platform, a first gateway and a second gateway, the upper platform, the lower platform and the first gateway are sequentially in communication connection, the second gateway is in communication connection with the first gateway and the lower platform, and the data transmission method comprises the following steps:
the lower platform receives request information which is sent by the upper platform and used for requesting a data stream of a data acquisition device, and sends the request information to the first gateway, wherein the request information comprises an equipment identifier of the data acquisition device;
the first gateway acquires the stream taking address of the data acquisition device according to the request information, and sends the acquisition result of the stream taking address to the second gateway through the lower platform;
the second gateway acquires the stream taking address from the first gateway based on the acquisition result, and acquires the data stream to be transmitted according to the stream taking address;
the second gateway processes the data stream to be transmitted to obtain a data packet in a program stream format;
the second gateway distributes a source port for the data packet in the program stream format, and transmits the data packet in the program stream format to a third-party media server based on source information of the source port, wherein the source port is a port used by the second gateway for transmitting the data packet in the program stream format, and the source information is port information of the source port.
2. The data transmission method according to claim 1, wherein the second gateway obtains the streaming address from the first gateway based on the obtaining result, and obtains the data stream to be transmitted according to the streaming address, including:
the second gateway creates a first transmission control link and a video transmission link based on the acquisition result;
and the second gateway acquires the stream taking address from the first gateway through the first transmission control link and acquires the data stream to be transmitted according to the stream taking address through the video transmission link.
3. The data transmission method according to claim 2, wherein the second gateway creates a first transmission control link and a video transmission link based on the obtained result, and includes:
the second gateway compares the obtained result with a preset reference result;
and when the acquisition result is matched with the preset reference result, a first transmission control link and a video transmission link are established.
4. The data transmission method according to claim 1, wherein the processing, by the second gateway, of the data stream to be transmitted to obtain a data packet in a program stream format includes:
the second gateway packages the data stream to be transmitted to obtain a bare data stream;
and the second gateway unpacks the bare data stream based on the program stream format to obtain a data packet in the program stream format.
5. The data transmission method of claim 1, wherein the second gateway transmits the data packet in the program stream format to a third-party media server based on source information of the source port, and the method comprises:
the second gateway sends the source end information of the source port to the subordinate platform, and receives a confirmation message returned by the subordinate platform based on the source end information, wherein the confirmation message carries target end information, and the target end information is port information of a target port used by the third-party media server for receiving the data packet in the program stream format;
and the second gateway transmits the data packet in the program stream format to a third-party media server based on the target end information and the source end information.
6. The data transmission method according to claim 3, wherein when the obtained result matches the preset reference result, the method further comprises:
and the second gateway creates a video control link, and the video control link is used for processing the data stream to be transmitted into a data packet in a program stream format.
7. The data transmission method according to claim 6, wherein the lower platform includes a second transmission control link, the first gateway includes a third transmission control link, the session between the second transmission control link and the third transmission control link is an active process session, the session between the second transmission control link and the second gateway, the session between the second gateway and the video control link, and the session between the video transmission link and the video control link are all passive process sessions, and after the second gateway compares the obtained result with a preset reference result, the method further comprises:
and when the acquisition result is not matched with the preset reference result, the second gateway closes the passive process session and informs the lower platform to close the active process session.
8. The data transmission method according to claim 7, wherein the data transmission apparatus further includes a process management module communicatively connected to the lower platform and the second gateway, and after the second gateway transmits the data packet in the program stream format to a third-party media server based on source information of the source port, the method further includes:
when the superior platform sends a data closing request to the subordinate platform or the second gateway sends a session closing request, the process management module informs the subordinate platform to close the active process session after waiting for a preset first time length and informs the second gateway to close the passive process session after waiting for a preset second time length.
9. A data transmission apparatus, characterized in that the data transmission apparatus comprises: the system comprises an upper platform, a lower platform, a first gateway and a second gateway, wherein the upper platform, the lower platform and the first gateway are sequentially in communication connection, and the second gateway is in communication connection with the first gateway and the lower platform;
the lower platform is used for receiving request information which is sent by the upper platform and used for requesting a data stream of a data acquisition device, and sending the request information to the first gateway, wherein the request information comprises an equipment identifier of the data acquisition device;
the first gateway is used for acquiring the stream taking address of the data acquisition device according to the request information and sending the acquisition result of the stream taking address to the second gateway through the lower-level platform;
the second gateway is used for acquiring the stream-taking address from the first gateway based on the acquisition result, acquiring the data stream to be transmitted according to the stream-taking address, processing the data stream to be transmitted to obtain a data packet in a program stream format, distributing a source port for the data packet in the program stream format, transmitting the data packet in the program stream format to a third-party media server based on source port information of the source port, wherein the source port is a port used by the second gateway for transmitting the data packet in the program stream format, and the source port information is port information of the source port.
10. A computer-readable storage medium, having stored thereon a computer program which is loaded by a processor for performing the steps of the data transmission method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210585964.1A CN114679630B (en) | 2022-05-27 | 2022-05-27 | Data transmission method, device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210585964.1A CN114679630B (en) | 2022-05-27 | 2022-05-27 | Data transmission method, device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114679630A true CN114679630A (en) | 2022-06-28 |
CN114679630B CN114679630B (en) | 2022-08-30 |
Family
ID=82079524
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210585964.1A Active CN114679630B (en) | 2022-05-27 | 2022-05-27 | Data transmission method, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114679630B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116016995A (en) * | 2022-12-02 | 2023-04-25 | 长扬科技(北京)股份有限公司 | Video acquisition equipment and method |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005033239A (en) * | 2003-07-07 | 2005-02-03 | Hitachi Ltd | Method of accessing network compatible facility/equipment, and apparatus thereof |
US20070204316A1 (en) * | 2006-02-24 | 2007-08-30 | Kabushiki Kaisha Toshiba | Video surveillance system |
JP2008289184A (en) * | 2008-07-02 | 2008-11-27 | Oki Electric Ind Co Ltd | Communication control apparatus and communication control system |
CN102905165A (en) * | 2012-10-24 | 2013-01-30 | 安徽博微广成信息科技有限公司 | Video networking service front-end computer |
US20150010016A1 (en) * | 2013-07-02 | 2015-01-08 | Dell Products L.P. | System and method for layer 3 proxy routing |
CN104994067A (en) * | 2015-05-25 | 2015-10-21 | 南京邮电大学 | System and method for SIP network to access RTSP monitoring network |
CN105898237A (en) * | 2016-05-30 | 2016-08-24 | 安徽四创电子股份有限公司 | System capable of dynamically integrating social monitoring resources and integration method of the system |
CN109151084A (en) * | 2017-06-15 | 2019-01-04 | 中兴通讯股份有限公司 | File transmitting method and device, system, CGN equipment |
CN111935463A (en) * | 2020-10-16 | 2020-11-13 | 融智通科技(北京)股份有限公司 | Method for viewing real-time monitoring video through webpage without control piece and low delay |
CN112866303A (en) * | 2021-04-25 | 2021-05-28 | 武汉中科通达高新技术股份有限公司 | Method and device for managing cascade media transmission link |
WO2021109785A1 (en) * | 2019-12-06 | 2021-06-10 | 中兴通讯股份有限公司 | Multimedia walling method, client and monitoring platform |
CN113301288A (en) * | 2021-05-15 | 2021-08-24 | 苏州智能交通信息科技股份有限公司 | Traffic monitoring video resource integration method, system, platform and storage medium |
CN113453025A (en) * | 2020-03-26 | 2021-09-28 | 杭州海康威视***技术有限公司 | Data acquisition method and device |
CN114125005A (en) * | 2021-11-26 | 2022-03-01 | 日立楼宇技术(广州)有限公司 | Data processing method and device based on intelligent building system |
-
2022
- 2022-05-27 CN CN202210585964.1A patent/CN114679630B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005033239A (en) * | 2003-07-07 | 2005-02-03 | Hitachi Ltd | Method of accessing network compatible facility/equipment, and apparatus thereof |
US20070204316A1 (en) * | 2006-02-24 | 2007-08-30 | Kabushiki Kaisha Toshiba | Video surveillance system |
JP2008289184A (en) * | 2008-07-02 | 2008-11-27 | Oki Electric Ind Co Ltd | Communication control apparatus and communication control system |
CN102905165A (en) * | 2012-10-24 | 2013-01-30 | 安徽博微广成信息科技有限公司 | Video networking service front-end computer |
US20150010016A1 (en) * | 2013-07-02 | 2015-01-08 | Dell Products L.P. | System and method for layer 3 proxy routing |
CN104994067A (en) * | 2015-05-25 | 2015-10-21 | 南京邮电大学 | System and method for SIP network to access RTSP monitoring network |
CN105898237A (en) * | 2016-05-30 | 2016-08-24 | 安徽四创电子股份有限公司 | System capable of dynamically integrating social monitoring resources and integration method of the system |
CN109151084A (en) * | 2017-06-15 | 2019-01-04 | 中兴通讯股份有限公司 | File transmitting method and device, system, CGN equipment |
WO2021109785A1 (en) * | 2019-12-06 | 2021-06-10 | 中兴通讯股份有限公司 | Multimedia walling method, client and monitoring platform |
CN113453025A (en) * | 2020-03-26 | 2021-09-28 | 杭州海康威视***技术有限公司 | Data acquisition method and device |
CN111935463A (en) * | 2020-10-16 | 2020-11-13 | 融智通科技(北京)股份有限公司 | Method for viewing real-time monitoring video through webpage without control piece and low delay |
CN112866303A (en) * | 2021-04-25 | 2021-05-28 | 武汉中科通达高新技术股份有限公司 | Method and device for managing cascade media transmission link |
CN113301288A (en) * | 2021-05-15 | 2021-08-24 | 苏州智能交通信息科技股份有限公司 | Traffic monitoring video resource integration method, system, platform and storage medium |
CN114125005A (en) * | 2021-11-26 | 2022-03-01 | 日立楼宇技术(广州)有限公司 | Data processing method and device based on intelligent building system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116016995A (en) * | 2022-12-02 | 2023-04-25 | 长扬科技(北京)股份有限公司 | Video acquisition equipment and method |
CN116016995B (en) * | 2022-12-02 | 2023-08-22 | 长扬科技(北京)股份有限公司 | Video acquisition equipment and method |
Also Published As
Publication number | Publication date |
---|---|
CN114679630B (en) | 2022-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109167960B (en) | Method and system for processing video stream data | |
CN110121059B (en) | Monitoring video processing method, device and storage medium | |
CN112995234B (en) | Media transmission link management method and device | |
CN109327493A (en) | A kind of remote medical monitoring system based on cloud and monitoring method | |
CN109379254B (en) | Network connection detection method and system based on video conference | |
CN110166433B (en) | Method and system for acquiring video data | |
CN105828046B (en) | A kind of transmission method and device of data flow | |
CN110022307A (en) | A kind of control method of monitoring device and monitoring access server | |
CN108965220B (en) | Method and system for synchronizing conference control right | |
CN114679630B (en) | Data transmission method, device and computer readable storage medium | |
CN109379209B (en) | Method and device for upgrading storage service of video network | |
CN110740289B (en) | System and method for acquiring alarm | |
CN110769310A (en) | Video processing method and device based on video network | |
CN110740300B (en) | Multimedia data transmission method, system, client and video monitoring equipment | |
CN103929623A (en) | Method for processing video data in video monitoring system | |
CN110113558B (en) | Data processing method, device, system and computer readable storage medium | |
CN110475100A (en) | A kind of method and device of monitoring management | |
CN110830763A (en) | Monitoring video inspection method and device | |
CN101431669A (en) | Video monitoring system and control method for establishing media stream transmission connection in the same | |
CN108810475A (en) | A kind of Android video monitoring apparatus based on Onvif standards and Sip agreements | |
CN111147817B (en) | Video processing method and device, electronic equipment and storage medium | |
CN111093047A (en) | Video call connection establishing method and device, electronic equipment and storage medium | |
CN110048990B (en) | Data processing method, equipment and server | |
CN111212043A (en) | Multimedia file generation method and device | |
WO2017142175A1 (en) | Method and device for transmitting/receiving free viewpoint broadcast |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |