Media data transmission methods, devices and electronic equipment
By establishing a fixed port mapping relationship between the gateway device and the media server, the problems of port resource waste and conflict in the video surveillance system are solved, realizing reasonable port management and improving system performance, enhancing security and reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202411720048.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Current video surveillance systems suffer from problems such as wasted port resources, port conflicts, and uneven port allocation. As security monitoring systems expand in scale and the number of devices increases, challenges arise in network resource allocation and management.
By establishing a fixed port mapping relationship between the gateway device and the media server, the IP address and port information of the media server are received, the IP address and port information of the target media service are sent to the network camera, and a unique pull address is generated to ensure the correct transmission of media data streams and avoid crosstalk.
Reduce port resource waste, reduce port conflicts, achieve effective port convergence, improve system performance, reduce network attack surface, enhance system security, reduce manual intervention, and reduce operation and maintenance costs.
Smart Images

Figure CN119788813B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital media technology, and in particular to a media data transmission method, apparatus and electronic device. Background Technology
[0002] GB / T 28181 is an important standard in China's security field. This standard mainly specifies the technical requirements for information transmission, exchange, and control in public security video surveillance network systems, including interconnection structure, communication protocol structure, basic technical requirements, security requirements, and control and transmission processes. GB / T 28181 is widely used in video surveillance systems.
[0003] Current video surveillance systems suffer from problems such as wasted port resources, port conflicts, and uneven port allocation. As the scale of security monitoring systems expands and the number of devices increases dramatically, the number of media service ports that need to be managed and allocated also increases accordingly, bringing many challenges to network resource allocation and management. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a media data transmission method, apparatus, and electronic device that overcomes or at least partially solves the above problems.
[0005] In a first aspect, embodiments of this application provide a media data transmission method applied to a gateway device, comprising:
[0006] The system receives the Internet Protocol IP address and port information corresponding to the target media service sent by the media server. The target media service is one of multiple media services provided by the media server, and each media service corresponds to a fixed port.
[0007] The IP address and port information corresponding to the target media service are sent to the network camera IPC. The IP address and port information corresponding to the target media service are used to guide the IPC to transmit the target media data stream to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The source identifier of the target media data stream is generated based on the device identifier corresponding to the IPC and the target stream identifier.
[0008] Provide the service provider with a pull address carrying the device identifier and the target stream identifier, wherein the device identifier and the target stream identifier are provided by the target media service;
[0009] In response to the pull address sent by the service provider, the service provider requests the target media data stream from the target media service, and the target media service provides media data to the service provider.
[0010] Secondly, embodiments of this application provide a media data transmission method applied to a media server, comprising:
[0011] Send the Internet Protocol IP address and port information corresponding to the target media service to the gateway device. The target media service is one of multiple media services provided by the media server, and each media service corresponds to a fixed port.
[0012] The network camera IPC receives a target media data stream transmitted based on the IP address and port information corresponding to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The IP address and port information corresponding to the target media service are sent from the gateway device to the IPC.
[0013] Generate the source identifier corresponding to the target media data stream based on the device identifier corresponding to the IPC and the target stream identifier;
[0014] According to the pull request sent by the gateway device to the target media service to pull the target media data stream, the target media data stream is sent to the gateway device. The pull request is sent by the gateway device after receiving the pull address carrying the device identifier and the target stream identifier provided by the service provider and determining the target media service. The target media service is determined based on the device identifier, the target stream identifier and the association relationship, and the association relationship indicates that the device identifier, the target stream identifier and the target media service are associated.
[0015] Thirdly, embodiments of this application provide a media data transmission apparatus, applied to a gateway device, comprising:
[0016] The first receiving module is used to receive the Internet Protocol IP address and port information corresponding to the target media service sent by the media server. The target media service is one of a plurality of media services provided by the media server, and each media service corresponds to a fixed port.
[0017] The distribution module is used to distribute the IP address and port information corresponding to the target media service to the network camera IPC. The IP address and port information corresponding to the target media service are used to guide the IPC to transmit the target media data stream to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The source identifier of the target media data stream is generated based on the device identifier corresponding to the IPC and the target stream identifier.
[0018] A module is provided to provide the service provider with a pull address carrying the device identifier and the target stream identifier, wherein the device identifier and the target stream identifier are provided by the target media service;
[0019] The request module is used to respond to the pull address sent by the business party, request the target media data stream from the target media service, and the target media service provides media data to the business party.
[0020] Fourthly, embodiments of this application provide a media data transmission apparatus, applied to a media server, comprising:
[0021] The second sending module is used to send the Internet Protocol IP address and port information corresponding to the target media service to the gateway device. The target media service is one of the multiple media services provided by the media server, and each media service corresponds to a fixed port.
[0022] The fourth receiving module is used to receive the target media data stream transmitted by the network camera IPC based on the IP address and port information corresponding to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The IP address and port information corresponding to the target media service are sent to the IPC by the gateway device.
[0023] The generation module is used to generate the source identifier corresponding to the target media data stream based on the device identifier corresponding to the IPC and the target stream identifier;
[0024] The third sending module is used to send the target media data stream to the gateway device according to the pull request sent by the gateway device to the target media service. The pull request is sent by the gateway device after receiving a pull address carrying the device identifier and the target stream identifier provided by the service provider and determining the target media service. The target media service is determined based on the device identifier, the target stream identifier and the association relationship, and the association relationship indicates that the device identifier, the target stream identifier and the target media service are associated with the target media service.
[0025] Fifthly, embodiments of this application provide an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the media data transmission method described in the first or second aspect.
[0026] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the media data transmission method described in the first or second aspect.
[0027] The technical solution of this application embodiment, when the target media service has a fixed media port, receives the IP address and fixed port information provided by the target media service, sends the IP address and fixed port information to the IPC, and the IPC provides the target media data stream to the target media service through the IP address and fixed port; generates a pull address based on the unique identifier corresponding to the target media data stream to distinguish the source and provides it to the service party; responds to the service party's request, pulls the appropriate media data from the fixed port of the target media service based on the unique identifier, which can provide the correct media data stream and avoid cross-streaming.
[0028] This application can reduce the waste of port resources and port conflicts while ensuring the normal transmission of media data streams. The reasonable management and optimization of media service ports can achieve effective port convergence and improve system performance. At the same time, it can effectively reduce the network attack surface, enhance system security, reduce manual intervention, and reduce operation and maintenance costs. Attached Figure Description
[0029] Figure 1 This illustration shows the media data transmission method provided in the embodiments of this application. Figure 1 ;
[0030] Figure 2 This illustration shows the media data transmission method provided in the embodiments of this application. Figure 2 ;
[0031] Figure 3 This diagram illustrates the specific interactive process of transmitting media data provided in the embodiments of this application.
[0032] Figure 4 This illustration shows the media data transmission apparatus provided in the embodiments of this application. Figure 1 ;
[0033] Figure 5 This illustration shows the media data transmission apparatus provided in the embodiments of this application. Figure 2 ;
[0034] Figure 6 This is a structural block diagram illustrating the electronic device provided in the embodiments of this application. Detailed Implementation
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0037] In the various embodiments of this application, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0038] Currently, the GB / T 28181 standard is widely used in the field of video surveillance. With the expansion of security monitoring systems, port management and allocation have become urgent problems to be solved. This application can achieve effective port convergence and improve system performance by reasonably managing and optimizing the GB / T28181 media service ports.
[0039] This application provides a media data transmission method applied to a gateway device, such as... Figure 1 As shown, the method includes:
[0040] Step 101: Receive the Internet Protocol IP address and port information corresponding to the target media service sent by the media server. The target media service is one of multiple media services provided by the media server, and each media service corresponds to a fixed port.
[0041] In this embodiment, the media server provides multiple media services, and the target media service is one of these services. Each media service on the media server corresponds to a fixed port. Based on the one-to-one correspondence between media services and fixed ports, ports can be rationally allocated and used, reducing port conflicts. For the target media service, after fixing the media port, the receiving port of the target media service can be fixed, reducing port resource waste through port reuse. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) can run on the fixed port.
[0042] The gateway device communicates with the media server and receives the IP (Internet Protocol) address and port information corresponding to the target media service sent by the media server. The port information provided by the target media service is the information of its corresponding fixed port.
[0043] Step 102: Send the IP address and port information corresponding to the target media service to the network camera IPC. The IP address and port information corresponding to the target media service are used to guide the IPC to transmit the target media data stream to the target media service. The target media data stream carries the target stream identifier provided by the IPC to identify the target media data stream. The source identifier of the target media data stream is generated based on the device identifier and target stream identifier corresponding to the IPC.
[0044] An IPC (Internet Protocol Camera) is a new generation of camera that combines traditional cameras with network technology. It can transmit video, audio, alarm and control signals over a network and be managed by a network monitoring host. IPCs can be combined with routers, switches, NVRs (Network Video Recorders) and other devices to form a monitoring system.
[0045] The gateway device distributes the IP address and port information corresponding to the target media service to the IPC. Based on the IP address and port information of the target media service, the IPC provides the target media data stream to the target media service. The provided target media data stream can be an audio stream or a video stream. The IPC can also provide a target stream identifier to identify the target media data stream. Based on the target stream identifier, the target media data stream can be distinguished from other media data streams provided by the current IPC.
[0046] For the target media data stream provided by the IPC to the target media service, its corresponding source identifier is generated based on the device identifier corresponding to the IPC and the target stream identifier provided by the IPC to identify the target media data stream. The device identifier is used to indicate the device providing the target media data stream, and the target stream identifier is used to indicate a certain data stream provided by the IPC. The source identifier, together with these two, can form a unique identifier that distinguishes the source of the stream.
[0047] Step 103: Provide the service provider with a pull address that carries the device identifier and the target stream identifier, which are provided by the target media service.
[0048] After determining the source identifier of the target media data stream, the target media service can report the device identifier and target stream identifier associated with the target media service to the gateway device. The gateway device generates a pull address that is associated with the target media service and matches the target media data stream based on the device identifier and target stream identifier, and provides the pull address to the service provider so that the service provider can pull media data based on the pull address.
[0049] Step 104: In response to the pull address sent by the business party, request the target media data stream from the target media service, and the target media service provides the media data to the business party.
[0050] After providing a streaming address to the service provider, the gateway device, in response to receiving the streaming address sent by the service provider, requests the target media data stream that matches the streaming address from the associated target media service, so that the target media service can provide the required media data to the service provider.
[0051] In the above implementation scheme of this application, when the target media service has a fixed media port, the system receives the IP address and fixed port information provided by the target media service, and sends the IP address and fixed port information to the IPC. The IPC then provides the target media data stream to the target media service through the IP address and fixed port. Based on the unique identifier corresponding to the target media data stream to distinguish the source, a pull address is generated and provided to the service provider. In response to the service provider's request, the system pulls the appropriate media data from the fixed port of the target media service based on the unique identifier, which can provide the correct media data stream and avoid cross-streaming.
[0052] This application can reduce the waste of port resources and port conflicts while ensuring the normal transmission of media data streams. The reasonable management and optimization of media service ports can achieve effective port convergence and improve system performance. At the same time, it can effectively reduce the network attack surface, enhance system security, reduce manual intervention, and reduce operation and maintenance costs.
[0053] In an optional embodiment of this application, the method further includes:
[0054] The gateway device sends a first request to the IPC to obtain the synchronization source connection identifier (SSRC); receives the SSRC corresponding to the IPC from the IPC; and establishes a mapping relationship between the device identifier corresponding to the IPC and the SSRC.
[0055] The first acquisition request is sent to the IPC via the upper-level platform and the lower-level platform in sequence. The SSRC corresponding to the IPC is fed back to the gateway device via the lower-level platform and the upper-level platform in sequence. The IP address and port information corresponding to the target media service are sent to the IPC via the upper-level platform and the lower-level platform in sequence.
[0056] In this embodiment, the upper-level and lower-level platforms are cascaded platforms under the GB / T 28181 standard. Lower-level platforms typically need to be cascaded with the upper-level platform to achieve data sharing and interoperability. During the cascading process, the lower-level platform registers its local monitoring device information (such as IPC device information) with the upper-level platform. The upper-level platform can obtain the device information of the lower-level platform by sending a directory query request. The lower-level platform needs to respond to the upper-level platform's requests and provide adaptation information.
[0057] The gateway device communicates with the IPC (Internet Protocol Device) based on the upper-level platform and the lower-level platform. The IPC is a device that communicates with the lower-level platform under the GB / T 28181 standard. The gateway device sends a first acquisition request to the IPC sequentially through the upper-level platform and the lower-level platform, and receives the SSRC (Synchronization Source Identifier) corresponding to the IPC from the lower-level platform and the upper-level platform. The SSRC is an important concept in real-time transport protocols, used to identify the source of a data stream. After obtaining the SSRC corresponding to the IPC, the gateway device establishes a mapping relationship between the device identifier of the IPC and the SSRC, and stores it in memory or instantiates it in a database.
[0058] When the gateway device sends the IP address and port information corresponding to the target media service to the IPC, it needs to go through the upper-level platform and the lower-level platform in sequence. That is, the gateway device sends the IP address and port information corresponding to the target media service to the upper-level platform, the upper-level platform sends it to the lower-level platform, and the lower-level platform sends the IP address and port information corresponding to the target media service to the IPC.
[0059] Since the SSRC is used to identify the source of a data stream, the target media data stream transmitted by the IPC to the target media service carries not only the target stream identifier used to identify the target media data stream, but also the SSRC corresponding to the IPC. After receiving the target media data stream, the target media service can obtain the SSRC corresponding to the IPC. The method also includes:
[0060] The gateway device receives a second acquisition request sent by the media server, which carries the SSRC corresponding to the IPC. The second acquisition request indicates that the device identifier is to be acquired and is provided by the target media service.
[0061] The gateway device determines the device identifier associated with the SSRC corresponding to the IPC based on the mapping relationship, and feeds back the device identifier to the target media service on the media server, providing the target media service with a device identifier for generating the source identifier.
[0062] After obtaining the SSRC corresponding to the IPC based on the target media data stream, the target media service generates a second acquisition request carrying the SSRC corresponding to the IPC and indicating the device identifier to be acquired, and sends the second acquisition request to the gateway device. The gateway device receives the second acquisition request carrying the SSRC corresponding to the IPC sent by the target media service on the media server, determines the device identifier corresponding to the IPC based on the stored mapping relationship between the device identifier corresponding to the IPC and the SSRC, and provides the device identifier to the target media service on the media server, so that the target media service can obtain the required device identifier.
[0063] For the target media service, after obtaining the device identifier, it generates the source identifier of the target media data stream based on the device identifier and the target stream identifier provided by the IPC carried by the target media data stream. Since the device identifier indicates the device providing the target media data stream and the target stream identifier indicates a specific data stream provided by the IPC, the source identifier generated based on the above two can provide a unique identifier to distinguish the source of the stream.
[0064] In the above implementation scheme, after the gateway device requests and obtains the SSRC corresponding to the IPC, it establishes a mapping relationship between the device identifier corresponding to the IPC and the SSRC. Based on this mapping relationship, it provides a device identifier for the target media service, which enables the target media service to generate a unique identifier that distinguishes the stream source based on the device identifier and the target stream identifier.
[0065] The following describes the process of providing a streaming address to a service provider. When providing a streaming address to a service provider that carries the device identifier and the target stream identifier, the process includes:
[0066] In response to the pull address acquisition request sent by the service provider, determine the device identifier corresponding to the IPC that provides the target media data stream and the target stream identifier that identifies the target media data stream;
[0067] A pull address associated with the target media data stream is generated based on the device identifier and the target stream identifier, and the pull address is provided to the business party.
[0068] For the target media data stream that the target media service can provide, its source identifier (a unique identifier that distinguishes the source of the stream) is generated based on the device identifier and the target stream identifier. The target media service can report the device identifier and the target stream identifier associated with the target media data stream to the gateway device. Based on the received device identifier and target stream identifier, the gateway device establishes the association relationship between the device identifier, the target stream identifier and the target media service. This association relationship is used to characterize the target media data stream that the target media service can provide with the associated device identifier and target stream identifier.
[0069] After obtaining the device identifier and target stream identifier provided by the target media service, the gateway device responds to the pull address acquisition request sent by the service provider, generates a pull address associated with the target media data stream based on the device identifier and target stream identifier, and provides the pull address to the service provider. The pull address is custom-generated by the gateway device based on the device identifier, target stream identifier, and the gateway device's own device information.
[0070] The gateway device stores the association between the device identifier, the target stream identifier, and the target media service. When requesting the target media data stream from the target media service in response to the pull address sent by the service provider, it includes:
[0071] Based on the association, the device identifier and target stream identifier carried by the pull address, the target media service is determined; based on the IP address and port information corresponding to the target media service, the target media data stream matching the device identifier and target stream identifier is pulled from the target media service and fed back to the service provider.
[0072] After receiving a pull address carrying a device identifier and a target stream identifier from a service provider (e.g., a user terminal), the gateway device determines the service provider's media data request from the target media service based on the stored association between the device identifier, target stream identifier, and target media service. Then, based on the IP address and port information corresponding to the target media service, the gateway device sends a pull request to the target media service, carrying the device identifier and target stream identifier, to pull the target media data stream matching the device identifier and target stream identifier from the target media service, and provides the pulled target media data stream to the service provider.
[0073] Because the streaming address carries a unique identifier (device identifier and target stream identifier) to distinguish the streaming source, it can ensure that the target media service provides the correct media stream and prevent cross-streaming.
[0074] In the above implementation scheme, after the gateway device provides the streaming address to the service provider, it responds to the streaming address sent by the service provider, locates the target media service based on the information carried in the streaming address, and requests media data from the target media service, which can ensure that the correct media stream is provided to the service provider.
[0075] The above describes media data transmission methods applied to gateway devices. The following section introduces media data transmission methods applied to media servers. Figure 2 As shown:
[0076] Step 201: Send the Internet Protocol IP address and port information corresponding to the target media service to the gateway device. The target media service is one of multiple media services provided by the media server, and each media service corresponds to a fixed port.
[0077] A media server can provide multiple media services, with the target media service being one of them. Each media service on the media server corresponds to a fixed port. Based on this one-to-one correspondence between media services and fixed ports, ports can be allocated and used efficiently, reducing port conflicts. After the target media service starts, the media server sends the target media service's IP address and its corresponding fixed port information to the gateway device.
[0078] Step 202: Receive the target media data stream transmitted by the network camera IPC based on the IP address and port information corresponding to the target media service. The target media data stream carries the target stream identifier provided by the IPC to identify the target media data stream. The IP address and port information corresponding to the target media service are sent to the IPC by the gateway device.
[0079] After the media server sends the IP address and port information corresponding to the target media service to the gateway device, the gateway device distributes the corresponding IP address and port information to the IPC. Specifically, the gateway device distributes the IP address and port information to the upper-level platform, the upper-level platform distributes it to the lower-level platform, and the lower-level platform distributes it to the IPC, thus providing the IP address and port information of the target media service to the IPC sequentially through the upper-level and lower-level platforms.
[0080] IPC provides a target media data stream to the target media service based on the IP address and port information corresponding to the target media service. The provided target media data stream can be an audio stream or a video stream. IPC can also provide a target stream identifier to identify the target media data stream. Based on the target stream identifier, the target media data stream can be distinguished from other media data streams provided by the current IPC.
[0081] Step 203: Generate the source identifier of the target media data stream based on the device identifier and target stream identifier corresponding to the IPC.
[0082] After obtaining the target media data stream carrying the target stream identifier, the target media service on the media server generates the source identifier of the target media data stream based on the device identifier corresponding to the IPC and the target stream identifier. The target stream identifier is provided by the IPC to the target media data stream, and the device identifier is obtained by the target media service through the gateway device. The device identifier indicates the device providing the target media data stream, and the target stream identifier indicates a specific data stream provided by the IPC. The source identifier, along with these two, forms a unique identifier that distinguishes the stream source.
[0083] Step 204: Based on the pull request sent by the gateway device to the target media service to pull the target media data stream, send the target media data stream to the gateway device. The pull request is sent by the gateway device after receiving the pull address carrying the device identifier and the target stream identifier provided by the service provider and determining the target media service. The target media service is determined based on the device identifier, the target stream identifier and the association relationship. The association relationship indicates that the device identifier, the target stream identifier and the target media service are associated.
[0084] After determining the source identifier of the target media data stream, the target media service can report the device identifier and target stream identifier associated with the target media service to the gateway device. Based on the received device identifier and target stream identifier, the gateway device establishes an association between the device identifier, target stream identifier and target media service. This association is used to characterize the target media service as being able to provide a target media data stream associated with the device identifier and target stream identifier.
[0085] The gateway device can also generate a pull address that is associated with the target media service and matches the target media data stream based on the device identifier and the target stream identifier. This pull address is then provided to the service provider, enabling them to pull media data from the target media service using the pull address. After providing the pull address to the service provider, the gateway device uses the association relationship to locate the target media service based on the pull address sent by the service provider. Then, based on the IP address and port information corresponding to the target media service, it sends a pull request to the target media service.
[0086] The target media service, based on the pull request sent by the gateway device carrying the device identifier and the target stream identifier, returns the target media data stream that matches the device identifier and the target stream identifier to the gateway device, and the gateway device provides the pulled target media data stream to the service provider.
[0087] The above implementation scheme reports the IP address and fixed port information corresponding to the target media service to the gateway device. After the gateway device provides the IP address and fixed port information to the IPC, it receives the target media data stream sent by the IPC. Based on the IPC device identifier and the target stream identifier, it generates a unique identifier corresponding to the target media data stream to distinguish the source of the stream. After receiving a pull request carrying the unique identifier, it provides the target media data stream to the gateway device, which can provide the correct media data stream and avoid cross-streaming.
[0088] Furthermore, by using fixed media ports, the waste of port resources and port conflicts can be reduced while ensuring the normal transmission of media data streams. This achieves effective port convergence and improves system performance. At the same time, it can effectively reduce the network attack surface, enhance system security, reduce manual intervention, and lower operation and maintenance costs.
[0089] In an optional embodiment, the gateway device stores a mapping relationship between the device identifier corresponding to the IPC and the synchronization source connection identifier (SSRC). The target media data stream transmitted by the IPC to the target media service carries the SSRC corresponding to the IPC. The method further includes:
[0090] Send a second retrieval request to the gateway device, carrying the SSRC corresponding to the IPC. The second retrieval request indicates that the device identifier is to be retrieved and is provided by the target media service.
[0091] The receiving gateway device receives the device identifier associated with the SSRC corresponding to the IPC, which is used to generate the source identifier, based on the mapping relationship.
[0092] When generating a unique identifier for the source-specific media data stream, the target media service uses an IPC device identifier provided by the gateway device. The gateway device sends a first retrieval request to the IPC to obtain the SSRC corresponding to the IPC. After obtaining the SSRC, it establishes and stores a mapping between the device identifier and the SSRC. Since the target media data stream carries the SSRC corresponding to the IPC, the target media service, after obtaining the SSRC, generates a second retrieval request carrying the SSRC and indicating the need to retrieve the device identifier, and sends this second retrieval request to the gateway device. The gateway device then receives the device identifier corresponding to the IPC, based on the mapping relationship.
[0093] After obtaining the device identifier, the target media service generates the source identifier of the target media data stream based on the device identifier and the target stream identifier carried by the target media data stream. Since the device identifier indicates the device providing the target media data stream and the target stream identifier indicates a specific data stream provided by the IPC, the source identifier generated based on the above two can provide a unique identifier to distinguish the source of the stream.
[0094] The above implementation process involves sending a request to the gateway device based on the SSRC corresponding to the IPC, receiving the device identifier fed back by the gateway device according to the mapping relationship, and generating a unique identifier for the target media data stream based on the device identifier and the target stream identifier, thereby ensuring the provision of correct media data.
[0095] The following section describes the process of transmitting media data in scenarios using the GB / T 28181 protocol through a specific interactive flow. Figure 3 As shown:
[0096] The media server reports the IP address and fixed port information of the target media service to the gateway device. After receiving the IP address and fixed port information, the gateway device provides the IP address and fixed port information to the IPC via the upper-level platform and the lower-level platform (the two platforms belong to the cascaded platform under the GB / T 28181 standard); and sends the first SSRC acquisition request to the IPC via the upper-level platform and the lower-level platform, and receives the SSRC corresponding to the IPC provided by the IPC and transmitted by the lower-level platform and the upper-level platform; after obtaining the SSRC corresponding to the IPC, the gateway device establishes a mapping relationship between the SSRC corresponding to the IPC and the device identifier.
[0097] IPC provides target media data streams to the target media service based on the target media service's IP address and fixed port information. The target media data streams carry the target stream identifier provided by IPC and the corresponding SSRC of IPC.
[0098] The target media service sends a second retrieval request carrying the SSRC corresponding to the IPC to the gateway device, and receives the device identifier associated with the SSRC corresponding to the IPC from the gateway device based on the mapping relationship. Based on the retrieved device identifier corresponding to the IPC and the target stream identifier, the target media service generates the source identifier of the target media data stream, and reports the device identifier and target stream identifier associated with the target media data stream to the gateway device.
[0099] Based on the received device identifier and target stream identifier, the gateway device establishes the association between the device identifier, target stream identifier and target media service. Based on the pull stream address acquisition request sent by the service party, it generates a pull stream address associated with the target media data stream according to the device identifier and target stream identifier, and provides the pull stream address to the service party.
[0100] After receiving the pull address carrying the device identifier and target stream identifier provided by the service provider, the gateway device locates the target media service based on the association relationship, requests the target media data stream that matches the device identifier and target stream identifier from the target media service, and sends the target media data stream to the service provider.
[0101] The solutions provided in this application can be applied to the following scenarios: large-scale video surveillance systems, remote video surveillance in multi-layered network structures, security systems in campuses or corporate parks, multimedia monitoring in intelligent buildings, public safety command centers, real-time video surveillance in intelligent transportation systems, portable monitoring systems in emergency management, and smart home security systems. By fixing the ports of media services, in complex network structures, especially when public network and internal network communication is involved and public network port resources are limited, ports can be managed and fixed to ensure network port convergence, reducing port resource consumption. This allows for the rational allocation and use of ports within the system, resolving issues such as port waste, port conflicts, and uneven port allocation in video surveillance systems. Simultaneously, it can upgrade network port security capabilities, addressing current server network port occupancy and network security issues.
[0102] This application also provides a media data transmission device, applied to a gateway device, such as... Figure 4 Shown, including:
[0103] The first receiving module 401 is used to receive the Internet Protocol IP address and port information corresponding to the target media service sent by the media server. The target media service is one of a plurality of media services provided by the media server, and each media service corresponds to a fixed port.
[0104] The sending module 402 is used to send the IP address and port information corresponding to the target media service to the network camera IPC. The IP address and port information corresponding to the target media service are used to guide the IPC to transmit the target media data stream to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The source identifier of the target media data stream is generated based on the device identifier corresponding to the IPC and the target stream identifier.
[0105] Module 403 is provided to provide the service provider with a pull address carrying the device identifier and the target stream identifier, wherein the device identifier and the target stream identifier are provided by the target media service;
[0106] The request module 404 is used to respond to the pull address sent by the service provider, request the target media data stream from the target media service, and the target media service provides media data to the service provider.
[0107] Optionally, the device further includes:
[0108] The first sending module is used to send a first acquisition request to the IPC, indicating that it should acquire the Synchronization Source Connection Identifier (SSRC).
[0109] The second receiving module is used to receive the SSRC corresponding to the IPC fed back by the IPC.
[0110] A module is established to create a mapping relationship between the device identifier corresponding to the IPC and the SSRC;
[0111] The first acquisition request is sent to the IPC via the upper-level platform and the lower-level platform in sequence, and the SSRC corresponding to the IPC is fed back to the gateway device via the lower-level platform and the upper-level platform in sequence.
[0112] The IP address and port information corresponding to the target media service are sent to the IPC sequentially via the upper-level platform and the lower-level platform.
[0113] Optionally, the target media data stream transmitted by the IPC to the target media service carries the SSRC corresponding to the IPC, and the device further includes:
[0114] The third receiving module is used to receive a second acquisition request sent by the media server, carrying the SSRC corresponding to the IPC. The second acquisition request indicates the acquisition of the device identifier and is provided by the target media service.
[0115] The feedback module is used to determine the device identifier associated with the SSRC corresponding to the IPC according to the mapping relationship, and feed the device identifier back to the media server to provide the target media service with a device identifier for generating the source identifier.
[0116] Optionally, the providing module includes:
[0117] The first determining submodule is used to respond to the pull address acquisition request sent by the service party to determine the device identifier corresponding to the IPC that provides the target media data stream and the target stream identifier that identifies the target media data stream;
[0118] A generation and provision submodule is used to generate a pull address associated with the target media data stream based on the device identifier and the target stream identifier, and to provide the pull address to the service provider.
[0119] Optionally, the gateway device stores the association between the device identifier, the target stream identifier, and the target media service; the request module includes:
[0120] The second determining submodule is used to determine the target media service based on the association, the device identifier carried by the pull address, and the target stream identifier;
[0121] The pull feedback submodule is used to pull the target media data stream that matches the device identifier and the target stream identifier from the target media service and feed it back to the service provider.
[0122] This application also provides a media data transmission device, applied to a media server, such as... Figure 5 Shown, including:
[0123] The second sending module 501 is used to send the Internet Protocol IP address and port information corresponding to the target media service to the gateway device. The target media service is one of a plurality of media services provided by the media server, and each media service corresponds to a fixed port.
[0124] The fourth receiving module 502 is used to receive the target media data stream transmitted by the network camera IPC based on the IP address and port information corresponding to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The IP address and port information corresponding to the target media service are sent to the IPC by the gateway device.
[0125] The generation module 503 is used to generate the source identifier corresponding to the target media data stream based on the device identifier corresponding to the IPC and the target stream identifier;
[0126] The third sending module 504 is used to send the target media data stream to the gateway device according to the pull request sent by the gateway device to the target media service. The pull request is sent by the gateway device after receiving a pull address carrying the device identifier and the target stream identifier provided by the service provider and determining the target media service. The target media service is determined based on the device identifier, the target stream identifier and the association relationship, and the association relationship indicates that the device identifier, the target stream identifier and the target media service are associated with the target media service.
[0127] Optionally, the gateway device stores a mapping relationship between the device identifier corresponding to the IPC and the Synchronization Source Connection Identifier (SSRC), and the target media data stream transmitted by the IPC to the target media service carries the SSRC corresponding to the IPC. The device further includes:
[0128] The fourth sending module is used to send a second acquisition request carrying the SSRC corresponding to the IPC to the gateway device. The second acquisition request indicates the acquisition device identifier and is provided by the target media service.
[0129] The fifth receiving module is used to receive the device identifier used to generate the source identifier, which is associated with the SSRC corresponding to the IPC and fed back by the gateway device based on the mapping relationship.
[0130] As for the device embodiment, since it is basically similar to the method embodiments on the gateway device side and the media server side described above, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiment.
[0131] On the other hand, embodiments of this application also provide an electronic device, including a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the media data transmission method on the gateway device side or the media server side described above.
[0132] For example, Figure 6 A schematic diagram of the physical structure of an electronic device is shown.
[0133] like Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions stored in the memory 630. The processor 610 is used to execute various processes of the media data transmission method on the gateway device side or media server side according to the embodiments of this application, which will not be described in detail here.
[0134] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0135] In another aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the media data transmission methods provided in the above-described embodiments on the gateway device side or media server side.
[0136] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A media data transmission method, applied to a gateway device, characterized in that, include: The system receives the Internet Protocol IP address and port information corresponding to the target media service sent by the media server. The target media service is one of multiple media services provided by the media server, and each media service corresponds to a fixed port. The IP address and port information corresponding to the target media service are sent to the network camera IPC. The IP address and port information corresponding to the target media service are used to guide the IPC to transmit the target media data stream to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The source identifier of the target media data stream is generated based on the device identifier corresponding to the IPC and the target stream identifier. Provide the service provider with a pull address carrying the device identifier and the target stream identifier, wherein the device identifier and the target stream identifier are provided by the target media service; In response to the pull address sent by the service provider, the service provider requests the target media data stream from the target media service, and the target media service provides media data to the service provider.
2. The method according to claim 1, characterized in that, The method further includes: Send a first acquire request to the IPC, indicating that it should acquire the Synchronization Source Connection Identifier (SSRC); Receive the SSRC corresponding to the IPC fed back by the IPC; Establish a mapping relationship between the device identifier corresponding to the IPC and the SSRC; The first acquisition request is sent to the IPC via the upper-level platform and the lower-level platform in sequence, and the SSRC corresponding to the IPC is fed back to the gateway device via the lower-level platform and the upper-level platform in sequence. The IP address and port information corresponding to the target media service are sent to the IPC sequentially via the upper-level platform and the lower-level platform.
3. The method according to claim 2, characterized in that, The target media data stream transmitted by the IPC to the target media service carries the SSRC corresponding to the IPC, and the method further includes: Receive a second acquisition request sent by the media server, carrying the SSRC corresponding to the IPC, wherein the second acquisition request indicates the acquisition of the device identifier and is provided by the target media service; The device identifier associated with the SSRC corresponding to the IPC is determined according to the mapping relationship, and the device identifier is fed back to the media server to provide the target media service with a device identifier for generating the source identifier.
4. The method according to claim 1, characterized in that, The provision of a pull address carrying the device identifier and the target stream identifier to the service provider includes: In response to the pull address acquisition request sent by the service provider, determine the device identifier corresponding to the IPC that provides the target media data stream and the target stream identifier that identifies the target media data stream; Based on the device identifier and the target stream identifier, a pull stream address associated with the target media data stream is generated, and the pull stream address is provided to the service provider.
5. The method according to claim 1 or 4, characterized in that, The gateway device stores the association between the device identifier, the target stream identifier, and the target media service; The step of responding to the pull address sent by the service provider and requesting the target media data stream from the target media service includes: The target media service is determined based on the association, the device identifier carried by the pull address, and the target stream identifier; The target media data stream that matches the device identifier and the target stream identifier is retrieved from the target media service and fed back to the service provider.
6. A media data transmission method, applied to a media server, characterized in that, include: Send the Internet Protocol IP address and port information corresponding to the target media service to the gateway device. The target media service is one of multiple media services provided by the media server, and each media service corresponds to a fixed port. The network camera IPC receives a target media data stream transmitted based on the IP address and port information corresponding to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The IP address and port information corresponding to the target media service are sent from the gateway device to the IPC. Generate the source identifier corresponding to the target media data stream based on the device identifier corresponding to the IPC and the target stream identifier; According to the pull request sent by the gateway device to the target media service to pull the target media data stream, the target media data stream is sent to the gateway device. The pull request is sent by the gateway device after receiving the pull address carrying the device identifier and the target stream identifier provided by the service provider and determining the target media service. The target media service is determined based on the device identifier, the target stream identifier and the association relationship, and the association relationship indicates that the device identifier, the target stream identifier and the target media service are associated.
7. The method according to claim 6, characterized in that, The gateway device stores a mapping relationship between the device identifier corresponding to the IPC and the Synchronization Source Connection Identifier (SSRC). The target media data stream transmitted by the IPC to the target media service carries the SSRC corresponding to the IPC. The method further includes: Send a second acquisition request carrying the SSRC corresponding to the IPC to the gateway device. The second acquisition request indicates that the device identifier is acquired and is provided by the target media service. The gateway device receives a device identifier associated with the SSRC corresponding to the IPC, which is used to generate the source identifier, based on the mapping relationship.
8. A media data transmission device, applied to a gateway device, characterized in that, include: The first receiving module is used to receive the Internet Protocol IP address and port information corresponding to the target media service sent by the media server. The target media service is one of a plurality of media services provided by the media server, and each media service corresponds to a fixed port. The distribution module is used to distribute the IP address and port information corresponding to the target media service to the network camera IPC. The IP address and port information corresponding to the target media service are used to guide the IPC to transmit the target media data stream to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The source identifier of the target media data stream is generated based on the device identifier corresponding to the IPC and the target stream identifier. A module is provided to provide the service provider with a pull address carrying the device identifier and the target stream identifier, wherein the device identifier and the target stream identifier are provided by the target media service; The request module is used to respond to the pull address sent by the business party, request the target media data stream from the target media service, and the target media service provides media data to the business party.
9. A media data transmission device, applied to a media server, characterized in that, include: The second sending module is used to send the Internet Protocol IP address and port information corresponding to the target media service to the gateway device. The target media service is one of the multiple media services provided by the media server, and each media service corresponds to a fixed port. The fourth receiving module is used to receive the target media data stream transmitted by the network camera IPC based on the IP address and port information corresponding to the target media service. The target media data stream carries a target stream identifier provided by the IPC to identify the target media data stream. The IP address and port information corresponding to the target media service are sent to the IPC by the gateway device. The generation module is used to generate the source identifier corresponding to the target media data stream based on the device identifier corresponding to the IPC and the target stream identifier; The third sending module is used to send the target media data stream to the gateway device according to the pull request sent by the gateway device to the target media service. The pull request is sent by the gateway device after receiving a pull address carrying the device identifier and the target stream identifier provided by the service provider and determining the target media service. The target media service is determined based on the device identifier, the target stream identifier and the association relationship, and the association relationship indicates that the device identifier, the target stream identifier and the target media service are associated with the target media service.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the media data transmission method as described in any one of claims 1 to 5 or 6 to 7.
Citation Information
Patent Citations
Base station communication method, device and system, security gateway and storage medium
CN118524395A
Media Transfer to a Renderer in a Local Network from a Server in a Second Local Network
US20110320572A1