Video stream calling method, calling device, electronic device and storage medium
By aligning the call requests and calculating the video stream priority value, the problem of high operation and maintenance costs and low bandwidth multiplexing rates of dedicated network lines is solved, and efficient bandwidth utilization of a single dedicated network line and orderly transmission of video streams is realized.
Patent Information
- Application Number
- CN202310119767.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-02-13
AI Technical Summary
In the prior art, calling monitoring video streams through multiple dedicated network lines leads to problems such as high operation and maintenance costs and low bandwidth multiplexing.
Through the docking gateway parsing call requests, the priority value of the video stream is calculated, and the video stream is transmitted in batches according to the priority value, so as to realize bandwidth multiplexing and orderly calling of a single dedicated network line.
It reduces the operation and maintenance costs of dedicated network lines, improves bandwidth utilization, and realizes bandwidth time-sharing multiplexing of multiple callers and orderly call of video streams.
Smart Images

Figure CN116112709B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of Internet of Things technology and communication technology, and in particular to a video stream calling method, a calling device, an electronic device, and a storage medium. Background Art
[0002] For places like banks, office buildings, and parks, daily security protection is achieved by accessing surveillance records from a monitoring center. In existing technologies, a dedicated network line is typically built between the caller and the monitoring center, and video streams are transmitted over the dedicated network line to achieve dedicated access to surveillance videos.
[0003] In daily security operations, since the bandwidth generated by calling video streams is a continuous expense, there is a technical problem of high operation and maintenance costs in the scenario of implementing video stream calls through multiple dedicated network lines. Summary of the Invention
[0004] In view of the above problems, the present disclosure provides a video stream calling method, calling device, electronic device and storage medium.
[0005] According to a first aspect of the present disclosure, a video stream calling method is provided, comprising:
[0006] In response to receiving M call requests from M callers, parsing the M call requests, and obtaining open stream parameters corresponding to the M call requests, wherein the call request is used to request the docking gateway to call a video stream, and the open stream parameters are used to determine the source of the video stream, and M ≥ 1;
[0007] Generate M open-stream instructions according to the open-stream parameters, wherein the open-stream instructions are used to obtain target video streams from N monitoring centers, 1≤N≤M;
[0008] In response to receiving M target video streams corresponding to the M open stream instructions, calculating M first priority values corresponding to the M target video streams according to first video stream information of the target video streams, wherein the first video stream information is used to represent attributes of the target video streams; and
[0009] According to the first priority value, the M target video streams are transmitted to the M callers.
[0010] According to an embodiment of the present disclosure, the first video stream information includes device information, video stream properties, and transmission bit rate of the target video stream; in response to receiving M target video streams corresponding to M stream opening instructions, calculating M first priority values corresponding to the M target video streams based on the first video stream information of the target video streams, including:
[0011] Calculating M first priority values corresponding to the M target video streams based on device information, video stream properties, and transmission bit rate; and
[0012] Based on the first priority value, the M target video streams are cached to the docking gateway.
[0013] According to an embodiment of the present disclosure, the device information includes a monitoring center identifier and a camera identifier; and calculating the first priority values of the M target video streams based on the device information, the nature of the video stream, and the transmission bit rate includes:
[0014] Determining a first evaluation value according to the camera identifier;
[0015] Determining a second evaluation value according to a property of the video stream;
[0016] determining a third evaluation value according to the transmission code rate;
[0017] determining a fourth evaluation value according to the monitoring center identifier; and
[0018] The first evaluation value, the second evaluation value, the third evaluation value, and the fourth evaluation value are multiplied to obtain a first priority value of the target video stream.
[0019] According to an embodiment of the present disclosure, determining the fourth evaluation value according to the monitoring center identifier includes:
[0020] Determine, based on the monitoring center identifier, the level information and call count corresponding to the monitoring center identifier, where the call count is used to represent the total number of successful calls to the video stream in the monitoring center within a preset time period; and
[0021] A fourth evaluation value is determined based on the level information and the number of calls.
[0022] According to an embodiment of the present disclosure, before transmitting the M target video streams to the M callers according to the first priority value, the method further includes:
[0023] Get the total traffic threshold of the connected gateway;
[0024] Determining second video stream information and a second priority value of the existing video stream being transmitted, where the second video stream information includes a transmission bit rate of the existing video stream;
[0025] Calculate the remaining traffic value of the connected gateway based on the transmission bit rate of the existing video stream and the total traffic threshold.
[0026] According to an embodiment of the present disclosure, transmitting M target video streams to M callers according to a first priority value includes:
[0027] Calculate the total transmission flow value of the M target video streams according to the transmission bit rates of the M target video streams;
[0028] When it is determined that the total transmission flow value is less than or equal to the remaining flow value, the M target video streams are transmitted to the M callers at the same time;
[0029] When it is determined that the total transmission traffic value is greater than the remaining traffic value, the M target video streams are transmitted to the M callers in batches according to the first priority value and the second priority value.
[0030] According to an embodiment of the present disclosure, when it is determined that the total transmission flow value is greater than the remaining flow value, M target video streams are transmitted to M callers in batches according to the first priority value and the second priority value, including:
[0031] When it is determined that the M first priority values are all greater than the second priority value, determine K target video streams from the M target video streams in descending order of the first priority values, and simultaneously transmit the K target video streams to the K callers, wherein the transmission flow values of the K target video streams are less than or equal to the remaining flow value, and 1≤K≤M; and
[0032] Stop transmitting the existing video stream and the (MK) target video streams, so that after completing the transmission operation of the K target video streams, the existing video stream and the (MK) target video streams are transmitted.
[0033] According to an embodiment of the present disclosure, the method further includes:
[0034] Generate a close notification corresponding to the existing video stream and (MK) target video streams; and
[0035] The flow shutdown notification is sent to the caller through the notification component in the docking gateway.
[0036] According to an embodiment of the present disclosure, in response to receiving M target video streams corresponding to M open stream instructions, calculating M first priority values corresponding to the M target video streams according to first video stream information of the target video streams, further comprising:
[0037] When it is determined that the M target video streams include the existing video stream, the existing video stream is deleted from the M target video streams, and the M target video streams are updated.
[0038] A second aspect of the present disclosure provides a video stream calling device, comprising:
[0039] a parsing module configured to, in response to receiving M call requests from M callers, parse the M call requests and obtain open stream parameters corresponding to the M call requests, wherein the call request is used to request a video stream from a docking gateway, and the open stream parameters are used to determine a source of the video stream, where M ≥ 1;
[0040] A generation module is used to generate M open-stream instructions according to the open-stream parameters, wherein the open-stream instructions are used to obtain target video streams from N monitoring centers, 1≤N≤M;
[0041] a calculation module, configured to, in response to receiving M target video streams corresponding to the M open stream instructions, calculate M first priority values corresponding to the M target video streams based on first video stream information of the target video streams, wherein the first video stream information is used to represent attributes of the target video streams; and
[0042] The transmission module is used to transmit the M target video streams to the M callers according to the first priority value.
[0043] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned video stream calling method.
[0044] A fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned video stream calling method.
[0045] A fifth aspect of the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned video stream calling method when executed by a processor.
[0046] The present disclosure achieves bandwidth reuse of a single dedicated network line by, in response to receiving M call requests from M callers, parsing the M call requests, obtaining open-stream parameters corresponding to the M call requests; generating M open-stream instructions based on the open-stream parameters; in response to receiving M target video streams corresponding to the M open-stream instructions, calculating M first priority values corresponding to the M target video streams based on the first video stream information of the target video streams; and transmitting the M target video streams to the M callers based on the first priority values. In combination with the time-sharing call characteristics of the callers, a dedicated network line is connected to a docking gateway, and the docking gateway is used to obtain video streams from a monitoring center. This not only improves the bandwidth utilization of a single dedicated network line, achieves time-sharing bandwidth reuse of multiple callers as a whole, but also reduces the cost of building and maintaining a dedicated network line.
[0047] Furthermore, multiple callers may simultaneously initiate video stream calls to the docking gateway. The disclosed embodiment can also achieve orderly video stream calls by calculating a first priority value and transmitting the video streams according to the first priority value. While ensuring orderly video stream calls, the bandwidth overhead of the dedicated network line is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0049] Figure 1 The application scenario of the video stream calling method according to an embodiment of the present disclosure is schematically shown;
[0050] Figure 2 The flowchart of the video stream calling method according to an embodiment of the present disclosure is schematically shown;
[0051] Figure 3 Schematically shows a flow chart of a method for calculating a first priority value according to an embodiment of the present disclosure;
[0052] Figure 4 Schematically illustrates a schematic diagram of calculating a first priority value based on a camera identifier, video stream properties, transmission bit rate, and monitoring center identifier according to an embodiment of the present disclosure;
[0053] Figure 5 The following schematically shows a flow chart of a method for calling a video stream according to a specific embodiment of the present disclosure;
[0054] Figure 6 Schematically illustrates an application scenario of implementing video stream calling by docking with a gateway device according to an embodiment of the present disclosure;
[0055] Figure 7 A structural block diagram of a video stream calling device according to an embodiment of the present disclosure is schematically shown; and
[0056] Figure 8 The block diagram schematically shows an electronic device suitable for the video stream calling method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0057] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0058] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0059] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0060] When expressions such as "at least one of A, B and C, etc." are used, they should generally be interpreted in accordance with the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0061] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of the data involved (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0062] In related technologies, banks have monitoring centers in various provinces and cities, and video streams are accessed through multiple levels of dedicated network lines. For example, a caller in Province XX uses dedicated network line A to access a video stream with the monitoring center at Province XX; a caller in City YY, Province XX uses dedicated network line B to access a video stream with the monitoring center at City YY, Province XX.
[0063] In actual applications, the costs involved in video streaming scenarios include software development, front-end servers, and dedicated network lines. The costs of software development and front-end server configuration are lower than those of dedicated network lines. Regarding dedicated network lines, in addition to the high cost of setting up multiple dedicated network lines, the daily bandwidth costs associated with multiple dedicated network lines are also very high.
[0064] Therefore, for dedicated network lines between callers of the same level and monitoring centers, video stream calls will incur high operation and maintenance costs.
[0065] In actual applications, callers typically have call requirements within relatively fixed time periods and do not make calls at other times. This results in low bandwidth reuse for each dedicated network circuit. Since multiple callers have multiple, relatively fixed call times, multiple dedicated network circuits waste bandwidth.
[0066] An embodiment of the present disclosure provides a video stream calling method, including: in response to receiving M calling requests from M callers, parsing the M calling requests, obtaining open stream parameters corresponding to the M calling requests, wherein the calling request is used to request a docking gateway to call a video stream, and the open stream parameter is used to determine the source of the video stream, M≥1; generating M open stream instructions according to the open stream parameters, wherein the open stream instructions are used to obtain target video streams from N monitoring centers, 1≤N≤M; in response to receiving M target video streams corresponding to the M open stream instructions, calculating M first priority values corresponding to the M target video streams according to first video stream information of the target video stream, wherein the first video stream information is used to characterize the attributes of the target video stream; and transmitting the M target video streams to the M callers according to the first priority values.
[0067] Figure 1 The application scenario of the video stream calling method according to the embodiment of the present disclosure is schematically illustrated.
[0068] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101 , a second terminal device 102 , a third terminal device 103 , an electronic device 104 , a first front-end server 105 , a second front-end server 106 and a third front-end server 107 .
[0069] The network is used to provide a medium for the communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the electronic device 104; the network is also used to provide a medium for the communication link between the first front-end server 105, the second front-end server 106, the third front-end server 107 and the electronic device 104.
[0070] For example, the first front-end server 105, the second front-end server 106, the third front-end server 107, and the electronic device 104 can communicate via a wireless communication link, such as a local area network (LAN). The first terminal device 101, the second terminal device 102, the third terminal device 103, and the electronic device 104 can communicate via a wired or wireless communication link or an optical fiber cable.
[0071] Multiple levels of callers can interact with the electronic device 104 through the first terminal device 101, the second terminal device 102, and the third terminal device 103 to receive or send messages, etc. For example, a caller can send a call request for invoking a video stream to the electronic device 104 through the first terminal device 101, the second terminal device 102, and the third terminal device 103; and receive a video stream from the electronic device 104.
[0072] Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0073] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0074] The first front-end server 105, the second front-end server 106, and the third front-end server 107 are connected to the monitoring equipment to obtain and store the video streams collected by the monitoring equipment. The first front-end server 105, the second front-end server 106, and the third front-end server 107 can correspond to monitoring centers at multiple levels. For example, the first front-end server 105 can correspond to a provincial-level monitoring center, and the second front-end server 106 and the third front-end server 107 can both correspond to a municipal-level monitoring center.
[0075] The first front-end server 105 , the second front-end server 106 and the third front-end server 107 may also be a server cluster, connected to multiple monitoring devices, for acquiring and storing video streams collected by monitoring devices in multiple geographical areas.
[0076] Electronic device 104 is used to establish a network connection between the caller's terminal device and the front-end server. Specifically, electronic device 104 is used to receive and process the call request from the caller, then obtain the video stream from the front-end server and return the video stream to the caller. Electronic device 104 can be a docking gateway, for example, a network connector, a protocol converter, etc.
[0077] It should be noted that the video stream calling method provided in the embodiment of the present disclosure can generally be executed by the electronic device 104. Accordingly, the video stream calling device provided in the embodiment of the present disclosure can generally be set in the electronic device 104. The video stream calling method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the electronic device 104 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the first front-end server 105, the second front-end server 106, and the third front-end server 107. Accordingly, the video stream calling device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the electronic device 104 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the first front-end server 105, the second front-end server 106, and the third front-end server 107.
[0078] It should be understood that Figure 1 The number of terminal devices, electronic devices and front-end servers in the embodiment is merely illustrative. Any number of terminal devices, electronic devices and front-end servers may be provided according to implementation requirements.
[0079] The following will be based on Figure 1 The scene described by Figures 2 to 6 The video stream calling method of the disclosed embodiment is described in detail.
[0080] For ease of understanding, the terms appearing in this article are explained uniformly here.
[0081] Video streaming: refers to a technology and process that compresses a series of videos and sends the data in segments over the Internet, transmitting the audio and video in real time for viewing. This technology allows data packets to be sent like a stream of water.
[0082] Monitoring Center: Financial institutions usually use provincial or municipal administrative regions as the standard for centralized video surveillance work sites.
[0083] Docking Gateway: In financial institutions, multiple municipal monitoring centers are connected to a unified docking gateway via LAN lines. This unified docking gateway then connects to the engineering services of provincial callers via dedicated network lines. Municipal callers connect to provincial callers to enable peer-to-peer video stream calls.
[0084] Frame: The smallest unit of a single image in an animation, equivalent to each frame on a movie film.
[0085] Transmission bit rate: The video stream transmission encoding format brings about the clarity of video data transmitted per unit time.
[0086] Standard protocol: To ensure public safety, state-owned and private enterprises at all levels are required to connect the surveillance videos of their public areas with the caller's landmark video system through a standard protocol (GB-T28181).
[0087] Landmark video system: A surveillance video system built by local public security agencies with local characteristics or to meet local special needs.
[0088] Figure 2 The flowchart of the video stream calling method according to an embodiment of the present disclosure is schematically shown.
[0089] like Figure 2 As shown, the method includes operations S210 to S240.
[0090] In operation S210 , in response to receiving M call requests from M callers, the M call requests are parsed to obtain open flow parameters corresponding to the M call requests.
[0091] According to an embodiment of the present disclosure, a caller invokes a video stream by sending a call request to a docking gateway. In the video stream call scenario of an embodiment of the present disclosure, the docking gateway can simultaneously receive M call requests from M callers. The M callers can be callers of different levels, used to invoke different video streams, where M ≥ 1.
[0092] For example, at time T1, provincial caller A sends call request A to the docking gateway to call video stream A, and municipal caller B sends call request B to the docking gateway to call video stream B. The docking gateway can receive call request A and call request B simultaneously, obtain and return video stream A and video stream B from one or more monitoring centers.
[0093] According to embodiments of the present disclosure, open stream parameters are used to determine the source of a video stream. These parameters include the monitoring center identifier, camera identifier, and video stream properties. They also include other transmission parameters, such as the caller's message format and interface protocol.
[0094] According to an embodiment of the present disclosure, the video stream properties are used to characterize the type of the video stream, including various information such as alarm processing, real-time review, and playback review.
[0095] For example, video stream A contains daily surveillance video from 9:00 to 12:00 in XX area of XX city. The caller can call video stream A at 14:00 on the same day. The video stream property of video stream A is playback and review. The caller can also call video stream B at the current time. The video stream property of video stream B is implementation and review.
[0096] For another example, since an emergency occurred in XY area of XX city at 13:15, the caller calls video stream C to view the surveillance video of XY area of XX city at 13:15. The video stream nature of video stream C is emergency processing.
[0097] In operation S220 , M flow opening instructions are generated according to the flow opening parameters.
[0098] According to an embodiment of the present disclosure, the monitoring center and the caller implement the call of the video stream by connecting to the gateway, whereby the caller generates the open stream parameters after parsing the call request, and then generates the open stream instruction corresponding to the call request according to the open stream parameters.
[0099] According to embodiments of the present disclosure, surveillance video can be captured by a camera and managed and stored by a monitoring center. After parsing the call request and obtaining the open stream parameters, the docking gateway can determine the camera and monitoring center to which the target video stream to be called belongs based on the open stream parameters. The gateway then sends an open stream instruction generated based on the open stream parameters to the corresponding monitoring center, thereby retrieving the target video stream from the monitoring center.
[0100] According to an embodiment of the present disclosure, a monitoring center can collect monitoring videos of multiple areas through multiple cameras. Thus, different target video streams of different monitoring centers can be called according to M call requests, and different target video streams of the same monitoring center can also be called.
[0101] In operation S230 , in response to receiving M target video streams corresponding to the M stream opening instructions, M first priority values corresponding to the M target video streams are calculated according to first video stream information of the target video streams.
[0102] According to an embodiment of the present disclosure, after the docking gateway sends a start-stream instruction to the monitoring center, the monitoring center may determine and transmit a target video stream in response to the start-stream instruction, so that the docking gateway caches M target video streams.
[0103] According to an embodiment of the present disclosure, the docking gateway can, in response to receiving M target video streams, calculate the first priority values of the M target video streams based on the first video information of the target video streams, and then sort the M target video streams according to the first priority values and write them into the cache device.
[0104] According to an embodiment of the present disclosure, the first video stream information is used to characterize the attributes of the target video stream. The first priority value is used to characterize the priority of the target video stream and can be determined based on the first video stream information.
[0105] According to the embodiments of the present disclosure, for monitoring centers of the same level, the importance of monitoring centers in multiple regions varies, and the importance of multiple cameras also varies. For the same region, the importance of cameras in different locations and orientations also varies. Therefore, the source of the target video can affect the calculation of priority.
[0106] For example, for surveillance centers of the same tier, a surveillance center in a provincial capital city is more important than one in a non-provincial capital city. For different regions under the jurisdiction of the same surveillance center, cameras in the city center are more important than those in the suburbs. For the same street, cameras at the intersection of multiple roads are more important than other cameras; and cameras facing important institutions such as financial institutions are more important than cameras facing other directions.
[0107] The urgency of the target video stream can also affect the priority calculation. For example, in the event of an emergency such as a fire, earthquake, or stampede, the urgency of the target video stream is higher than that of routine monitoring.
[0108] Large video streams take longer to transmit and occupy more bandwidth, thus affecting the transmission experience. Therefore, the size of the target video stream can also affect the priority calculation.
[0109] According to an embodiment of the present disclosure, when calculating the first priority value based on the first video stream information, the corresponding first video stream information can be obtained through multiple aspects such as the source of the video stream, the calling urgency and the size of the video stream to improve the priority calculation method of the target video stream.
[0110] In operation S240 , the M target video streams are transmitted to the M callers according to the first priority value.
[0111] According to an embodiment of the present disclosure, after determining the M target video streams corresponding to the M call requests, the docking gateway can determine the transmission order of the M target video streams according to the first priority value, and then transmit the M target video streams to the M callers according to the transmission order of the M target video streams.
[0112] For example, M target video streams may be transmitted to M callers simultaneously according to the transmission order, or the M target video streams may be transmitted to M callers in batches according to the transmission order.
[0113] The present disclosure achieves bandwidth reuse of a single dedicated network line by, in response to receiving M call requests from M callers, parsing the M call requests, obtaining open-stream parameters corresponding to the M call requests; generating M open-stream instructions based on the open-stream parameters; in response to receiving M target video streams corresponding to the M open-stream instructions, calculating M first priority values corresponding to the M target video streams based on the first video stream information of the target video streams; and transmitting the M target video streams to the M callers based on the first priority values. In combination with the time-sharing call characteristics of the callers, a dedicated network line is connected to a docking gateway, and the docking gateway is used to obtain video streams from a monitoring center. This not only improves the bandwidth utilization of a single dedicated network line, achieves time-sharing bandwidth reuse of multiple callers as a whole, but also reduces the cost of building and maintaining a dedicated network line.
[0114] Furthermore, multiple callers may simultaneously initiate video stream calls to the docking gateway. The disclosed embodiment can also achieve orderly video stream calls by calculating a first priority value and transmitting the video streams according to the first priority value. While ensuring orderly video stream calls, the bandwidth overhead of the dedicated network line is reduced.
[0115] According to an embodiment of the present disclosure, in operation S220, the process of generating M open flow instructions includes: determining N front-end servers corresponding to N monitoring centers based on the open flow parameters; combining the M open flow parameters with the standard protocol parameters respectively to generate M open flow instructions; and sending the M open flow instructions to the N front-end servers based on the open flow parameters.
[0116] According to an embodiment of the present disclosure, the open stream parameters are used to determine the source of the video stream. After the open stream parameters are determined, the open stream parameters are combined with standard protocol parameters to generate an open stream instruction that complies with the monitoring center data standard. The standard protocol parameters may be GBT28181 parameters.
[0117] Through the calling method of caller-connection gateway-front-end server-monitoring center, while reducing the maintenance cost of network lines, obtaining video streams in real time from the front-end server of the monitoring center can reduce the storage capacity of the connection gateway.
[0118] Figure 3 The flowchart of the method for calculating the first priority value according to an embodiment of the present disclosure is schematically shown.
[0119] like Figure 3 As shown, the method for calculating the first priority value in this embodiment includes operations S331 to S332, which can be used as a specific embodiment of operation S230.
[0120] In operation S331, M first priority values corresponding to the M target video streams are calculated according to device information, video stream properties, and transmission bit rates.
[0121] According to an embodiment of the present disclosure, the first video stream information includes the device information, video stream properties, and transmission bitrate of the target video stream. The device information is used to identify the source of the target video stream and may include a monitoring center identifier and a camera identifier; the video stream properties are used to identify the urgency of the target video stream; and the transmission bitrate is used to identify the size of the target video stream.
[0122] According to the embodiments of the present disclosure, the device information, video stream properties and transmission bit rate have different degrees of influence on the priority of the target video stream. When calculating the first priority value, the evaluation values corresponding to the device information, video stream properties and transmission bit rate can be determined first, and then the first priority value can be calculated based on multiple evaluation values.
[0123] According to embodiments of the present disclosure, different weights can be assigned to device information, video stream properties, and transmission bitrate, and a weighted sum of multiple evaluation values can be performed to obtain a first priority value. Alternatively, the multiple evaluation values can be normalized, and the normalized evaluation values can be processed by summing or other operations to obtain the first priority value. Normalization can include scaling up, scaling down, or determining a standard value through table lookup.
[0124] In operation S332 , based on the first priority value, the M target video streams are cached to the docking gateway.
[0125] According to an embodiment of the present disclosure, after calculating the first priority values of the M target video streams, the priorities of the M target video streams can be determined according to the magnitude of the first priority values. For example, the larger the first priority value, the higher the priority of the target video stream.
[0126] After determining the priorities of the M target video streams, the M target video streams are sorted in descending order of priority, and the M target video streams are written into the cache of the docking gateway according to the sorting result.
[0127] According to an embodiment of the present disclosure, the docking gateway may calculate the first priority value of the target video stream through the management component, and write the multiple target video streams into the cache in sequence through the management component.
[0128] The embodiment of the present disclosure calculates the first priority value through device information, video stream properties and transmission bit rate. It can determine the transmission priority not only based on the content of the video stream, but also based on the size of the video stream, which helps to improve the user experience of the caller.
[0129] Figure 4 The diagram schematically shows a schematic diagram of calculating the first priority value according to the camera identification, video stream properties, transmission bit rate and monitoring center identification according to an embodiment of the present disclosure.
[0130] like Figure 4 As shown, the first video stream information, such as camera identification, video stream properties, transmission bit rate and monitoring center identification, can be obtained according to the target video stream 401.
[0131] The first evaluation value 402 of the target video stream 401 can be determined according to the camera identification; the second evaluation value 403 of the target video stream 401 can be determined according to the nature of the video stream; the third evaluation value 404 of the target video stream 401 can be determined according to the transmission bit rate; and the fourth evaluation value 405 of the target video stream 401 can be determined according to the monitoring center identification.
[0132] According to an embodiment of the present disclosure, after determining multiple evaluation values corresponding to the target video stream, the first evaluation value 402 , the second evaluation value 403 , the third evaluation value 404 and the fourth evaluation value 405 may be integrated to obtain a first priority value 406 .
[0133] As a specific embodiment, the first evaluation value 402 , the second evaluation value 403 , the third evaluation value 404 and the fourth evaluation value 405 may be multiplied together to obtain the first priority value 406 .
[0134] As another specific embodiment, the first evaluation value 402 , the second evaluation value 403 , the third evaluation value 404 and the fourth evaluation value 405 may be added together to obtain the first priority value 406 .
[0135] According to an embodiment of the present disclosure, in operation S331 , calculating the first priority value may include the following steps.
[0136] Determine a first evaluation value based on the camera identification; determine a second evaluation value based on the nature of the video stream; determine a third evaluation value based on the transmission bit rate; determine a fourth evaluation value based on the monitoring center identification; and multiply the first evaluation value, the second evaluation value, the third evaluation value and the fourth evaluation value to obtain a first priority value of the target video stream.
[0137] According to an embodiment of the present disclosure, the importance of a camera is related to the camera's region, location, orientation, etc. A first weight value corresponding to the camera identifier is obtained from a camera weight table according to the camera identifier, and then the first weight value is added by one to obtain a first evaluation value.
[0138] According to an embodiment of the present disclosure, the first weight value in the camera weight table may be determined in advance based on a plurality of judgment information such as region, location, and orientation.
[0139] According to an embodiment of the present disclosure, the camera weight table may be a full table including the first weight values of all cameras controlled by the connected gateway. The camera weight table may also include multiple sub-tables, each of which includes the first weight values of all cameras managed by a monitoring center, so that the first weight value of a camera is determined based on the monitoring center identifier and the camera identifier.
[0140] According to an embodiment of the present disclosure, a video stream property is used to characterize the urgency of calling a video stream, and the urgency of calling a video stream can be reflected by a second weight value of the video stream. Since the urgency of calling a video stream is relative, a weight ratio between multiple video stream properties can be pre-configured. Based on the weight ratio of the video stream properties, a second weight value corresponding to the video stream property is calculated, and the second weight value is used as the second evaluation value.
[0141] For example, if the video stream types include police incident handling and routine inspection, the weight ratio of police incident handling and routine inspection is 2:1, the second weight of police incident handling is 2 / 3, and the second weight of daily inspection is 1 / 3. Alternatively, if the video stream types include police incident handling, real-time review, and playback review, the ratio of police incident handling: real-time review: playback review is 3:2:1, and the second weights are 1 / 2, 1 / 3, and 1 / 6, respectively.
[0142] According to the embodiments of the present disclosure, the weight ratio can be adjusted according to actual conditions. Specifically, the weight ratio can be adjusted according to time period. For example, the weight ratio of police incident handling and daily inspections in January is 2:1, and the weight ratio of police incident handling and daily inspections in December is 3:1.
[0143] Alternatively, the weight ratio can be adjusted based on the number of reviews. For example, if the number of reviews for daily inspections meets a preset threshold, the urgency of adjusting daily inspections can be reduced, i.e., the weight ratio for on-site inspections can be lowered.
[0144] According to an embodiment of the present disclosure, for the third evaluation value, the square root of the value obtained by adding one to the transmission code rate is calculated, and then the reciprocal of the square root is added by one to obtain the third evaluation value. Specifically, the formula for obtaining the third evaluation value satisfies:
[0145]
[0146] The higher the transmission bit rate of the target video stream, the larger the bandwidth occupied during transmission, the smaller the third evaluation value, and the lower the priority.
[0147] According to an embodiment of the present disclosure, determining the fourth evaluation value based on the monitoring center identifier includes: determining, based on the monitoring center identifier, level information and a call count corresponding to the monitoring center identifier, where the call count represents the total number of successful calls to video streams in the monitoring center within a preset time period; and determining the fourth evaluation value based on the level information and the call count. The preset time period can be one month or one week.
[0148] According to an embodiment of the present disclosure, a monitoring center level weight value corresponding to the level is obtained based on the level information of the monitoring center, and then the ratio of the monitoring center level weight value to the square root of the number of times the monitoring center is accessed is calculated to obtain a fourth evaluation value. Specifically, the formula for obtaining the fourth evaluation value satisfies:
[0149]
[0150] The more successful calls to the monitoring center within the preset time period, the greater the bandwidth pressure and the lower the priority.
[0151] It should be noted that, compared with a monitoring center with a large number of successful calls, the target video stream transmitted by a monitoring center with a small number of calls may be more needed by the caller. Therefore, when the source is a monitoring center with a small number of calls, the priority of the video stream is higher.
[0152] The embodiments of the present disclosure characterize the calling pressure of the monitoring center by the number of calls and the importance of the monitoring center by the level information. The first priority value obtained by combining the number of calls and the level information can more accurately reflect the calling needs of the caller and help improve the user experience of the caller.
[0153] According to an embodiment of the present disclosure, before transmitting M target video streams to M callers according to the first priority value, the method also includes: obtaining the total traffic threshold of the docking gateway; determining the second video stream information and the second priority value of the existing video stream being transmitted, the second video stream information including the transmission bit rate of the existing video stream; and calculating the remaining traffic value of the docking gateway based on the transmission bit rate of the existing video stream and the total traffic threshold.
[0154] According to embodiments of the present disclosure, while processing call requests from multiple callers, the docking gateway may be idle or actively transmitting video streams. Because video stream transmission is subject to bandwidth limitations on dedicated network lines, after caching M target video streams and before sending them, it is necessary to determine whether the bandwidth required to transmit the target video streams exceeds the limit.
[0155] According to an embodiment of the present disclosure, when obtaining the total traffic threshold of a docking gateway, the total traffic threshold can be called from the traffic control component of the docking gateway. Alternatively, the total traffic threshold can be loaded into the management module when the docking gateway is started, and the total traffic threshold can be directly obtained without having to call the total traffic threshold from the traffic control component during each processing process.
[0156] According to an embodiment of the present disclosure, when the docking gateway processes M target video streams, the docking gateway may be transmitting one or more video streams. In order to distinguish them from the target video streams, the video streams being transmitted are called existing video streams.
[0157] According to an embodiment of the present disclosure, similar to the process of determining the target video stream, before transmitting the existing video stream, the docking gateway determines the second video stream information and the second priority value of the existing video stream by processing the call request corresponding to the existing video stream. The docking gateway can store the second video stream information and the second priority value in the management component, and before transmitting the target video stream, determine the second video stream information and the second priority value corresponding to the existing video stream from the management component.
[0158] The second video stream information, similar to the first video stream information, can include the device information, video stream properties, and transmission bitrate of the existing video stream. The second priority value is calculated similarly to the first priority value, based on the camera ID, monitoring center ID, video stream properties, and transmission bitrate of the existing video stream.
[0159] According to an embodiment of the present disclosure, the existing video stream and the target video stream share a dedicated network line. When the existing video stream is not transmitted successfully, the transmission process of the existing video stream will affect the transmission process of the target video stream, and the transmission process of the target video stream will also affect the transmission process of the existing video stream.
[0160] Based on the difference between the total traffic threshold and the transmission bit rate of the existing video streams, the remaining traffic value of the docking gateway can be obtained to determine whether the dedicated network line can simultaneously transmit M target video streams.
[0161] According to an embodiment of the present disclosure, after obtaining the remaining traffic value, M target video streams are transmitted to M callers according to the first priority value, including:
[0162] Calculate the total transmission flow value of the M target video streams according to the transmission bit rates of the M target video streams;
[0163] When it is determined that the total transmission flow value is less than or equal to the remaining flow value, the M target video streams are transmitted to the M callers at the same time;
[0164] When it is determined that the total transmission traffic value is greater than the remaining traffic value, the M target video streams are transmitted to the M callers in batches according to the first priority value and the second priority value.
[0165] According to an embodiment of the present disclosure, the bandwidth of a single dedicated network line is limited. By comparing the total transmission traffic value and the remaining traffic value of M target video streams, it can be determined whether the M target video streams can be transmitted without affecting the existing video streams.
[0166] When the total transmission flow is less than or equal to the remaining flow, a single dedicated network line can simultaneously transmit the existing video stream and M target video streams. When the total transmission flow exceeds the remaining flow, bandwidth limitations prevent simultaneous transmission of the existing video stream and M target video streams. It is necessary to determine which existing video stream or target video stream to stop transmitting so that it can be transmitted when the dedicated network line is idle.
[0167] The embodiments of the present disclosure balance the transmission order of the existing video stream and the target video stream by comparing the total transmission flow value and the remaining flow value, thereby ensuring the orderly transmission of the video stream and avoiding transmission errors such as data loss due to bandwidth limitations.
[0168] According to an embodiment of the present disclosure, when it is determined that the total transmission flow value is greater than the remaining flow value, M target video streams are transmitted to M callers in batches according to the first priority value and the second priority value, including:
[0169] When it is determined that the M first priority values are all greater than the second priority value, determine K target video streams from the M target video streams in descending order of the first priority values, and simultaneously transmit the K target video streams to the K callers, wherein the transmission flow values of the K target video streams are less than or equal to the remaining flow value, and 1≤K≤M; and
[0170] Stop transmitting the existing video stream and the (MK) target video streams, so that after completing the transmission operation of the K target video streams, the existing video stream and the (MK) target video streams are transmitted.
[0171] According to an embodiment of the present disclosure, after calculating the first priority values of M target video streams, the M target video streams can be cached in the docking gateway in descending order of the first priority values. By comparing the first priority value of the Mth target video stream with the second priority value of the existing video stream, it can be determined whether the first priority values of the M target video streams are equal to the second priority values.
[0172] If the first priority value of the Mth target video stream is greater than the second priority value, the priorities of all M target video streams are higher than the existing video streams. Since the total transmission flow is greater than the remaining flow, and the existing video stream has the lowest priority, transmission of the existing video stream needs to be stopped. Furthermore, it is necessary to determine whether transmission of some target video streams needs to be stopped.
[0173] According to an embodiment of the present disclosure, K target video streams to be transmitted and (MK) target video streams whose transmission needs to be stopped are determined from M target video streams according to their priorities and transmission bit rates.
[0174] For example, starting with the first target video stream, the transmission flow values required to transmit the target video streams are cumulatively calculated in descending order of the first priority values until it is determined that the transmission flow values of the first K target video streams are less than or equal to the remaining flow value, and the transmission flow values of the first K+1 target video streams are greater than the remaining flow value. K target video streams are determined from the M target video streams, and the K target video streams are simultaneously transmitted to the K callers, and the remaining (MK) target video streams are closed.
[0175] According to an embodiment of the present disclosure, within the docking gateway, the management component may send a stream opening notification to the distribution component, and the distribution component determines K target video streams to be transmitted based on the received stream opening notification.
[0176] When transmitting M target video streams and existing video streams simultaneously, the distribution component receives the open stream notification from the management component and executes the open stream instruction included in the open stream notification to transmit the M target video streams to the M callers. During this process, the existing video streams are not processed.
[0177] According to an embodiment of the present disclosure, when it is determined that the priority of the existing video stream is higher than that of some target videos, the M target video streams and the existing video streams are sorted according to the first priority value and the second priority value to obtain a video stream sequence. Starting from the first video stream in the video stream sequence, the transmission flow values required for transmitting the video streams are cumulatively calculated in descending order of priority until it is determined that the transmission flow values of the first L video streams are less than or equal to the total flow threshold, and the transmission flow values of the first K+1 target video streams are greater than the total flow threshold.
[0178] If the existing video streams are included in the L video streams, the existing video streams are not processed, the L-1 target video streams are transmitted to the corresponding caller, and the remaining (M-L+1) target video streams are closed. If the existing video streams are not included in the L video streams, the L target video streams are transmitted to the corresponding caller, the existing video streams and the remaining (M-L) target video streams are closed, 1≤L≤M.
[0179] In the embodiment of the present disclosure, when a total traffic threshold of a dedicated network line is applied, conflicts between the target video streams and the existing video streams can be avoided by comparing the priorities of the M target video streams and the existing video streams.
[0180] According to an embodiment of the present disclosure, when the transmission of an existing video stream is completed or the transmission of a target video stream is completed, a free transmission flow value is obtained, and the next video stream to be transmitted is determined based on the free transmission flow value. Specifically, a video stream whose transmission flow value is less than or equal to the free transmission flow value is determined from the existing video stream and the remaining (MK) target video streams.
[0181] For example, similar to determining K target video streams, one or more video streams to be transmitted in the next batch are determined from the existing video streams and the remaining (MK) target video streams according to priority.
[0182] According to an embodiment of the present disclosure, after stopping the transmission of the existing video stream and (MK) target video streams, it also includes: generating a shutdown notification corresponding to the existing video stream and (MK) target video streams; and sending the shutdown notification to the caller through the notification component in the docking gateway.
[0183] According to an embodiment of the present disclosure, within the docking gateway, the management component may generate a shut-down notification for stopping the transmission of a video stream; the notification component may receive the shut-down notification and send the shut-down notification to the caller.
[0184] The docking gateway can transmit the target video stream to the caller based on priority. After the caller sends a call request to the docking gateway, the caller must wait for the docking gateway's response. Since the caller does not know whether the video stream can be called or when the video stream will be called, the caller must wait for the video stream to be called.
[0185] The gateway may experience various errors, such as device errors and transmission errors, which may result in the failure to transmit the existing video or the target video stream. This may cause inconsistent video stream call status between the gateway and the caller.
[0186] The present disclosure ensures that the video stream calling status of the caller and the docking gateway are consistent by sending a stream shutdown notification to the caller, thereby avoiding video stream transmission failure due to inconsistent status.
[0187] According to an embodiment of the present disclosure, according to an embodiment of the present disclosure, in response to receiving M target video streams corresponding to M open stream instructions, M first priority values corresponding to the M target video streams are calculated based on the first video stream information of the target video streams, and it also includes: when it is determined that the M target video streams include existing video streams, the existing video streams are deleted from the M target video streams, and the M target video streams are updated.
[0188] According to an embodiment of the present disclosure, while the docking gateway is transmitting the video stream S to the caller, the caller again sends a call request to the docking gateway for calling the video stream S. In this case, repeated sending of the video stream will result in invalid occupation of the dedicated network line.
[0189] According to an embodiment of the present disclosure, in response to receiving M target video streams corresponding to M start-stream instructions, it is determined whether there is an existing video stream among the M target video streams.
[0190] When it is determined that the M target video streams include an existing video stream, the existing video stream is deleted from the M target video streams, and the M target video streams are updated. Then, the first priority values of the updated M target video streams are calculated.
[0191] When it is determined that the M target video streams do not include the existing video stream, the first priority values of the M target video streams are directly calculated.
[0192] The embodiment of the present disclosure avoids repeated transmission of video streams by comparing the target video stream with the existing video streams, which not only reduces the invalid occupation of the dedicated network line, but also reduces the impact on the transmission speed.
[0193] Figure 5 The flowchart of the video stream calling method according to a specific embodiment of the present disclosure is schematically shown.
[0194] like Figure 5 As shown, as a specific embodiment, the method for calling a video stream includes operations S501 to S510.
[0195] S501, parse the call request. Specifically, the docking gateway receives the call request from the caller and parses the call request to obtain the open flow parameters. After completing operation S501, the process proceeds to operation S502.
[0196] S502: Obtain the target video stream. Specifically, after parsing the call request and obtaining the open stream parameters, a stream opening instruction is generated based on the open stream parameters and sent to the monitoring center corresponding to the open stream parameters. In response to the received open stream instruction, the monitoring center sends the target video stream to the docking gateway, which then obtains the target video stream from the monitoring center. After completing operation S502, the process proceeds to operation S503.
[0197] S503: Whether the target video stream already exists. Specifically, after obtaining the target video stream, the target video stream is compared with the existing video stream being transmitted to determine whether the target video stream exists. If it is determined that the target video stream already exists, the process proceeds to operation S505. If it is determined that the target video stream does not exist, the process proceeds to operation S504.
[0198] S504: Calculate the first priority value. Specifically, calculate the first priority value of the target video stream based on the first video stream information of the target video stream. After completing operation S504, proceed to operation S506.
[0199] S505: Return the opened stream. Specifically, return a notification of the opened stream to the caller.
[0200] S506: Has the total traffic threshold been exceeded? Specifically, after calculating the first priority value in S504, a determination is made as to whether the target traffic flow required to transmit the M target video streams and the existing video streams exceeds the total traffic threshold for the dedicated network line. If the target traffic flow does not exceed the total traffic threshold, the process proceeds to S507; if the target traffic flow exceeds the total traffic threshold, the process proceeds to S508.
[0201] S507: Transmit the target video stream. Specifically, do not process the existing video stream, continue to transmit the existing video stream, and transmit the acquired M target video streams. After completing operation S507, proceed to operation S510.
[0202] S508: Compare the first priority value and the second priority value to determine the video stream to stop transmitting. Specifically, compare the first priority values of the M target video streams with the second priority values of the existing video streams to determine the priorities of the M target video streams and the existing video streams. Based on the priorities of the M target video streams and the existing video streams, determine the target video stream and / or the existing video stream to stop transmitting. After completing operation S508, proceed to operation S509.
[0203] S509: Send a flow shutdown notification. Specifically, the flow shutdown notification is sent to the caller through the notification component in the docking gateway.
[0204] S510, end.
[0205] Figure 6 The application scenario of implementing video stream calling by docking with a gateway device according to an embodiment of the present disclosure is schematically illustrated.
[0206] like Figure 6 As shown, the application scenario 600 includes a caller 610, a docking gateway device 620, a front-end server 630, and a video device 640. The docking gateway device 620 includes a docking component 621, a device access component 622, a management component 623, a distribution component 624, a flow control component 625, and a notification component 626.
[0207] The caller 610 initiates a call request to the docking gateway device 620 .
[0208] The docking component 621 receives the call request from the caller 610, parses the call request, obtains the open flow parameters after parsing, and sends the open flow parameters to the device access component 622. The core parameters of the open flow parameters include the monitoring center identifier, device identifier, video stream properties, etc.
[0209] After receiving the open flow parameters, the device access component 622 combines the open flow parameters with standard protocol parameters, such as GBT28181 parameters, to generate an open flow instruction, and then sends the open flow instruction to the front-end server 630 of the monitoring center.
[0210] After receiving the start stream instruction, the front-end server 630 extracts the target video stream corresponding to the start stream instruction and sends the target video stream to the device access component 622. The front-end server 630 can collect the target video stream through the video device 640 and store the collected target video stream in the front-end server 630.
[0211] The device access component 622 obtains the first video information of the target video stream in response to the received target video stream, and sends the target video stream and the first video stream information to the management component 623.
[0212] The management component 623 can obtain the total flow threshold of the entire dedicated network line from the flow control component 625 .
[0213] Management component 623 parses the acquired information and compares the target video stream with the currently existing stock video streams. If the target video stream and the stock video stream are the same video stream, the target video stream is not opened repeatedly. Similarly, if the target video stream includes the stock video stream, the same video stream is not opened repeatedly, and the remaining video streams are continued to be opened.
[0214] Management component 623 simultaneously calculates a weighted first priority value for the target video stream based on the first video stream information, sorts it, and writes it into the cache. It then compares the remaining traffic value with the total traffic required to transmit the target video stream. If the total traffic value is less than or equal to the remaining traffic value, the stream is opened. If the traffic value is greater than the remaining traffic value, the priority of the target video stream is compared with the currently available video streams, and the target video stream to be transmitted and the target video stream and / or the currently available video streams to be stopped are determined.
[0215] For a target video stream that can be transmitted, the management component 623 sends the target video stream to the distribution component 624 , and the distribution component 624 transmits the target video stream to the caller 610 .
[0216] For the target video stream that stops transmitting, the management component 623 sends a stream shutdown notification to the notification component 626 .
[0217] After receiving the flow shut-down notification, the notification component 626 forwards the flow shut-down notification to the caller 610 .
[0218] Figure 7 The structural block diagram of the video stream calling device according to an embodiment of the present disclosure is schematically shown.
[0219] like Figure 7 As shown, the video stream calling device 700 of this embodiment includes a parsing module 710 , a generating module 720 , a calculating module 730 and a transmitting module 740 .
[0220] Parsing module 710 is configured to, in response to receiving M call requests from M callers, parse the M call requests and obtain open stream parameters corresponding to the M call requests, wherein the call requests are used to request a video stream from the docking gateway, and the open stream parameters are used to determine the source of the video stream, where M ≥ 1. In one embodiment, parsing module 710 may be configured to perform operation S210 described above and will not be further described herein.
[0221] The generating module 720 is configured to generate M open-stream instructions according to the open-stream parameters, wherein the open-stream instructions are used to obtain target video streams from N monitoring centers, where 1≤N≤M. In one embodiment, the generating module 720 may be configured to execute the operation S220 described above, which will not be described in detail here.
[0222] Calculation module 730 is configured to, in response to receiving M target video streams corresponding to the M open stream instructions, calculate M first priority values corresponding to the M target video streams based on first video stream information of the target video streams, where the first video stream information is used to characterize attributes of the target video streams. In one embodiment, calculation module 730 may be configured to perform operation S230 described above, which will not be further described herein.
[0223] The transmission module 740 is configured to transmit the M target video streams to the M callers according to the first priority value. In one embodiment, the transmission module 740 may be configured to perform the operation S240 described above, which will not be described in detail herein.
[0224] According to an embodiment of the present disclosure, the calculation module 730 includes a first calculation submodule and a second calculation submodule.
[0225] The first calculation submodule is used to calculate M first priority values corresponding to the M target video streams based on device information, video stream properties and transmission bit rate. In one embodiment, the first calculation submodule can be used to perform the operation S331 described above, which will not be repeated here.
[0226] The second calculation submodule is used to cache the M target video streams to the docking gateway based on the first priority value. In one embodiment, the second calculation submodule can be used to perform the operation S332 described above, which will not be repeated here.
[0227] According to an embodiment of the present disclosure, the first computing submodule includes a first computing unit, a second computing unit, a third computing unit, and a fourth computing unit.
[0228] The first calculation unit is used to determine a first evaluation value according to the camera identifier.
[0229] The second calculation unit is used to determine a second evaluation value according to a property of the video stream.
[0230] The third calculation unit is used to determine a third evaluation value according to the transmission code rate.
[0231] The fourth calculation unit is used to determine a fourth evaluation value according to the monitoring center identifier.
[0232] The fifth calculation unit is configured to multiply the first evaluation value, the second evaluation value, the third evaluation value, and the fourth evaluation value to obtain a first priority value of the target video stream.
[0233] According to an embodiment of the present disclosure, the fourth computing unit includes a first computing subunit and a second computing subunit.
[0234] The first calculation subunit is used to determine the level information and call times corresponding to the monitoring center identifier according to the monitoring center identifier, and the call times are used to represent the total number of successful calls to the video stream in the monitoring center within a preset time period.
[0235] The second calculation subunit is used to determine a fourth evaluation value according to the level information and the number of calls.
[0236] According to an embodiment of the present disclosure, the video stream calling device 700 further includes a traffic threshold calculation module, and the traffic threshold acquisition module includes a threshold acquisition unit, a threshold determination unit, and a threshold calculation unit.
[0237] The threshold acquisition unit is used to obtain the total flow threshold of the interconnected gateway.
[0238] The threshold determination unit is used to determine the second video stream information and the second priority value of the existing video stream being transmitted, where the second video stream information includes the transmission bit rate of the existing video stream.
[0239] The threshold calculation unit is used to calculate the remaining traffic value of the connected gateway according to the transmission bit rate of the existing video stream and the total traffic threshold.
[0240] According to an embodiment of the present disclosure, the transmission module 740 includes a first transmission unit, a second transmission unit, and a third transmission unit.
[0241] The first transmission unit is used to calculate the total transmission flow value of the M target video streams according to the transmission bit rates of the M target video streams.
[0242] The second transmission unit is used to simultaneously transmit M target video streams to M callers when it is determined that the total transmission traffic value is less than or equal to the remaining traffic value.
[0243] The third transmission unit is used to transmit the M target video streams to the M callers in batches according to the first priority value and the second priority value when it is determined that the total transmission traffic value is greater than the remaining traffic value.
[0244] According to an embodiment of the present disclosure, the third transmission unit includes a first transmission sub-unit and a second transmission sub-unit.
[0245] The first transmission sub-unit is used to determine K target video streams from the M target video streams in descending order of the first priority values when it is determined that the M first priority values are all greater than the second priority value, and to simultaneously transmit the K target video streams to K callers, wherein the transmission flow value of the K target video streams is less than or equal to the remaining flow value, and 1≤K≤M.
[0246] The second transmission subunit is used to stop transmitting the existing video stream and the (MK) target video streams, so as to transmit the existing video stream and the (MK) target video streams after completing the transmission operation of the K target video streams.
[0247] According to an embodiment of the present disclosure, the third transmission unit further includes a third transmission sub-unit and a fourth transmission sub-unit.
[0248] The third transmission subunit is used to generate a closing notification corresponding to the existing video stream and (MK) target video streams.
[0249] The fourth transmission subunit is used to send the flow shutdown notification to the caller through the notification component in the docking gateway.
[0250] According to an embodiment of the present disclosure, the transmission module 740 further includes an updating unit for deleting the existing video stream from the M target video streams and updating the M target video streams when it is determined that the M target video streams include the existing video stream.
[0251] According to an embodiment of the present disclosure, any multiple modules among the parsing module 710, the generation module 720, the calculation module 730, and the transmission module 740 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the parsing module 710, the generation module 720, the calculation module 730, and the transmission module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the parsing module 710, the generation module 720, the calculation module 730, and the transmission module 740 can be at least partially implemented as a computer program module, which can perform the corresponding function when the computer program module is executed.
[0252] Figure 8 The block diagram schematically shows an electronic device suitable for the video stream calling method according to an embodiment of the present disclosure.
[0253] like Figure 8As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0254] Various programs and data required for the operation of the electronic device 800 are stored in the RAM 803. The processor 801, ROM 802, and RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.
[0255] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage portion 808 including a hard disk; and a communication portion 809 including a network interface card such as a LAN card or a modem. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 810 as needed, so that a computer program read therefrom can be installed into the storage portion 808 as needed.
[0256] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0257] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.
[0258] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the video stream calling method provided by the embodiments of the present disclosure.
[0259] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0260] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0261] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from a removable medium 811. When the computer program is executed by the processor 801, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0262] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0263] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0264] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.
[0265] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present disclosure. It should be understood that the above are only specific embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A video stream calling method, comprising: In response to receiving M call requests from M callers, the docking gateway parses the M call requests to obtain open stream parameters corresponding to the M call requests, wherein the call requests are used to request the docking gateway to call a video stream, and the open stream parameters are used to determine the source of the video stream, M≥1, wherein the docking gateway is used to simultaneously receive the M call requests from the M callers; Generate M open-stream instructions according to the open-stream parameters, wherein the open-stream instructions are used by the docking gateway to obtain target video streams from N monitoring centers, 1≤N≤M; In response to receiving M target video streams corresponding to M open-stream instructions, calculating M first priority values corresponding to the M target video streams according to first video stream information of the target video streams, including: determining a first evaluation value according to a camera identifier; determining a second evaluation value according to a property of the video stream; determining a third evaluation value according to a transmission bit rate; determining a fourth evaluation value according to a monitoring center identifier; and multiplying the first evaluation value, the second evaluation value, the third evaluation value, and the fourth evaluation value to obtain a first priority number of the target video stream; based on the first priority value, caching the M target video streams to the docking gateway, wherein the first video stream information is used to characterize the properties of the target video stream; and Transmitting the M target video streams to the M callers according to the first priority value; The first video stream information includes the device information, video stream properties and transmission bit rate of the target video stream, and the device information includes a monitoring center identifier and a camera identifier.
2. The method according to claim 1, wherein Determining the fourth evaluation value according to the monitoring center identifier includes: According to the monitoring center identifier, determining the level information and call count corresponding to the monitoring center identifier, the call count being used to represent the total number of successful calls to the video stream in the monitoring center within a preset time period; and A fourth evaluation value is determined according to the level information and the number of calls.
3. The method according to claim 1, wherein Before transmitting the M target video streams to the M callers according to the first priority value, the method further includes: Obtaining the total traffic threshold of the docking gateway; Determining second video stream information and a second priority value of the existing video stream being transmitted, where the second video stream information includes a transmission bit rate of the existing video stream; The remaining traffic value of the docking gateway is calculated according to the transmission bit rate of the existing video stream and the total traffic threshold.
4. The method according to claim 3, wherein: The transmitting the M target video streams to the M callers according to the first priority value includes: Calculating the total transmission flow rate of the M target video streams according to the transmission bit rates of the M target video streams; When it is determined that the total transmission flow value is less than or equal to the remaining flow value, the M target video streams are simultaneously transmitted to the M callers; When it is determined that the total transmission traffic value is greater than the remaining traffic value, the M target video streams are transmitted to the M callers in batches according to the first priority value and the second priority value.
5. The method according to claim 4, wherein The method of transmitting the M target video streams to the M callers in batches according to the first priority value and the second priority value when it is determined that the total transmission flow value is greater than the remaining flow value includes: When it is determined that all M first priority values are greater than the second priority value, determining K target video streams from the M target video streams in descending order of the first priority values, and simultaneously transmitting the K target video streams to K callers, wherein a transmission flow value of the K target video streams is less than or equal to the remaining flow value, and 1≤K≤M; and Stop transmitting the existing video stream and the (MK) target video streams so that after completing the transmission operation of the K target video streams, transmit the existing video stream and the (MK) target video streams.
6. The method according to claim 5, further comprising: Generate a closing notification corresponding to the existing video stream and (MK) target video streams; as well as The closing notification is sent to the caller via the notification component in the docking gateway.
7. The method according to claim 3, wherein: In response to receiving M target video streams corresponding to the M open stream instructions, calculating M first priority values corresponding to the M target video streams according to first video stream information of the target video streams, further comprising: When it is determined that the M target video streams include the existing video stream, the existing video stream is deleted from the M target video streams, and the M target video streams are updated.
8. A video stream calling device, comprising: a parsing module configured to, in response to receiving M call requests from M callers, parse the M call requests by the docking gateway to obtain open stream parameters corresponding to the M call requests, wherein the call request is used to request the docking gateway to call a video stream, and the open stream parameters are used to determine the source of the video stream, M ≥ 1, wherein the docking gateway is configured to simultaneously receive the M call requests from the M callers; A generating module, configured to generate M open-stream instructions according to the open-stream parameters, wherein the open-stream instructions are used by the docking gateway to obtain target video streams from N monitoring centers, where 1≤N≤M; A calculation module, configured to, in response to receiving M target video streams corresponding to the M open-stream instructions, calculate M first priority values corresponding to the M target video streams according to first video stream information of the target video streams, including: determining a first evaluation value according to a camera identifier; determining a second evaluation value according to a property of the video stream; determining a third evaluation value according to a transmission bit rate; determining a fourth evaluation value according to a monitoring center identifier; and multiplying the first evaluation value, the second evaluation value, the third evaluation value, and the fourth evaluation value to obtain a first priority number of the target video stream; caching the M target video streams to the docking gateway based on the first priority value, wherein the first video stream information is used to characterize the properties of the target video stream; and a transmission module, configured to transmit the M target video streams to the M callers according to the first priority value; The first video stream information includes the device information, video stream properties and transmission bit rate of the target video stream, and the device information includes a monitoring center identifier and a camera identifier.
9. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Video stream flow limiting method and device
CN113556585A