Streaming media service performance test method and system, electronic equipment and storage medium
The streaming media push-through device obtains and pushes RTP video streams to the streaming media server for playback testing, solving the problem of cumbersome video streaming for building a camera, and achieving the effect of simplifying the testing process and reducing the testing cost.
Patent Information
- Application Number
- CN202411834042.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-02
AI Technical Summary
During the monitoring and development and testing of substations, the process of building multiple cameras to capture video streams and pushing them to the streaming media server for playback tests is cumbersome, which increases the testing cost.
Multiple RTP video streams are obtained through the streaming media pushing device and push these video streams to the streaming media server based on multiple preset pushing channels, causing them to push the video stream to multiple preset players for playback testing.
This enables streaming service performance testing without building a camera, simplifying the testing process and reducing testing costs.
Smart Images

Figure CN119922294A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of substation inspection, and in particular, relates to a streaming media service performance testing method and system, electronic equipment and storage medium. Background Art
[0002] At present, video streaming technology is increasingly being used for real-time monitoring of substations. By connecting multiple cameras, the on-site conditions of the substation are transmitted to the monitoring center in real time, so that operation and maintenance personnel can observe the operating status of the substation at any time and promptly discover faults or abnormal conditions of substation equipment.
[0003] During the development and testing of substation monitoring, multiple cameras are set up to shoot video streams, and the video streams are pushed to the player for playback testing based on the streaming media server to test the performance of the streaming media service. However, the process of setting up multiple cameras is relatively cumbersome and increases the testing cost of testing the performance of the streaming media service. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a streaming media service performance testing method and system, electronic device and storage medium to overcome the above problems of the prior art.
[0005] In the first aspect, an embodiment of the present application provides a streaming media service performance testing method, which is applied to a streaming media push device in a streaming media service system, wherein the streaming media service system also includes a streaming media server, and the streaming media service performance testing method includes: obtaining multiple RTP video streams; pushing the multiple RTP video streams to the streaming media server based on multiple preset push channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing, and each preset push channel is used to push an RTP video stream.
[0006] Among them, in some optional embodiments, the obtaining of multiple RTP video streams includes: loading multiple pre-stored RTP recorded video files; parsing each RTP recorded video file to obtain an RTP video stream, so as to obtain the multiple RTP video streams.
[0007] Among them, in some optional embodiments, before loading the pre-stored multiple RTP recorded video files, the streaming media service performance testing method also includes: determining whether the streaming media push device is in a service performance test mode; the loading of the pre-stored multiple RTP recorded video files includes: when it is determined that the streaming media push device is in a service performance test mode, loading the pre-stored multiple RTP recorded video files.
[0008] Among them, in some optional embodiments, determining whether the streaming media push device is in the service performance test mode includes: obtaining device configuration information of the streaming media push device; when the device configuration information does not include camera configuration information, determining that the streaming media push device is in the service performance test mode; when the device configuration information includes the camera configuration information, determining that the streaming media push device is not in the service performance test mode.
[0009] Among them, in some optional embodiments, pushing the multiple RTP video streams to the streaming media server based on multiple preset streaming channels includes: determining the streaming order and streaming time of each preset streaming channel according to the saving time of the multiple RTP video streams; based on the streaming order and the streaming time of each preset streaming channel, pushing the corresponding RTP video stream to the streaming media server.
[0010] In a second aspect, an embodiment of the present application provides a streaming media service performance testing method, which is applied to a streaming media server in a streaming media service system. The streaming media service system also includes a streaming media push device. The streaming media service performance testing method includes: receiving multiple RTP video streams pushed by the streaming media push device based on multiple preset push channels, each preset push channel is used to push an RTP video stream; pushing the multiple RTP video streams to multiple preset players for playback testing.
[0011] Among them, in some optional embodiments, pushing the multiple RTP video streams to multiple preset players for playback testing includes: when a first number of the multiple RTP video streams is greater than a second number of the multiple preset players, pushing each RTP video stream in the second number of RTP video streams to a preset player for playback testing; when the first number is less than or equal to the second number, pushing each RTP video stream in the multiple RTP video streams to a preset player for playback testing.
[0012] In a third aspect, an embodiment of the present application provides a streaming media service system, including a streaming media push device and a streaming media server, wherein the streaming media push device is connected to the streaming media server; the streaming media push device is used to execute the streaming media service performance test method provided in the first aspect above; the streaming media server is used to execute the streaming media service performance test method provided in the second aspect above.
[0013] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory; one or more processors coupled to the memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the streaming media service performance testing method provided in the first aspect or the second aspect above.
[0014] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute a streaming media service performance testing method as provided in the first aspect or the second aspect above.
[0015] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer device, enables the computer device to execute the streaming media service performance testing method provided in the first aspect or the second aspect above.
[0016] The solution provided by the present application is that the streaming media push device obtains multiple RTP video streams, and pushes the multiple RTP video streams to the streaming media server based on multiple preset push channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing. Each preset push channel is used to push an RTP video stream, thereby realizing the pushing of RTP video streams to preset players for playback testing based on the streaming media push device and the streaming media server, without the need to set up a camera to capture the video stream, simplifying the test process for testing the streaming media service performance, and reducing the test cost for testing the streaming media service performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a scenario of a streaming media service system provided in an embodiment of the present application is shown.
[0019] Figure 2 Another scenario schematic diagram of the streaming media service system provided in an embodiment of the present application is shown.
[0020] Figure 3 A flow chart of a streaming media service performance testing method provided in an embodiment of the present application is shown.
[0021] Figure 4 A schematic diagram of a scenario for creating a WebRTC player in the streaming media service performance testing method provided in an embodiment of the present application is shown.
[0022] Figure 5 A schematic diagram of a push scenario of an RTP video stream in a streaming media service performance testing method provided in an embodiment of the present application is shown.
[0023] Figure 6 A scenario flow diagram of a streaming media service performance testing method provided in an embodiment of the present application is shown.
[0024] Figure 7 Another flow chart of the streaming media service performance testing method provided in an embodiment of the present application is shown.
[0025] Figure 8 A flow chart of a streaming media playback method in a streaming media service performance testing method provided in an embodiment of the present application is shown.
[0026] Fig. 9 A structural block diagram of a streaming media service performance testing device provided in an embodiment of the present application is shown.
[0027] Fig.10 Another structural block diagram of a streaming media service performance testing device provided in an embodiment of the present application is shown.
[0028] Fig.11 A functional block diagram of an electronic device provided in an embodiment of the present application is shown.
[0029] Fig.12 A computer-readable storage medium provided in an embodiment of the present application for storing or carrying program code for implementing a streaming media service performance testing method provided in an embodiment of the present application is shown.
[0030] Fig.13 A computer program product provided in an embodiment of the present application and used to store or carry program codes for implementing a streaming media service performance testing method provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0031] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only 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 creative work are within the scope of protection of this application.
[0032] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0033] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0034] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0035] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0036] At present, video streaming technology is increasingly being used for real-time monitoring of substations. By connecting multiple cameras, the on-site conditions of the substation are transmitted to the monitoring center in real time, so that operation and maintenance personnel can observe the operating status of the substation at any time and promptly discover faults or abnormal conditions of substation equipment.
[0037] During the development and testing of substation monitoring, multiple cameras are set up to shoot video streams, and the video streams are pushed to the player for playback testing based on the streaming media server to test the performance of the streaming media service. However, the process of setting up multiple cameras is relatively cumbersome and increases the testing cost of testing the performance of the streaming media service.
[0038] In response to the above problems, the embodiments of the present application provide a streaming media service performance testing method and system, an electronic device, and a storage medium. The streaming media push device obtains multiple RTP video streams, and pushes the multiple RTP video streams to the streaming media server based on multiple preset push channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing. Each preset push channel is used to push an RTP video stream, thereby realizing the pushing of the RTP video stream to the preset player for playback testing based on the streaming media push device and the streaming media server. There is no need to set up a camera to capture the video stream, which simplifies the test process for testing the streaming media service performance and reduces the test cost for testing the streaming media service performance.
[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0040] See also Figure 1 , which shows a schematic diagram of an application scenario of a streaming media service system provided in an embodiment of the present application. The streaming media service system may include a streaming media push device 100 and a streaming media server 200. The streaming media push device 100 is connected to the streaming media server 200 through a network and exchanges data with the streaming media server 200 through the network.
[0041] The streaming media push device 100 can be used to centrally push multiple Real-Time Transport Protocol (RTP) video streams to the streaming media server 200. For example, the streaming media push device 100 can be any one of a concentrator, a router, or a switch, etc., which is not limited here.
[0042] The streaming media server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be any one of the cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), big data or artificial intelligence platforms, etc., without limitation here.
[0043] The network can be any one of a ZigBee network, a Bluetooth (BT) network, a Wireless Fidelity (Wi-Fi) network, a Thread network, a Long Range Radio (LoRa) network, a Low-Power Wide-Area Network (LPWAN), an infrared network, a Narrow Band Internet of Things (NB-IoT), a Controller Area Network (CAN), a Digital Living Network Alliance (DLNA) network, a Wide Area Network (WAN), a Local Area Network (LAN), a Metropolitan Area Network (MAN), or a Wireless Personal Area Network (WPAN), etc., without limitation here.
[0044] In some embodiments, Figure 2 As shown, the streaming media service system may also include a video device 300, a video access module 400, an RTP packet recording module 500, a player 600, and the like.
[0045] The video device 300 may be a camera or a network video recorder (NVR), etc., which is not limited here.
[0046] The video device 300 can be used to collect video streams and send the collected video streams to the video access module 400. The video access module 400 can be used to forward the collected video streams to the streaming media push device 100, and the streaming media push device 100 can be used to send the collected video streams to the RTP packet recording module 500, and the RTP packet recording module 500 can be used to record the collected video streams and obtain and store RTP recorded video files.
[0047] The streaming media push device 100 can also be used to parse the RTP recorded video file to obtain the RTP video stream, and push the RTP video stream to the streaming media server 200; the streaming media server 200 can be used to push the RTP video stream to the player 600 for playback testing.
[0048] See also Figure 3, which shows a flow chart of a streaming media service performance testing method provided by an embodiment of the present application. In a specific embodiment, the streaming media service performance testing method can be applied to Figure 1 The streaming media push device 100 in the streaming media service system shown in FIG. Figure 3 The process shown is described in detail, and the streaming media service performance testing method may include the following steps 110 to 120.
[0049] Step 110: Acquire multiple RTP video streams.
[0050] In an embodiment of the present application, when a user needs to perform a streaming media service performance test, a test instruction can be sent to a streaming media push device, and the streaming media push device receives and responds to the test instruction to obtain multiple RTP video streams.
[0051] In some embodiments, when a user needs to perform a streaming media service performance test, a test instruction can be sent to a streaming media push device. The streaming media push device receives and responds to the test instruction, loads multiple pre-stored RTP recorded video files, and parses each RTP recorded video file to obtain an RTP video stream, so as to obtain multiple RTP video streams.
[0052] The RTP recorded video file may be obtained based on recording a captured video stream of a video device, and the RTP recorded video file may include a timestamp for saving the RTP recorded video, and the timestamp may be accurate to milliseconds.
[0053] As an example, when recording RTP recorded video files, it is necessary to save the timestamp of each received RTP recorded video file accurate to milliseconds. Each RTP recorded video file occupies a line in the RTP recorded video file. The head of this line adds the timestamp of the RTP recorded video file pushed to the streaming server. The original data of the RTP recorded video file is encoded in hexadecimal HEX format and then added after the timestamp information of the RTP recorded video file. The timestamp and the original data of the RTP recorded video file are separated by English commas, as follows:
[0054] Timestamp accurate to milliseconds 1, HEX-encoded data of RTP packet 1;
[0055] Timestamp accurate to milliseconds 2, HEX-encoded data of RTP packet 2;
[0056] Timestamp accurate to milliseconds 3, HEX-encoded data of RTP packet 3.
[0057] The file naming format of the RTP recorded video file can be "video channel code.cygrtp(ID)", where the video channel code is the code of the recorded video in the database (for example, the device_code attribute value of patrol_camera_device), and cygrtp is a fixed suffix used to identify the RTP recorded video file.
[0058] In order to distinguish different RTP recorded video files, some attribute tracking information needs to be added to the front of each RTP recorded video file to describe the RTP recorded video file. The attribute tracking information is marked with two English # signs at the front. The attribute tracking information includes attribute names (for example, file_type, create_time, etc.) and attribute values (for example, cyg_rtp_record_file, yyyy-MM-dd HH:mm:ss, etc.).
[0059] In some embodiments, when a user needs to perform a streaming media service performance test, a test instruction can be sent to a streaming media push device. The streaming media push device receives and responds to the test instruction, determines whether the streaming media push device is in a service performance test mode, and when it is determined that the streaming media push device is in a service performance test mode, loads multiple pre-stored RTP recorded video files, and parses each RTP recorded video file to obtain an RTP video stream, so as to obtain multiple RTP video streams.
[0060] The streaming media push device may obtain device configuration information of the streaming media push device, and determine whether the streaming media push device is in a service performance test mode according to the device configuration information.
[0061] When the device configuration information does not include the camera configuration information, it is determined that the streaming media push device is in the service performance test mode; when the device configuration information includes the camera configuration information, it is determined that the streaming media push device is not in the service performance test mode.
[0062] Regarding the process in which the streaming media push device obtains the device configuration information of the streaming media push device, as an implementation mode, the streaming media push device pre-stores the device configuration information of the streaming media push device and can read the pre-stored device configuration information.
[0063] Regarding the process of the streaming media pushing device obtaining the device configuration information of the streaming media pushing device, as an implementation mode, the streaming media pushing device may generate prompt information and receive the device configuration information of the streaming media pushing device uploaded by the user according to the prompt information.
[0064] Among them, the prompt information can be used to prompt the user to upload the device configuration information of the streaming media push device to the streaming media push device. The prompt information can be at least any one of text prompt information, sound prompt information, and light prompt information, which is not limited here.
[0065] In some embodiments, the streaming media push device can detect the user's operation, and when it is determined based on the detected user operation that the user has input a test instruction for instructing to perform a streaming media service performance test, the test instruction is received. For example, when a user needs to perform a streaming media service performance test, the user can perform a touch operation on the operation panel of the streaming media push device, and the streaming media push device responds to the user's touch operation, generates a corresponding touch signal, and analyzes the touch signal. When it is determined that the touch signal is a preset test signal for characterizing the streaming media service performance test, it is determined that the test instruction is received.
[0066] In some embodiments, the streaming media push device may be provided with a voice recognition module. When a user needs to perform a streaming media service performance test, the user may send a voice message within the voice collection range of the voice recognition module. The voice recognition module collects the voice message sent by the user, and performs voice recognition on the collected voice message. Based on the recognition result of the voice recognition, it is determined that the recognition result contains keywords for indicating a streaming media service performance test, such as "streaming media service performance test", or "streaming media service performance" and "test", etc., and then it is determined that a test instruction has been received.
[0067] As an example, the voice message sent by the user is: test the streaming media service performance, and the recognition result of the voice recognition contains the keywords "streaming media service performance" and "test", then it is determined that the test instruction has been received.
[0068] In some implementations, the streaming media service system may further include a client, which is connected to the streaming media push device via a network and performs data exchange with the streaming media push device via the network.
[0069] When the user needs to perform a streaming media service performance test, he can send a test command to the client. The client receives and responds to the test command and forwards the test command to the streaming media push device through the network. The streaming media push device receives the test command forwarded by the client.
[0070] Among them, the client can be any one of a mobile client (for example, a mobile phone client, a PDA client, a Tablet PC client, a laptop client, a smart watch client, a smart bracelet client or a wearable client, etc.) or a fixed client (for example, a desktop computer client, a smart panel client, etc.). The type of client is not limited here and can be set according to actual needs.
[0071] Step 120: Push multiple RTP video streams to a streaming media server based on multiple preset streaming channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing.
[0072] In an embodiment of the present application, after the streaming media push device obtains multiple RTP video streams, it can push the multiple RTP video streams to the streaming media server based on multiple preset push channels. The streaming media server receives and responds to the multiple RTP video streams, and pushes the multiple RTP video streams to multiple preset players for playback testing. This realizes pushing the RTP video stream to the preset player for playback testing based on the streaming media push device and the streaming media server. There is no need to set up a camera to capture the video stream, which simplifies the test process for testing the streaming media service performance and reduces the test cost for testing the streaming media service performance.
[0073] Each preset streaming channel is used to push an RTP video stream, and each preset player can be created based on Web technology.
[0074] The preset player may be any one of a WebRTC player on a browser, a common RTSP player, or an FFMPEG video recorder, etc., and is not limited here.
[0075] WebRTC players on browsers can be created in batches. When a WebRTC player on a browser is created, the format of the playback URL link passed in is: https: / / IP:PORT / index / api / webrtc?app=rtp&stream=realplay----DEVICECODE_H264&type=play.
[0076] IP and PORT are the IP of the host where the streaming media server is located and the port of the streaming media server respectively. They can be treated as fixed information. When batch creating WebRTC players on browsers, only the DEVICECODE information needs to be changed.
[0077] As an example, Figure 4As shown in the figure, when the Web front-end code is initialized, 16 WebRTC players are created in the player area, one or more streaming URLs are filled in the streaming URL editing area, and then "Play All" is clicked to start streaming playback for the above-created players. Click "Stop All" to stop the playback tasks of all players.
[0078] When the number of input streaming URLs is less than 16, all 16 WebRTC players will be set up to play streaming tasks in a loop. With this design, one browser page can create 16 streaming tasks. If performance allows, you can create multiple browser page tests on one machine, or you can easily open multiple browser pages on any computer in the LAN to start streaming media service performance testing.
[0079] In one application scenario, such as Figure 5 As shown, multiple preset streaming channels may include streaming channel A, streaming channel B, streaming channel C, streaming channel D, streaming channel E, ..., multiple preset players may include WebRTC player 1, WebRTC player 2, WebRTC player 3, WebRTC player 4, WebRTC player 5, WebRTC player 6, ..., and the streaming media streaming device pushes multiple RTP video streams to the streaming media server based on streaming channel A, streaming channel B, streaming channel C, streaming channel D, streaming channel E, ..., so that the streaming media server pushes multiple RTP video streams to WebRTC player 1, WebRTC player 2, WebRTC player 3, WebRTC player 4, WebRTC player 5, WebRTC player 6, ...
[0080] In some embodiments, after the streaming media push device obtains multiple RTP video streams, it can determine the push order and push time of each preset push channel according to the retention time of the multiple RTP video streams, and based on the push order and push time of each preset push channel, push a corresponding RTP video stream to the streaming media server. The streaming media server receives and responds to the multiple RTP video streams, pushes the multiple RTP video streams to multiple preset players for playback testing, and pushes the multiple RTP video streams according to the push order and push time. This can avoid the situation where the push data size exceeds the network transmission data size limit when pushing multiple RTP video streams at the same time, resulting in the loss of RTP video streams, which is beneficial to improving the push success rate of multiple RTP video streams.
[0081] In one application scenario, such as Figure 6 As shown, the streaming media service performance testing method may include steps 210 to 270.
[0082] Step 210: Obtain device configuration information of the streaming media push device.
[0083] Step 220: Determine whether the streaming media push device is in a service performance test mode according to the device configuration information.
[0084] When it is determined according to the device configuration information that the streaming media push device is in the service performance test mode, executing step 230;
[0085] When it is determined according to the device configuration information that the streaming media push device is not in the service performance test mode, step 250 is executed.
[0086] Step 230: Load multiple pre-stored RTP recorded video files.
[0087] Step 240: Acquire multiple RTP video streams according to multiple RTP recorded video files.
[0088] Specifically, each RTP recorded video file is parsed to obtain an RTP video stream, so as to obtain multiple RTP video streams.
[0089] Step 250: Receive multiple video files pushed from a software development kit (SDK).
[0090] Step 260: Acquire multiple RTP video streams according to multiple video files.
[0091] Specifically, each video file is parsed to obtain an RTP video stream, so as to obtain multiple RTP video streams.
[0092] Step 270: Push multiple RTP video streams to the streaming media server based on multiple preset streaming channels.
[0093] The solution provided by the present application is that the streaming media push device obtains multiple RTP video streams, and pushes the multiple RTP video streams to the streaming media server based on multiple preset push channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing. Each preset push channel is used to push an RTP video stream, thereby realizing the pushing of RTP video streams to preset players for playback testing based on the streaming media push device and the streaming media server, without the need to set up a camera to capture the video stream, simplifying the test process for testing the streaming media service performance, and reducing the test cost for testing the streaming media service performance.
[0094] See also Figure 7 , which shows a flow chart of a streaming media service performance testing method provided by another embodiment of the present application. In a specific embodiment, the streaming media service performance testing method can be applied to Figure 1The streaming media server 200 in the streaming media service system shown in FIG. Figure 7 The process shown is described in detail, and the streaming media service performance testing method may include the following steps 310 to 320.
[0095] Step 310: receiving multiple RTP video streams pushed by a streaming media push device based on multiple preset push channels.
[0096] In this embodiment, when the user needs to perform a streaming media service performance test, a test instruction can be sent to the streaming media push device. The streaming media push device receives and responds to the test instruction, obtains multiple RTP video streams, and pushes the multiple RTP video streams to the streaming media server based on multiple preset push channels. The streaming media server receives the multiple RTP video streams pushed by the streaming media push device based on multiple preset push channels.
[0097] Each preset streaming channel can be used to push an RTP video stream.
[0098] Step 320: Push multiple RTP video streams to multiple preset players for playback testing.
[0099] In this embodiment, after the streaming media server receives multiple RTP video streams pushed by the streaming media push device based on multiple preset push channels, the multiple RTP video streams can be pushed to multiple preset players for playback testing, thereby realizing the pushing of RTP video streams to preset players for playback testing based on the streaming media push device and the streaming media server. There is no need to set up a camera to capture the video stream, which simplifies the test process for testing the streaming media service performance and reduces the test cost for testing the streaming media service performance.
[0100] In some implementations, the streaming media server may push the multiple RTP video streams to multiple preset players for playback testing according to a first number of the multiple RTP video streams and a second number of the multiple preset players.
[0101] When a first number of multiple RTP video streams is greater than a second number of multiple preset players, each RTP video stream in the second number is pushed to a preset player for playback testing; when the first number is less than or equal to the second number, each RTP video stream in the multiple RTP video streams is pushed to a preset player for playback testing.
[0102] In one application scenario, such as Figure 8 As shown, the multiple RTP video streams may include 16 RTP video streams, each preset player may be associated with a stream pull URL input by a user, and the streaming media server push stream playback method may include steps 410 to 450.
[0103] Step 410: Create 16 idle players according to the 16 RTP video streams.
[0104] The streaming media server may generate and create an idle player according to each RTP video stream.
[0105] Step 420: Determine whether the number of streaming URLs input by the user is greater than 16.
[0106] When it is determined that the number of streaming URLs input by the user is greater than 16, executing step 430;
[0107] When it is determined that the number of streaming URLs input by the user is less than or equal to 16, step 440 is executed.
[0108] Step 430: read the 1st to 16th URLs and load them into 16 empty players respectively to obtain a stream pulling player instance.
[0109] Step 440: 16 empty players are loaded in a circular overwriting manner to obtain a stream pulling player instance.
[0110] Step 450: Play the stream pulling player instance.
[0111] The solution provided in this embodiment is that the streaming media server receives multiple RTP video streams pushed by the streaming media pushing device based on multiple preset pushing channels, and pushes the multiple RTP video streams to multiple preset players for playback testing. This realizes pushing the RTP video stream to the preset player for playback testing based on the streaming media pushing device and the streaming media server. There is no need to set up a camera to capture the video stream, which simplifies the test process for testing the streaming media service performance and reduces the test cost for testing the streaming media service performance.
[0112] See also Fig. 9 , which shows a streaming media service performance test device 700 provided by an embodiment of the present application. The streaming media service performance test device 700 can be applied to Figure 1 The streaming media push device 100 in the streaming media service system shown in FIG. Fig. 9 The streaming media service performance testing device 700 shown is described in detail. The streaming media service performance testing device 700 may include an acquisition module 710 and a first push module 720.
[0113] The acquisition module 710 can be used to acquire multiple RTP video streams; the first push module 720 can be used to push multiple RTP video streams to the streaming media server based on multiple preset streaming channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing, and each preset streaming channel can be used to push one RTP video stream.
[0114] In some implementations, the acquisition module 710 may include a loading unit and a parsing unit.
[0115] The loading unit can be used to load multiple pre-stored RTP recorded video files; the parsing unit can be used to parse each RTP recorded video file to obtain an RTP video stream, so as to obtain multiple RTP video streams.
[0116] In some implementations, the streaming media service performance testing device 700 may further include a determination module.
[0117] The determination module can be used to determine whether the streaming media push device is in a service performance test mode before the loading unit loads a plurality of pre-stored RTP recorded video files.
[0118] In some embodiments, the loading unit may include a loading sub-unit.
[0119] The loading subunit may be used to load a plurality of pre-stored RTP recorded video files when it is determined that the streaming media push device is in a service performance test mode.
[0120] In some implementations, the determination module may include an acquisition unit, a first determination unit, and a second determination unit.
[0121] The acquisition unit can be used to acquire the device configuration information of the streaming media push device; the first determination unit can be used to determine that the streaming media push device is in the service performance test mode when the device configuration information does not include the camera configuration information; the second determination unit can be used to determine that the streaming media push device is not in the service performance test mode when the device configuration information includes the camera configuration information.
[0122] In some implementations, the first pushing module 720 may include a third determining unit and a first pushing unit.
[0123] The third determination unit can be used to determine the streaming order and streaming time of each preset streaming channel according to the saving time of multiple RTP video streams; the first pushing unit can be used to push a corresponding RTP video stream to the streaming media server based on the streaming order and streaming time of each preset streaming channel.
[0124] The solution provided in this embodiment is that the streaming media push device obtains multiple RTP video streams, and pushes the multiple RTP video streams to the streaming media server based on multiple preset push channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing. Each preset push channel is used to push an RTP video stream, which realizes pushing the RTP video stream to the preset player for playback testing based on the streaming media push device and the streaming media server. There is no need to set up a camera to collect video streams, which simplifies the test process of testing the streaming media service performance and reduces the test cost of testing the streaming media service performance.
[0125] See also Fig.10 , which shows a streaming media service performance test device 800 provided by another embodiment of the present application. The streaming media service performance test device 800 can be applied to Figure 1 The streaming media server 200 in the streaming media service system shown in FIG. Fig.10 The streaming media service performance testing device 800 shown is described in detail. The streaming media service performance testing device 800 may include a receiving module 810 and a second pushing module 820.
[0126] The receiving module 810 can be used to receive multiple RTP video streams pushed by the streaming media push device based on multiple preset push channels, each preset push channel can be used to push an RTP video stream; the second push module 820 can be used to push multiple RTP video streams to multiple preset players for playback testing.
[0127] In some implementations, the second pushing module 820 may include a second pushing unit and a third pushing unit.
[0128] The second push unit can be used to push each RTP video stream in the second number to a preset player for playback testing when the first number of multiple RTP video streams is greater than the second number of multiple preset players; the third push unit can be used to push each RTP video stream in the multiple RTP video streams to a preset player for playback testing when the first number is less than or equal to the second number.
[0129] The solution provided in this embodiment is that the streaming media server receives multiple RTP video streams pushed by the streaming media pushing device based on multiple preset pushing channels, and pushes the multiple RTP video streams to multiple preset players for playback testing. This realizes pushing the RTP video stream to the preset player for playback testing based on the streaming media pushing device and the streaming media server. There is no need to set up a camera to capture the video stream, which simplifies the test process for testing the streaming media service performance and reduces the test cost for testing the streaming media service performance.
[0130] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Any processing method described in the method embodiment can be implemented by the corresponding processing module in the device embodiment, and will not be repeated one by one in the device embodiment.
[0131] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0132] See also Fig.11 , which shows a functional block diagram of an electronic device 900 provided by an embodiment of the present application, and the electronic device 900 may include one or more of the following components: a memory 910, a processor 920, and one or more applications, wherein the one or more applications may be stored in the memory 910 and configured to be executed by the one or more processors 920, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.
[0133] The memory 910 may include a random access memory (RAM) or a read-only memory (ROM). The memory 910 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 910 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as obtaining multiple RTP video streams, pushing multiple RTP video streams, playing tests, loading multiple RTP recorded video files, parsing RTP recorded video files, obtaining RTP video streams, determining whether it is in a service performance test mode, determining that it is in a service performance test mode, obtaining device configuration information, determining that it is not in a service performance test mode, determining a push stream order, determining a push stream time, and receiving multiple RTP video stream frames, etc.), instructions for implementing the following various method embodiments, etc. The storage data area can also store data created by the electronic device 900 during use (such as streaming media service system, streaming media push device, streaming media server, multiple RTP video streams, multiple preset push channels, multiple preset players, multiple RTP recorded video files, service performance test mode, device configuration information, camera configuration information, save time, push order, push time, first quantity and second quantity), etc.
[0134] The processor 920 may include one or more processing cores. The processor 920 uses various interfaces and lines to connect various parts of the entire electronic device 900, and executes various functions and processes data of the electronic device 900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 910, and calling data stored in the memory 910. Optionally, the processor 920 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), programmable logic array (PLA), etc. The processor 920 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 920, but may be implemented separately through a communication chip.
[0135] Please refer to Fig.12 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 1000 stores a program code 1010, and the program code 1010 can be called by a processor to execute the method described in the above method embodiment.
[0136] The computer readable storage medium 1000 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 1000 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1000 has storage space for program code 1010 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 1010 can be compressed, for example, in an appropriate form.
[0137] Please refer to Fig.13 , which shows a structural block diagram of a computer program product 1100 provided in an embodiment of the present application. The computer program product 1100 includes a computer program / instruction 1110, and the computer program / instruction 1110 is stored in a computer-readable storage medium of a computer device. When the computer program product 1100 is run on a computer device, a processor of the computer device reads the computer program / instruction 1110 from the computer-readable storage medium, and the processor executes the computer program / instruction 1110, so that the computer device performs the method described in the above method embodiment.
[0138] The solution provided in this embodiment is that the streaming media push device obtains multiple RTP video streams, and pushes the multiple RTP video streams to the streaming media server based on multiple preset push channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing. Each preset push channel is used to push an RTP video stream, which realizes pushing the RTP video stream to the preset player for playback testing based on the streaming media push device and the streaming media server. There is no need to set up a camera to collect video streams, which simplifies the test process of testing the streaming media service performance and reduces the test cost of testing the streaming media service performance.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements 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 the present application.
Claims
1. A streaming media service performance testing method, characterized in that: A streaming media push device applied to a streaming media service system, wherein the streaming media service system further includes a streaming media server, and the streaming media service performance testing method includes: Get multiple RTP video streams; The multiple RTP video streams are pushed to the streaming media server based on multiple preset streaming channels, so that the streaming media server pushes the multiple RTP video streams to multiple preset players for playback testing, and each preset streaming channel is used to push one RTP video stream.
2. The streaming media service performance testing method according to claim 1, characterized in that: The obtaining of multiple RTP video streams includes: Load multiple pre-stored RTP recorded video files; Each RTP recorded video file is parsed to obtain an RTP video stream, so as to obtain the multiple RTP video streams.
3. The streaming media service performance testing method according to claim 2, characterized in that: Before loading the pre-stored multiple RTP recorded video files, the streaming media service performance testing method further includes: Determining whether the streaming media push device is in a service performance test mode; The loading of the pre-stored multiple RTP recorded video files includes: When it is determined that the streaming media push device is in the service performance test mode, the multiple RTP recorded video files stored in advance are loaded.
4. The streaming media service performance testing method according to claim 3, characterized in that: The determining whether the streaming media push device is in a service performance test mode includes: Obtain device configuration information of the streaming media push device; When the device configuration information does not include camera configuration information, determining that the streaming media push device is in the service performance test mode; When the device configuration information includes the camera configuration information, it is determined that the streaming media push device is not in the service performance test mode.
5. The streaming media service performance testing method according to any one of claims 1 to 4, characterized in that: The method of pushing the multiple RTP video streams to the streaming media server based on multiple preset streaming channels includes: Determine the streaming order and streaming time of each preset streaming channel according to the saving time of the multiple RTP video streams; Based on the streaming order and the streaming time of each preset streaming channel, the corresponding one RTP video stream is pushed to the streaming media server.
6. A streaming media service performance testing method, characterized in that: A streaming media server is applied to a streaming media service system, wherein the streaming media service system further includes a streaming media push device, and the streaming media service performance test method comprises: Receiving multiple RTP video streams pushed by the streaming media push device based on multiple preset push channels, each preset push channel is used to push one RTP video stream; The multiple RTP video streams are pushed to multiple preset players for playback testing.
7. The streaming media service performance testing method according to claim 6, characterized in that: The step of pushing the multiple RTP video streams to multiple preset players for playback testing includes: When a first number of the plurality of RTP video streams is greater than a second number of the plurality of preset players, each RTP video stream in the second number of RTP video streams is pushed to a preset player for a playback test; When the first number is less than or equal to the second number, each of the multiple RTP video streams is pushed to a preset player for playback testing.
8. A streaming media service system, characterized in that: It includes a streaming media push device and a streaming media server, wherein the streaming media push device is connected to the streaming media server; The streaming media push device is used to perform the streaming media service performance testing method according to any one of claims 1 to 5; The streaming media server is used to execute the streaming media service performance testing method as described in claim 6 or 7.
9. An electronic device, characterized in that: include: Memory; One or more processors coupled to the memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by one or more processors, and the one or more applications are configured to execute the streaming media service performance testing method as described in any one of claims 1 to 5, or claim 6 or 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the streaming media service performance testing method as described in any one of claims 1 to 5, or claim 6 or 7.