CN110719225A - Method, device and storage medium for controlling stream media path based on IP network - Google Patents
Method, device and storage medium for controlling stream media path based on IP network Download PDFInfo
- Publication number
- CN110719225A CN110719225A CN201910842907.5A CN201910842907A CN110719225A CN 110719225 A CN110719225 A CN 110719225A CN 201910842907 A CN201910842907 A CN 201910842907A CN 110719225 A CN110719225 A CN 110719225A
- Authority
- CN
- China
- Prior art keywords
- media
- forwarding node
- optimal
- media forwarding
- nodes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 230000011664 signaling Effects 0.000 claims description 23
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 230000005540 biological transmission Effects 0.000 abstract description 12
- 238000004364 calculation method Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000006855 networking Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/741—Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Multimedia (AREA)
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of streaming media paths, and provides a method, a device and a storage medium for controlling a streaming media path based on an IP network, wherein the method comprises the following steps: based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server; acquiring operator and home location information corresponding to the IP address; matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal; acquiring an optimal path between the first forwarding node and the second forwarding node; and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end. The invention can save time, reduce the complexity of path calculation and improve the transmission quality between terminals.
Description
Technical Field
The present invention relates to the field of streaming media path technologies, and in particular, to a method and an apparatus for controlling a streaming media path based on an IP network, and a computer-readable storage medium.
Background
With the high-speed popularization of smart phones, applications on smart phones have also been rapidly developed, wherein more and more applications have voice and video call functions. The transmission of streaming media such as voice and video has higher and higher quality requirements on network transmission, and transmission delay, packet loss, network jitter and the like have obvious influence on user experience.
In the process of audio and video call, the two most key technologies are client engine and network transmission, and with the rapid development and large-scale popularization of the internet, the number of voice call type APPs based on the IP is infinite. At present, a common problem of the APP in the conversation process is the transmission quality problem of real-time streaming media, and the application development of real-time communication is severely restricted and influenced by packet loss, time delay, jitter and the like.
In practical applications, especially in the case of very unstable wireless transmission network on mobile client, the bandwidth of the internet core network is very tight, and for the end-to-end transmission problem, many companies have recognized the seriousness of the problem and have individually proposed their own networking schemes. Some large companies are also added, and many schemes are output, such as private network networking, RTN and the like.
At present, the traditional method is to rent IDCs or cloud hosts to build a mesh topological graph, and the software calculates the shortest path between end to end by using Dijkstra algorithm. Thereby ensuring the best end-to-end conversation effect. The scheme needs all the terminals and nodes to gather all the network quality data in the background before the call, and complex calculation is carried out. When the number of networking nodes is small, the problem is solved, but with the increase of the number of nodes, the path calculation number is exponentially increased, so that the pressure is brought to the server, and the acquisition and summarization process of acquiring the network data of the client is extremely complex, and the call quality between the client and the server is influenced.
Disclosure of Invention
The invention provides a streaming media path control method based on an IP network, an electronic device and a computer readable storage medium, which mainly aim to realize the communication between terminals, and a client does not need to detect the network in real time and report the quality, can intelligently allocate access points and improve the transmission quality, thereby achieving the aim of saving the flow and time of a user.
In order to achieve the above object, the present invention provides a streaming media path control method based on an IP network, applied to an electronic device, the method including:
based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server;
acquiring operator and home location information corresponding to the IP address;
matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
acquiring an optimal path between the first forwarding node and the second forwarding node;
and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
Preferably, the server comprises a call signaling server and a media control server connected with each other; wherein,
the calling terminal and the called terminal are registered on the call signaling server in advance;
and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
Preferably, the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home information includes:
matching all media forwarding nodes which are the same as the operator to which the calling terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country-level region of the calling terminal, if a plurality of the media forwarding nodes which are the same as the country-level region of the calling terminal exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and otherwise, failing to match.
Preferably, the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home location information further includes:
matching all media forwarding nodes which are the same as the operator to which the called terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country level region of the called end, if a plurality of the media forwarding nodes which are the same as the country level region of the called end exist, selecting one of the media forwarding nodes as the optimal media forwarding node, and otherwise, failing to match.
Preferably, the step of obtaining the best path between the first forwarding node and the second forwarding node comprises:
acquiring network quality topological graphs of all media forwarding nodes corresponding to the IP address through the media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on the network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
Preferably, the step of obtaining the network quality topology map comprises:
a calling terminal sends a user datagram protocol sequence packet to the media forwarding node and receives the user datagram protocol sequence packet returned by the media forwarding node;
the calling end counts the time delay and jitter information of each sequence packet according to the receiving sequence number of the user datagram protocol sequence packet;
and the calling terminal counts the packet loss rate in unit time and forms single-point data according to the number of the user datagram protocol sequence packets received in unit time, and forms the network quality topological graph based on the summarization of all the single-point data.
To achieve the above object, the present invention also provides an electronic device, including: the storage comprises a streaming media path control program based on an IP network, and the processor executes the streaming media path control program based on the IP network to realize the following steps:
based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server;
acquiring operator and home location information corresponding to the IP address;
matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
acquiring an optimal path between the first forwarding node and the second forwarding node;
and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
Preferably, the server comprises a call signaling server and a media control server connected with each other; wherein,
the calling terminal and the called terminal are registered on the call signaling server in advance;
and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
Preferably, the step of obtaining the best path between the first forwarding node and the second forwarding node comprises:
acquiring network quality topological graphs of all media forwarding nodes corresponding to the IP address through the media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on the network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, which includes a streaming media path control program based on an IP network, and when the streaming media path control program based on the IP network is executed by a processor, the streaming media path control program based on the IP network implements any step in the streaming media path control method based on the IP network.
The streaming media path control method based on the IP network, the electronic device and the computer readable storage medium provided by the invention can eliminate the existing reporting process of network quality on the end, replace the existing reporting process by adopting the nearby access points, further realize the communication between the end and the end by calculating the optimal path between the nearby access points, and the client does not need to detect the network and report the quality in real time, can intelligently distribute the access points, improve the transmission quality and save the user flow and time.
Drawings
FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of a method for controlling a streaming media path based on an IP network according to the present invention;
FIG. 2 is a block diagram of a preferred embodiment of the IP network based streaming media path control procedure of FIG. 1;
FIG. 3 is a flowchart illustrating a method for controlling a streaming media path based on an IP network according to a preferred embodiment of the present invention;
FIG. 4 is a logic diagram of the method for controlling a streaming media path based on an IP network according to the present invention;
fig. 5 is a path diagram of a streaming media path control method based on an IP network.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a stream media path control method based on an IP network, which is applied to an electronic device 1. Fig. 1 is a schematic diagram of an application environment of a preferred embodiment of the method for controlling a streaming media path based on an IP network according to the present invention.
In the present embodiment, the electronic device 1 may be a terminal device having an arithmetic function, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
The electronic device 1 includes: a processor 12, a memory 11, a network interface 14, and a communication bus 15.
The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory 11, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic apparatus 1, such as a hard disk of the electronic apparatus 1. In other embodiments, the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1.
In the present embodiment, the readable storage medium of the memory 11 is generally used for storing the streaming media path control program 10 and the like based on the IP network installed in the electronic device 1. The memory 11 may also be used to temporarily store data that has been output or is to be output.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the electronic apparatus 1 and other electronic devices.
The communication bus 15 is used to realize connection communication between these components.
Fig. 1 only shows the electronic device 1 with components 11-15, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
Optionally, the electronic device 1 may further include a user interface, the user interface may include an input unit such as a Keyboard (Keyboard), a voice input device such as a microphone (microphone) or other equipment with a voice recognition function, a voice output device such as a sound box, a headset, etc., and optionally the user interface may further include a standard wired interface, a wireless interface.
Optionally, the electronic device 1 may further comprise a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an Organic Light-Emitting Diode (OLED) touch device, or the like. The display is used for displaying information processed in the electronic apparatus 1 and for displaying a visualized user interface.
Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is called a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example.
The area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
Optionally, the electronic device 1 may further include a Radio Frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described herein again.
In the apparatus embodiment shown in fig. 1, a memory 11, which is a kind of computer storage medium, may include therein an operating system, and a streaming media path control program 10 based on an IP network; the processor 12 implements the following steps when executing the IP network based streaming media path control program 10 stored in the memory 11:
based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server;
acquiring operator and home location information corresponding to the IP address;
matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
acquiring an optimal path between the first forwarding node and the second forwarding node;
and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
Preferably, the server comprises a call signaling server and a media control server connected with each other; wherein,
the calling terminal and the called terminal are registered on the call signaling server in advance;
and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
Preferably, the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home information includes:
matching all media forwarding nodes which are the same as the operator to which the calling terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country-level region of the calling terminal, if a plurality of the media forwarding nodes which are the same as the country-level region of the calling terminal exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and otherwise, failing to match.
Preferably, the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home location information further includes:
matching all media forwarding nodes which are the same as the operator to which the called terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country level region of the called end, if a plurality of the media forwarding nodes which are the same as the country level region of the called end exist, selecting one of the media forwarding nodes as the optimal media forwarding node, and otherwise, failing to match.
Preferably, the step of obtaining the best path between the first forwarding node and the second forwarding node comprises:
acquiring network quality topological graphs of all media forwarding nodes corresponding to the IP address through the media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on the network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
Preferably, the step of obtaining the network quality topology map comprises:
a calling terminal sends a user datagram protocol sequence packet to the media forwarding node and receives the user datagram protocol sequence packet returned by the media forwarding node;
the calling end counts the time delay and jitter information of each sequence packet according to the receiving sequence number of the user datagram protocol sequence packet;
and the calling terminal counts the packet loss rate in unit time and forms single-point data according to the number of the user datagram protocol sequence packets received in unit time, and forms the network quality topological graph based on the summarization of all the single-point data.
In other embodiments, the IP network-based streaming media path control program 10 may also be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by the processor 12 to accomplish the present invention. The modules referred to herein are referred to as a series of computer program instruction segments capable of performing specified functions. Referring to fig. 2, a block diagram of a preferred embodiment of the IP network based streaming media path control program 10 of fig. 1 is shown. The IP network-based streaming media path control program 10 may be divided into: an IP address obtaining unit 11, an IP information obtaining unit 12, a forwarding node matching unit 13, an optimal path obtaining unit 14, and a call implementing unit 15. The functions or operation steps performed by the modules 11-15 are similar to those described above and will not be described in detail here, for example, where:
an IP address acquisition unit 11 for acquiring IP addresses of the calling terminal and the called terminal through the server based on the telephone outgoing call request;
an IP information obtaining unit 12, configured to obtain operator and home location information corresponding to the IP address;
a forwarding node matching unit 13, configured to match an optimal media forwarding node corresponding to the IP address according to the operator and home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
an optimal path obtaining unit 14, configured to obtain an optimal path between the first forwarding node and the second forwarding node;
and a call implementing unit 15, configured to open a channel between the calling end and the called end according to the optimal path, and implement a call between the calling end and the called end.
In addition, the invention also provides a method for controlling the streaming media path based on the IP network. Fig. 3 is a flowchart of a preferred embodiment of the IP network-based streaming media path control method of the present invention, and is collectively shown in a logic block diagram of the IP network-based streaming media path control method of fig. 4. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the IP network-based streaming media path control of the present invention includes:
s110: based on the telephone outgoing call request, the IP addresses of the calling terminal and the called terminal are acquired through the server.
The server comprises a call signaling server and a media control server which are connected with each other; the calling terminal and the called terminal are registered on the call signaling server in advance; and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
Specifically, c1 and c2 are respectively configured to represent two calling or video clients, that is, a calling end or a called end may be a calling end or a video client, c1 and c2 are connected to a call signaling server (CSC server for short), the call signaling server is further connected to a media control server (mcs server for short), and c1 and c2 are registered in the CSC server in advance, at this time, the CSC server may obtain IP addresses of c1 and c2 and store the IP addresses in the mcs server, and when a call is made, home regions and operator information of the IP may be searched according to the IP addresses.
S120: and acquiring the operator and home location information corresponding to the IP address.
As shown in fig. 4, media point is a media forwarding node, a cluster mode, referred to as mp server for short, is deployed, all mp servers are registered on an mcs server, and at this time, IP addresses of all mp servers can be obtained by mcs, and corresponding IP home locations and operator information are queried according to the IP addresses.
S130: matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal.
The step of matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information comprises the following steps:
1. matching all media forwarding nodes which are the same as the operator to which the calling terminal belongs;
2. matching all media forwarding nodes which are the same as the city-level region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
3. matching all media forwarding nodes which are the same as the provincial region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
4. and matching all the media forwarding nodes which are the same as the country-level region of the calling terminal, if a plurality of the media forwarding nodes which are the same as the country-level region of the calling terminal exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and otherwise, failing to match.
Correspondingly, the step of matching the optimal media forwarding node corresponding to the IP address according to the operator and home location information further includes:
1. matching all media forwarding nodes which are the same as the operator to which the called terminal belongs;
2. matching all media forwarding nodes which are the same as the city-level region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
3. matching all media forwarding nodes which are the same as the provincial region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
4. matching all media forwarding nodes which are the same as the country level region of the called end, if a plurality of media forwarding nodes which are the same as the country level region of the called end exist, selecting one of the media forwarding nodes as an optimal media forwarding node, otherwise, failing to match
S140: and acquiring the optimal path between the first forwarding node and the second forwarding node.
Wherein the step of obtaining the optimal path between the first forwarding node and the second forwarding node comprises:
acquiring a network quality topological graph of all media forwarding nodes corresponding to the IP address through a media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on a network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
Specifically, in the process of obtaining the optimal path, the optimal path between two media forwarding nodes is calculated through the mcs server, node information of the two media forwarding nodes is output according to a network quality topological graph, and the node information is obtained through a dijkstra algorithm. The dijkstra algorithm is used for calculating the shortest path from one node to other nodes and is mainly characterized in that the shortest path is expanded outwards layer by taking a starting point as a center (breadth-first search idea) until the shortest path is expanded to a terminal point.
As a specific example, as shown in the following fig. 5, which is a path diagram of a streaming media path control method based on an IP network, it is sufficient to set that two clients respectively allocate m1 and m4 as media access points, and then calculate the shortest path from m1 to m4 through a media control server.
1. Starting from the starting point m1, m1 is initialized until the size of each node is infinite.
2. The original node m1 is removed and the neighbor nodes of m1 are updated. Wherein D (m2) is 12, D (m3) is 55, D (m5) is 15, and D (m6) is 28.
3. As the minimum node is m2, the minimum node m2 is removed, and the adjacent nodes of m2 are updated. Wherein D (m4) ═ 48.
4. The minimum node m5 is removed and the neighbor node is updated, D (m4) ═ 31.
5. The minimum node m6 is removed, and the adjacent nodes are updated, and the update is not needed.
6. The minimum node m4 is removed, and the adjacent nodes are updated, and the update is not needed.
7. The minimum node m3 is removed, and the adjacent nodes are updated, and the update is not needed.
8. So the optimal path from m1 to m4 is D (m4) ═ 31, and the path is m1- > m5- > m 4.
S150: and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
In practical applications, when c1 calls out, the csc server receives the call information and informs the mcs server of the call information (c1 is now calling c2), and the mcs server matches all mp server nodes according to the ip address information of c1 and selects the first forwarding node of the calling end or the calling end. And matching all mp server nodes according to the ip address information of c2, selecting a called end or a second forwarding node of the called end, and if the first forwarding node and the second forwarding node are the same mp server node, determining that the network quality of the first forwarding node and the second forwarding node is the best, and at this time, not calculating the best path.
In addition, network detection must be performed between all streaming media forwarding nodes to form single-point data, which is reported to the media control server for centralized summarization. Therefore, a complete network quality transmission diagram can be obtained at the media control server, and when the network quality transmission diagram appears in a telephone or video outgoing call, the optimal path can be rapidly calculated at one time.
Further, the step of obtaining the network quality topology map comprises:
1. a calling terminal sends a user datagram protocol sequence packet to the media forwarding node and receives the user datagram protocol sequence packet returned by the media forwarding node;
2. the calling end counts the time delay and jitter information of each sequence packet according to the receiving sequence number of the user datagram protocol sequence packet;
3. and the calling terminal counts the packet loss rate in unit time and forms single-point data according to the number of the user datagram protocol sequence packets received in unit time, and forms the network quality topological graph based on the summarization of all the single-point data.
Specifically, in the network probing process, first, the calling end sends udp (User datagram protocol) sequence packets at a rate of 100p/s, and udp fixes 100 bytes in size. Then, the media forwarding node receives the udp sequential packet and returns the udp sequential packet to the calling end. Then, the calling end counts the time delay and jitter of each packet according to the receiving sequence number of the udp packet. And finally, the calling end counts the packet loss rate in unit time according to the number of received udp packets in unit time, and finally forms single-point data.
By utilizing the method for controlling the streaming media path based on the IP network, the access points can be accurately and effectively intelligently distributed, the client does not need to detect the network in real time and report the quality, a large amount of flow of a user can be saved, and the answering waiting time of the user can be reduced; in addition, only the shortest paths of the media access points at the two ends are calculated, so that the problem of a client is not considered any more, the complexity of path calculation can be reduced to a certain extent, and the user experience is improved.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a streaming media path control program based on an IP network, and when executed by a processor, the streaming media path control program based on the IP network implements the following operations:
based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server;
acquiring operator and home location information corresponding to the IP address;
matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
acquiring an optimal path between the first forwarding node and the second forwarding node;
and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
Preferably, the server comprises a call signaling server and a media control server connected with each other; wherein,
the calling terminal and the called terminal are registered on the call signaling server in advance;
and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
Preferably, the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home information includes:
matching all media forwarding nodes which are the same as the operator to which the calling terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country-level region of the calling terminal, if a plurality of the media forwarding nodes which are the same as the country-level region of the calling terminal exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and otherwise, failing to match.
Preferably, the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home location information further includes:
matching all media forwarding nodes which are the same as the operator to which the called terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country level region of the called end, if a plurality of the media forwarding nodes which are the same as the country level region of the called end exist, selecting one of the media forwarding nodes as the optimal media forwarding node, and otherwise, failing to match.
Preferably, the step of obtaining the best path between the first forwarding node and the second forwarding node comprises:
acquiring network quality topological graphs of all media forwarding nodes corresponding to the IP address through the media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on the network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
Preferably, the step of obtaining the network quality topology map comprises:
a calling terminal sends a user datagram protocol sequence packet to the media forwarding node and receives the user datagram protocol sequence packet returned by the media forwarding node;
the calling end counts the time delay and jitter information of each sequence packet according to the receiving sequence number of the user datagram protocol sequence packet;
and the calling terminal counts the packet loss rate in unit time according to the number of the user datagram protocol sequence packets received in unit time and forms single-point data to form the network quality topological graph based on the summary of all the single-point data.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the above-mentioned streaming media path control method based on the IP network and the specific implementation of the electronic device, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A stream media path control method based on IP network is applied to an electronic device, and is characterized in that the method comprises the following steps:
based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server;
acquiring operator and home location information corresponding to the IP address;
matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
acquiring an optimal path between the first forwarding node and the second forwarding node;
and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
2. The IP-network-based streaming media path control method according to claim 1, wherein the server includes a call signaling server and a media control server connected to each other; wherein,
the calling terminal and the called terminal are registered on the call signaling server in advance;
and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
3. The IP-network-based streaming media path control method according to claim 1, wherein the step of matching an optimal media forwarding node corresponding to the IP address according to the operator and home information comprises:
matching all media forwarding nodes which are the same as the operator to which the calling terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the calling terminal belongs in all media forwarding nodes which are the same as the operator to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the calling terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the calling terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country-level region of the calling terminal, if a plurality of the media forwarding nodes which are the same as the country-level region of the calling terminal exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and otherwise, failing to match.
4. The IP-network-based streaming media path control method according to claim 1, wherein the step of matching the optimal media forwarding node corresponding to the IP address according to the operator and home information further comprises:
matching all media forwarding nodes which are the same as the operator to which the called terminal belongs;
matching all media forwarding nodes which are the same as the city-level region to which the called terminal belongs in all media forwarding nodes which are the same as the operator to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the city-level region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
matching all media forwarding nodes which are the same as the provincial region to which the called terminal belongs, if a plurality of media forwarding nodes which are the same as the provincial region to which the called terminal belongs exist, selecting one of the media forwarding nodes as an optimal media forwarding node, and if not, executing the next step;
and matching all the media forwarding nodes which are the same as the country level region of the called end, if a plurality of the media forwarding nodes which are the same as the country level region of the called end exist, selecting one of the media forwarding nodes as the optimal media forwarding node, and otherwise, failing to match.
5. The IP-network-based streaming media path control method according to claim 2, wherein the step of obtaining the optimal path between the first forwarding node and the second forwarding node comprises:
acquiring network quality topological graphs of all media forwarding nodes corresponding to the IP address through the media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on the network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
6. The IP-network-based streaming media path control method according to claim 5, wherein the step of obtaining the network quality topology map of all media forwarding nodes corresponding to the IP address comprises:
the calling terminal sends a user datagram protocol sequence packet to the media forwarding node and receives the user datagram protocol sequence packet returned by the media forwarding node;
the calling end counts the time delay and jitter information of each sequence packet according to the receiving sequence number of the user datagram protocol sequence packet;
and the calling terminal counts the packet loss rate in unit time and forms single-point data according to the number of the user datagram protocol sequence packets received in unit time, and forms the network quality topological graph based on the summarization of all the single-point data.
7. An electronic device, comprising: the storage comprises a streaming media path control program based on an IP network, and the processor executes the streaming media path control program based on the IP network to realize the following steps:
based on the telephone calling request, acquiring IP addresses of a calling terminal and a called terminal through a server;
acquiring operator and home location information corresponding to the IP address;
matching the optimal media forwarding node corresponding to the IP address according to the operator and the home location information; the optimal media forwarding node comprises a first forwarding node corresponding to the calling terminal and a second forwarding node corresponding to the called terminal;
acquiring an optimal path between the first forwarding node and the second forwarding node;
and according to the optimal path, opening a channel between the calling end and the called end, and realizing the conversation between the calling end and the called end.
8. The electronic device of claim 7, wherein the server comprises a call signaling server and a media control server connected to each other; wherein,
the calling terminal and the called terminal are registered on the call signaling server in advance;
and acquiring the IP addresses of the calling terminal and the called terminal through the call signaling server and storing the IP addresses into the media control server.
9. The electronic device of claim 7, wherein obtaining the best path between the first forwarding node and the second forwarding node comprises:
acquiring network quality topological graphs of all media forwarding nodes corresponding to the IP address through the media control server;
outputting node information respectively corresponding to the first forwarding node and the second forwarding node based on the network quality topological graph;
and acquiring an optimal path between the first forwarding node and the second forwarding node based on the Dijkstra algorithm and the node information.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium includes therein an IP network-based streaming media path control program, which when executed by a processor, implements the IP network-based streaming media path control method steps of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910842907.5A CN110719225B (en) | 2019-09-06 | 2019-09-06 | Method, device and storage medium for controlling stream media path based on IP network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910842907.5A CN110719225B (en) | 2019-09-06 | 2019-09-06 | Method, device and storage medium for controlling stream media path based on IP network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110719225A true CN110719225A (en) | 2020-01-21 |
CN110719225B CN110719225B (en) | 2022-07-08 |
Family
ID=69210321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910842907.5A Active CN110719225B (en) | 2019-09-06 | 2019-09-06 | Method, device and storage medium for controlling stream media path based on IP network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110719225B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118101876A (en) * | 2024-01-25 | 2024-05-28 | 中科世通亨奇(北京)科技有限公司 | Method, system, storage medium and electronic equipment for real-time audio and video communication |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104202786A (en) * | 2014-08-27 | 2014-12-10 | 中国联合网络通信集团有限公司 | Method and device for calling routing |
US20160065446A1 (en) * | 2014-08-27 | 2016-03-03 | Tangome, Inc. | Mobile relay network intelligent routing |
CN106100993A (en) * | 2016-06-13 | 2016-11-09 | 北京容联易通信息技术有限公司 | A kind of Streaming Media optimum route distribution method |
CN106549953A (en) * | 2016-10-31 | 2017-03-29 | 中国联合网络通信集团有限公司 | A kind of method and system of call routing |
-
2019
- 2019-09-06 CN CN201910842907.5A patent/CN110719225B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104202786A (en) * | 2014-08-27 | 2014-12-10 | 中国联合网络通信集团有限公司 | Method and device for calling routing |
US20160065446A1 (en) * | 2014-08-27 | 2016-03-03 | Tangome, Inc. | Mobile relay network intelligent routing |
CN106100993A (en) * | 2016-06-13 | 2016-11-09 | 北京容联易通信息技术有限公司 | A kind of Streaming Media optimum route distribution method |
CN106549953A (en) * | 2016-10-31 | 2017-03-29 | 中国联合网络通信集团有限公司 | A kind of method and system of call routing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118101876A (en) * | 2024-01-25 | 2024-05-28 | 中科世通亨奇(北京)科技有限公司 | Method, system, storage medium and electronic equipment for real-time audio and video communication |
Also Published As
Publication number | Publication date |
---|---|
CN110719225B (en) | 2022-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102938794B (en) | ARP message forwarding method, switch and controller | |
US9547719B2 (en) | Bandwidth efficient processing and filtering across distributed databases | |
CN113366815B (en) | Network resource request method, device, electronic equipment and storage medium | |
CN111510476B (en) | Communication method, communication device, computer equipment and computer readable storage medium | |
CN110545206B (en) | Method, device and system for generating scheduling table in time-triggered network | |
US9307555B2 (en) | Method and system for mobile terminal to access the network through cell phone | |
CN104579970B (en) | A kind of strategy matching device of IPv6 messages | |
WO2016177191A1 (en) | Packet processing method and device | |
CN110719225B (en) | Method, device and storage medium for controlling stream media path based on IP network | |
CN113824789A (en) | Configuration method, device, equipment and storage medium of path descriptor | |
CN103581020B (en) | The method of a kind of message forwarding, Apparatus and system | |
CN110768911A (en) | Efficient flow guiding method, device, equipment, system and storage medium | |
CN108574637B (en) | Address self-learning method and device and switch | |
JP4331253B2 (en) | VoIP service system, call control server, and call control method | |
CN104113475B (en) | The network route implementation method and system of home gateway based on Linux | |
KR100720190B1 (en) | Fast rule lookup with arbitrary ip range configurations | |
CN107612831B (en) | Transmission method and device for data message of access source station | |
KR101707308B1 (en) | Communication Server | |
CN113472812B (en) | Message data processing method and device and computer readable storage medium | |
JP2016178530A (en) | Communication system, communication terminal, communication method, and program | |
JP4249122B2 (en) | VoIP service system, call control server, and call control method | |
CN107302485B (en) | Method, equipment and device for interconnecting equipment in different networks | |
TWI496440B (en) | Cable modem and method of selecting communication protocols thereof | |
CN111200692B (en) | Voice equipment, processing method, device and storage medium for network telephone | |
CN108989313B (en) | Message processing method and device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |