WO2018068262A1 - Video code rate acquisition method, apparatus, and network side device - Google Patents
Video code rate acquisition method, apparatus, and network side device Download PDFInfo
- Publication number
- WO2018068262A1 WO2018068262A1 PCT/CN2016/102000 CN2016102000W WO2018068262A1 WO 2018068262 A1 WO2018068262 A1 WO 2018068262A1 CN 2016102000 W CN2016102000 W CN 2016102000W WO 2018068262 A1 WO2018068262 A1 WO 2018068262A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- video
- video service
- request packet
- preset
- service request
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
Definitions
- the present invention relates to the field of video communication technologies, and in particular, to a method, an apparatus, and a network side device for acquiring a video bit rate.
- video bit rate also known as the slice rate
- the video bit rate is equal to the slice size of the video slice divided by the slice duration of the video slice.
- a video may be divided into multiple segments for download, and each segment is called a video segment.
- Video bit rate is an important calculation parameter for video service experience evaluation. How to accurately obtain the video bit rate is especially important.
- DPI acquisition scheme which is a scheme for obtaining a code rate identification by parsing a video code rate related information of a video service.
- the network side device parses the content of each data packet sent by the mobile terminal to determine whether it includes a video service. If a data packet includes a video service, the fragmentation duration and the fragment size of the video fragment are obtained by unpacking.
- the video bit rate of the video segment is calculated by the slice duration and the slice size.
- the scheme has high accuracy in obtaining the video bit rate, but since the parsed data packet is too much, the efficiency of obtaining the code rate is not high, and it is a heavyweight code rate acquisition scheme.
- a scheme for obtaining a video code rate according to a stream feature of the video service the scheme may be referred to as a service classification (SC), and the process may include: the network side device according to the stream feature of the video service to the mobile terminal
- the service behavior is identified. If a service is identified as a video service, the downlink total payload of the video stream corresponding to the service is used to obtain the fragment size of the video fragment, and the offline system based statistical analysis (video fragmentation based fragmentation) When the fluctuation of the duration is small, the fragmentation duration of the video fragment is obtained, and the video bit rate of the video fragment is calculated by the fragmentation duration and the slice size.
- the fragmentation duration based on the video fragmentation fluctuates greatly, which results in lower accuracy of the fragmentation time obtained by the scheme, and the accuracy of the calculated video bitrate is lower.
- the current scheme for obtaining the video bit rate has the problems of low acquisition efficiency and low accuracy of the obtained video bit rate.
- the embodiment of the invention provides a method, a device and a network side device for acquiring a video bit rate, which can ensure the accuracy of the video bit rate and improve the efficiency of obtaining the video bit rate.
- a first aspect of the embodiments of the present invention provides a method for acquiring a video bit rate, including:
- the video server corresponding to the video service identifier requests the first video fragmentation
- the first aspect of the embodiment of the present invention detects a video service request that carries a preset video service identifier, and obtains a fragmentation duration and a fragment size according to a video service request, if the preset video code rate calculation condition is met. Calculating the video bit rate can reduce the number of unpacking required, improve the efficiency of obtaining the video bit rate, and ensure the accuracy of the video bit rate.
- the preset video service identifier is any one of preset at least one domain name server DNS identifier, and each of the at least one DNS identifier is a video running on the mobile terminal.
- the DNS identifier corresponding to the client; or the preset video service identifier is any one of the preset at least one video server identifier, and the at least one video server identifier is corresponding to the video client running on the mobile terminal.
- the preset video service identifier is used to identify a video service and distinguish it from other services.
- the connection request packet includes a video service identifier corresponding to the video server currently connected to the mobile terminal, and a DNS lifetime time period corresponding to the video service identifier, and is used to determine whether the mobile terminal requests to connect to the preset video service for the first time.
- the preset video service identifier if the preset video service identifier does not exist in the connection mapping table, indicating that the video server corresponding to the preset video service identifier is requested to be connected for the first time, acquiring the preset video service Identifying a corresponding DNS lifetime time period, and changing the connection mapping table, that is, changing the previous record to the record of the connection in the connection mapping table; if the preset video service identifier exists in the connection mapping In the table, the non-first time requesting the connection of the video server corresponding to the preset video service identifier is performed, and the DNS lifetime time period corresponding to the preset video service identifier is updated in the connection mapping table.
- the attribute parameter of the first video service request packet satisfies the preset video code rate calculation condition, acquiring the first video score according to the first video service request packet Obtaining a time point at which the mobile terminal sends the first video service request packet before the fragmentation duration of the slice and the slice size of the first video segment; if the mobile terminal sends the first video service request If the time parameter of the packet is within the DNS lifetime of the preset video service identifier, it is detected whether the attribute parameter of the first video service request packet satisfies the preset video code rate calculation condition.
- the attribute parameter of the first video service request packet includes a packet length of the first video service request packet
- the preset video code rate calculation condition includes the preset video service identifier
- a video service request packet of a packet length threshold is used to request a video stream
- the attribute parameter of the first video service request packet satisfies the preset video bit rate calculation condition, thereby requesting a plurality of video services.
- the video service request packet that does not request the video stream is removed from the packet, thereby improving the efficiency of obtaining the video bit rate.
- the specific process of obtaining the fragmentation duration of the first video fragment and the fragmentation size of the first video fragment according to the first video service request packet is:
- the possible implementation manner obtains the fragmentation duration by parsing the video service request packet, obtains an accurate fragment size by parsing the first or second downlink data packet sent for the video service request packet, or accumulates the request for the video service by accumulating
- the payload of all downlink packets sent obtains an accurate fragment size, so that the obtained fragmentation duration and fragment size are accurate, thereby ensuring the accuracy of the video bit rate.
- the method further includes:
- the second video service request packet is obtained in the DNS lifetime time period corresponding to the preset video service identifier, detecting whether the attribute parameter of the second video service request packet meets the preset video code rate calculation condition;
- the attribute parameter of the second video service request packet satisfies the preset video code rate calculation condition, obtain the fragmentation duration and the second of the second video fragment according to the second video service request packet.
- the fragment size of the video fragment
- the possible implementation manner is used to calculate the video bit rate of the second video segment. It can be understood that each video segment can be calculated according to the method, thereby ensuring the accuracy of the video bit rate. Can improve the efficiency of obtaining video bit rate.
- a second aspect of the embodiments of the present invention provides an apparatus for acquiring a video bit rate, including:
- a request packet obtaining unit configured to acquire a first video service request packet that carries a preset video service identifier sent by the mobile terminal, and an attribute parameter of the first video service request packet, where the first video service request packet is used by the The mobile terminal requests the first video segment from the video server corresponding to the preset video service identifier;
- a parameter obtaining unit configured to acquire a fragmentation duration of the first video fragment according to the first video service request packet, if the attribute parameter of the first video service request packet satisfies a preset video code rate calculation condition a slice size of the first video slice;
- a code rate calculation unit configured to calculate a video code rate of the first video slice according to a slice duration of the first video slice and a slice size of the first video slice.
- the device for obtaining a video code rate according to the second aspect of the present invention is used to implement the method provided by the first aspect of the embodiments of the present invention, and details are not described herein again.
- a third aspect of the embodiments of the present invention provides a network side device, where the network side device includes a transceiver and a processor, where the processor is configured to perform the method provided by the first aspect of the embodiments of the present invention.
- the first video service request packet carrying the preset video service identifier and the attribute parameter of the first video service request packet sent by the mobile terminal are obtained, and the attribute parameters of the first video service request packet are satisfied.
- the fragmentation duration of the first video fragment and the fragment size of the first video fragment are obtained according to the first video service request packet, and according to the fragmentation duration of the first video fragment.
- the slice size of the first video slice calculates the video bit rate of the first video slice, thereby ensuring the accuracy of the video bit rate and improving the efficiency of acquiring the video bit rate.
- FIG. 1 is a schematic diagram of a possible network architecture to which an embodiment of the present invention is applied;
- FIG. 2 is a schematic flowchart of a method for acquiring a video bit rate according to an embodiment of the present invention
- FIG. 3 is a schematic flowchart diagram of another method for acquiring a video bit rate according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of an apparatus for acquiring a video bit rate according to an embodiment of the present disclosure
- FIG. 5 is a schematic structural diagram of a network side device according to an embodiment of the present invention.
- a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer.
- an application running on a computing device and a computing device can be a component.
- One or more components can reside within a process and/or execution thread, and the components can be located on one computer and/or distributed between two or more computers.
- these components can execute from various computer readable media having various data structures stored thereon.
- a component may, for example, be based on signals having one or more data packets (eg, data from two components interacting with another component between the local system, the distributed system, and/or the network, such as the Internet interacting with other systems) Communicate through local and/or remote processes.
- data packets eg, data from two components interacting with another component between the local system, the distributed system, and/or the network, such as the Internet interacting with other systems
- the technical solution of the embodiment of the present invention can be applied to a Long Term Evolution (LTE) architecture, and can also be applied to a Universal Mobile Telecommunications System (UMTS) terrestrial radio access network (UMTS Terrestrial Radio Access). Network, UTRAN) architecture, or Global System for Mobile Communication (GSM)/Enhanced Data Rate for GSM Evolution (EDGE) system radio access network (GSM EDGE Radio Access Network, GERAN) architecture.
- LTE Long Term Evolution
- UTRAN Universal Mobile Telecommunications System
- GSM Global System for Mobile Communication
- EDGE Enhanced Data Rate for GSM Evolution
- GSM EDGE Radio Access Network GSM EDGE Radio Access Network
- the technical solution of the embodiment of the present invention can also be applied to other communication systems, such as a Public Land Mobile Network (PLMN) system, and even a future 5G communication system.
- PLMN Public Land Mobile Network
- the network side device may be a device for communicating with the mobile terminal, for example, may be a base station (Base Transceiver Station, BTS) in the GSM system or CDMA, or may be a base station (NodeB, NB) in the WCDMA system, or It is an evolved base station (Evolutional Node B, eNB or eNodeB) in an LTE system, or a network side device in a future 5G communication system.
- BTS Base Transceiver Station
- NodeB, NB base station
- It is an evolved base station (Evolutional Node B, eNB or eNodeB) in an LTE system, or a network side device in a future 5G communication system.
- the mobile terminal may communicate with the network side device, or communicate with one or more core networks via a radio access network (RAN), and the mobile terminal may include but is not limited to a mobile phone or a tablet (PAD). Personal Digital Assistant (PDA), portable computers, in-vehicle devices, wearable devices, terminal devices in future 5G communication systems, and the like. It should be noted that the mobile terminal in the embodiment of the present invention can support the running of various video clients, and can play video through these video clients.
- the operating system of the mobile terminal may include but is not limited to: Android system, Symbian system, Windows system, iOS (Mobile operating system developed by Apple Inc.) System) and so on.
- the term "article of manufacture” as used in this application encompasses a computer program accessible from any computer-readable device, carrier, or media.
- the computer readable medium may include, but is not limited to, a magnetic storage device (eg, a hard disk, a floppy disk, or a magnetic tape, etc.), such as a compact disk (CD), a digital versatile disk (Digital Versatile Disk, DVD). Etc.), smart cards and flash memory devices (eg, Erasable Programmable Read-Only Memory (EPROM), cards, sticks or key drivers, etc.).
- various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
- the term "machine-readable medium” may include, without limitation, a wireless channel and various other mediums capable of storing, containing, and/or carrying instructions and/or data.
- the embodiments of the present invention provide a method, a device, and a network side device for acquiring a video bit rate, which can ensure the accuracy of the video bit rate and improve the efficiency of the video bit rate.
- the method for obtaining the video bit rate provided by the embodiment of the present invention is a lightweight solution, which is more suitable for the second generation mobile communication (2nd-Generation, 2G) and the third generation mobile communication (3rd) in the existing network wireless network environment. -Generation, 3G) or third generation mobile communication (4-Generation, 4G), even in the fifth generation mobile communication (5-Generation, 5G) network environment.
- the device for obtaining the video bit rate in the embodiment of the present invention may be part or all of the network side device.
- FIG. 1 is a schematic diagram of a possible network architecture in which an embodiment of the present invention is applied.
- the network architecture shown in FIG. 1 includes a mobile terminal, a network side device, a network management device, a core network, and the Internet. It should be noted that, in practical applications, the network architecture shown in FIG. 1 includes not only one mobile terminal but also one network side device.
- the user selects to enter the video client on the mobile terminal and selects to watch a certain video.
- the mobile terminal sends a connection request to the video server corresponding to the video client, and the connection request is sent to the Internet through the network side device and the core network.
- the video client on the video server corresponding to the client The corresponding video server establishes a connection with the video client based on the request.
- the video client sends a video service request packet to the video server to request a video data stream, and the video service request packet is sent to the video server through the network side device and the core network, and the video server receives the When the video service requests the packet, the video data stream is sent to the mobile terminal through the core network and the network side device. According to this process, the user can watch the video through the video client.
- Network management equipment is used for fault management, configuration management, performance management, security management, and billing management.
- the network management device is mainly used for configuration management, and a video domain name server (DNS) configuration table and a video GET packet length threshold configuration table may be configured.
- the video DNS configuration table includes a DNS identifier corresponding to a video client that can be run on the mobile terminal.
- the DNS identifier of the Youku client on the mobile terminal is k.youku.com
- the DNS identifier of the Sohu client is hot.vrs. Sohu.com, my.tv.sohu.com, data.vod.itc.cn.
- the video GET packet length threshold configuration table includes a GET packet length threshold corresponding to each video client.
- the GET packet length threshold corresponding to the Youku client is 600
- the GET packet length threshold corresponding to the Sohu client is 500, and the like.
- the specific value of the GET packet length threshold corresponding to each video client is not limited herein.
- the video GET packet length threshold configuration table is used to determine whether the data packet is likely to be a GET packet.
- the network management device may provide a video DNS configuration table and a video GET packet length threshold configuration table to the network side device.
- FIG. 2 is a schematic flowchart of a method for obtaining a video bit rate according to an embodiment of the present disclosure, where the method may include:
- Step 201 Obtain a first video service request packet that is sent by the mobile terminal and that carries a preset video service identifier, and an attribute parameter of the first video service request packet, where the first video service request packet is used by the mobile terminal to The video server corresponding to the preset video service identifier requests the first video segmentation;
- the device for obtaining a video bit rate monitors various data packets sent by the mobile terminal in the network
- the data packets may include, but are not limited to, a voice service data packet, a video service data packet, a text service data packet, a picture service data packet, and the like. And so, these data packets are sent by the mobile terminal to the corresponding server.
- the video service data packet may include a connection request packet, a video service request packet, and the like, where the connection request packet may be used to request to establish a connection with a video server, where the video service request packet may be used to request a video service from a video server or Video fragmentation.
- Different video servers, such as Youku client correspond to Youku server.
- the mobile terminal When the mobile terminal receives an opening instruction of a video input by a user for a certain video client, it may confirm that the user wants to view the video instead of browsing the video information, and the mobile terminal may correspond to the video client.
- the video server sends the connection request packet, and the connection request packet may carry a DNS identifier corresponding to the video client, or an identifier of the video server, so that the connection request packet can reach the video server, thereby facilitating establishment of the video client.
- the exact connection between the terminal and the video server facilitates the video client to obtain video services or video fragments.
- the video client After the video client establishes a connection with the video server, the video client may send a video service request packet to the video server to request a video service or video fragment stored in the video server.
- the video service request packet may carry the DNS identifier corresponding to the video client or the identifier of the video server.
- the device monitors a first video service request packet that is sent by the mobile terminal and carries a preset video service identifier, where the first video service request packet is used by the mobile terminal to identify a video server corresponding to the preset video service identifier. Request the first video slice.
- the preset video service identifier may be any one of preset preset at least one DNS identifier.
- Each of the at least one DNS identifier is a DNS identifier corresponding to a video client running on the mobile terminal. For example, refer to Table 1, which is a video DNS configuration table, including a correspondence between a video client identifier and a DNS identifier.
- the frequency DNS configuration table may be obtained by the device to the network management device shown in FIG. 1, the device sending an instruction to the network management device requesting a video DNS configuration table, and the network management device is directed to the device according to the instruction Send a video DNS configuration table.
- the device may store the video DNS configuration table or may acquire the network DNS device when needed.
- the DNS identifier in the video DNS configuration table only appears when the video service in the corresponding video client on the mobile terminal is clicked and played.
- the preset video service identifier may also be any one of preset preset at least one video server identifier.
- Each of the at least one video server identifier is an identifier of a video server corresponding to the video client running on the mobile terminal. It can be understood that the at least one video server identifier corresponds to the at least one DNS identifier.
- the video server identifier can be a name, an Internet Protocol (IP) address, a domain name, and the like.
- IP Internet Protocol
- the device monitors the data packet sent by the mobile terminal, whether the data packet is related to the video service may be determined according to the preset video service identifier or the video DNS configuration table, thereby excluding the video service.
- the data packet retains the data packet related to the video service, and avoids unpacking all the data packets sent by the mobile terminal when acquiring the video bit rate, which can effectively reduce the blindness of the unpacking.
- connection request packet that is sent by the mobile terminal and carrying the preset video service identifier, where the connection request packet is used by the mobile terminal to request
- the video server corresponding to the preset video service identifier establishes a connection.
- the device detects whether the preset video service identifier exists in a connection mapping table, where the connection mapping table includes a video service identifier corresponding to a video server currently connected to the mobile terminal, and a DNS survival corresponding to the video service identifier period. It can be understood that, when the network side device is connected to a video server for the first time, the video service identifier of the video server, the DNS lifetime time period corresponding to the video service identifier, and the identifier of the mobile terminal are performed. The association record is recorded in the connection mapping table. It should be noted that the connection mapping table is recorded only once, that is, this time of the current connection, if the new connection request packet is connected to other video servers, the connection mapping table is changed.
- the preset video service identifier is in the connection mapping table, it indicates that the preset video service identifier is the same as the video service identifier of the currently connected video server, and is not the first time that the preset video service identifier is connected.
- the video server the device updates the connection mapping table, that is, updates the DNS lifetime time period corresponding to the preset video service identifier. If the preset video service identifier does not exist in the connection mapping table, indicating that the preset video service identifier is related to the currently connected video server.
- the device acquires a DNS lifetime time period corresponding to the preset video service identifier, and changes the connection mapping table. That is, the connection mapping table records the association relationship between the preset video service identifier, the DNS lifetime time period corresponding to the preset video service identifier, and the identifier of the mobile terminal. After the device changes the connection mapping table, the device may listen to the first video service request packet sent by the mobile terminal.
- the timeout period of the DNS includes the time point from the time when the connection request packet is sent to the time when the valid time value ends.
- the valid time values of different video servers or different video service identifiers are different. The specific value is determined by each video.
- the server is set individually. The video server may feed back the IP address and the valid time value to the video client or the mobile terminal upon receiving the connection request packet.
- the device obtains an attribute parameter of the first video service request packet when the first video service request packet is received, and the attribute parameter of the first video service request packet may include a packet length and a video type (HD, SD, smooth, and so on.
- the device acquires a time point at which the mobile terminal sends the first video service request packet, and detects whether the time point at which the mobile terminal sends the first video service request packet is in the preset video service identifier. Detecting the first video service request, if the time point of the first video service request packet is in the DNS lifetime of the preset video service identifier, Whether the attribute parameter of the packet satisfies the preset video bit rate calculation condition.
- the preset video bit rate calculation condition is used to determine that the video service request packet is parsed, and calculate a video bit rate of the video segment corresponding to the video service request packet.
- the attribute of the first video service request packet is a packet length of the first video service request packet
- the preset video code rate calculation condition includes that the preset video service identifier corresponds to The video service requests the packet length threshold.
- the network management device may provide a video GET packet length threshold configuration table, including a correspondence between a video client identifier and a video GET packet length threshold, for determining whether the data packet is determined. May be a GET package. For details, see Table 2 below.
- the video GET packet is the video service request packet.
- the video GET packet length threshold configuration table may be obtained by the device to the network management device, and the device sends an instruction to the network management device to request a video GET packet length threshold configuration table, and the network management device according to the instruction A video GET packet length threshold configuration table is sent to the device.
- the device may store the video GET packet length threshold configuration table, or may acquire the video GET packet length threshold configuration table when needed.
- Table 2 includes the correspondence between the video client identifier and the video GET packet length threshold. The correspondence between the video service identifier and the video GET packet length threshold can be derived in conjunction with Table 1.
- the device detects whether the packet length of the first video service request packet is greater than a video service request packet length threshold corresponding to the preset video service identifier, that is, determines whether the first video service request packet is a GET packet, and further Determining whether to parse the first video service request packet, and calculating a video bit rate of the first video segment. If the video service request packet length threshold is greater than the preset video service identifier, determine that the first video service request packet is a GET packet, and determine that the attribute parameter of the first video service request packet meets the pre- The video bit rate calculation condition is set, thereby determining that the first video service request packet needs to be parsed.
- Table 3 shows the statistics of the proportion of uplink packets in Tencent's iOS video service. The statistical results show that the ratio of uplink ACK packets to upstream packets is above 90%. According to the set threshold of Tencent iOS of 500, it is found from Table 3 that the uplink packet ratio of the payload greater than 500 is less than 2%. This shows that by setting the video GET packet length threshold, the number of unpacking can be reduced to about 2% of the upstream packet. The situation of other videos is similar. Table 4 shows that by setting the GET packet length threshold of Youku video to 600, the unpacking workload can be reduced to about 1% of the number of GET packets.
- the video GET packet length threshold corresponding to each video client in Table 2 is obtained by the statistical rule of the GET request packet size for a specific video.
- the following figure shows the length of the GET packet of Tencent iOS. It can be found that the length is between 610 and 613.
- the invention leaves the threshold of Tencent iOS to 500 and leaves a certain change space.
- the length of the GET packet of the Youku video segment is shown in the following figure b. It can be found that the length varies from 764 to 770.
- the threshold of the Youku video is set to 600, which also leaves a certain change space.
- Figure a Tencent GET packet length of Tencent iOS video segmentation
- the device parses the first video service request packet, and obtains the first video according to the parsing result.
- the fragmentation duration of the fragment When the preset video bit rate calculation condition is satisfied, the parsing is performed, and the number of uplink GET packets that need to be parsed can be further reduced.
- the video server corresponding to the preset video service identifier When receiving the first video service request packet, the video server corresponding to the preset video service identifier sends a downlink data packet to the mobile terminal according to the first video service request packet, where the downlink data packet may be carried
- the video stream may also carry other content.
- the video server corresponding to the preset video service identifier may send at least two downlink data packets for one video service request packet, where the number of specific downlink data packets is determined by the video service request packet and the video server.
- the downlink data packet sent by the video server corresponding to the preset video service identifier before receiving the next video service request packet is sent for the current video service request packet.
- the device monitors and acquires the downlink data packet sent by the video server corresponding to the preset video service identifier for the first video service request packet, and the downlink monitored before the device monitors the second video service request packet.
- the data packet is the downlink data packet corresponding to the first video service request packet.
- the device identifies each downlink packet in the at least two downlink data packets according to a preset algorithm or a flow feature, and selects a downlink data packet that carries the video stream from the two downlink data packets, and discards the A downstream packet carrying a video stream.
- the preset algorithm may be an SC algorithm.
- the SC algorithm combines a DNS identifier and a stream feature to identify a service data stream that includes a video DNS identifier and satisfies a video stream feature as a video stream.
- the device acquires, by using a first data packet sent by the first video service request packet, a downlink data packet that is sent by the first video service request packet, to obtain the first video segment.
- the slice size of the slice is a packet sent by the first video service request packet.
- the device acquires a payload of each downlink data packet carrying the video stream, and accumulates the payload of each downlink data packet carrying the video stream to obtain a total payload, and The total payload is used as a slice size of the first video slice.
- the payload represents a portion of the user data transmitted in a data packet, and represents the size of the video stream transmitted in the downlink data packet in the embodiment of the present invention.
- the device obtains a video code rate of the first video segment by dividing a slice size of the first video segment by a slice duration of the first video segment.
- the device detects whether the second video service request packet carrying the preset video service identifier sent by the mobile terminal is acquired in the DNS lifetime time period corresponding to the preset video service identifier, and the second video service is obtained.
- the request packet is used by the mobile terminal to request a second video fragment from a video server corresponding to the preset video service identifier. If the second video service request packet is obtained in the DNS lifetime of the preset video service identifier, the device may calculate the second video according to the process of requesting the first video service request packet. The video bit rate of the slice. If the third video service request packet is obtained in the DNS lifetime of the preset video service identifier, the device may calculate the third video fragment according to the process of requesting the first video service request packet. The video bit rate, and so on, and when the current system time reaches the DNS lifetime time period corresponding to the preset video service identifier, the calculation of the video bit rate is stopped.
- the first video service request packet carrying the preset video service identifier and the attribute parameter of the first video service request packet sent by the mobile terminal are obtained, and the attribute parameters of the first video service request packet are satisfied.
- the fragmentation duration of the first video fragment and the fragment size of the first video fragment are obtained according to the first video service request packet, and according to the fragmentation duration of the first video fragment.
- the slice size of the first video slice calculates the video bit rate of the first video slice, thereby ensuring the accuracy of the video bit rate and improving the efficiency of acquiring the video bit rate.
- FIG. 3 is a schematic flowchart of another method for obtaining a video bit rate according to an embodiment of the present invention.
- the method may include:
- the DNS packet requests the mobile terminal to establish a connection with a corresponding video server.
- the device for obtaining the video bit rate determines whether the data packet A is a DNS packet, and can distinguish the video service from other services. If the data packet A is the DNS packet, step 302 is performed.
- the DNS packet is a data packet that is not encrypted
- the connection request packet in the embodiment shown in FIG. 2 is also a data packet that is not encrypted.
- the device determines whether the DNS packet carries the preset video service identifier, where The video service related to the video client on the mobile terminal is identified in the video service.
- the preset video service identifier refer to the description in the embodiment shown in FIG. 2, and details are not described herein again.
- step 304 is performed; if the preset video service identifier is carried, step 303 is performed.
- the data packet A carries the preset video service identifier, it is determined whether the preset video service identifier exists in the connection mapping table.
- the device determines whether the preset video service identifier exists in the connection mapping table. It may be understood that determining whether to establish a connection for the first time, the connection mapping table only records information of the current connection.
- connection mapping table If it exists in the connection mapping table, update a DNS lifetime time period corresponding to the preset video service identifier.
- the DNS lifetime time period corresponding to the preset video service identifier is updated.
- connection mapping table If not in the connection mapping table, obtain a DNS lifetime period corresponding to the preset video service identifier, and change the connection mapping table.
- connection mapping table is not present, indicating that the connection is established for the first time, the DNS lifetime time period corresponding to the preset video service identifier is obtained, and the connection mapping table is changed, that is, the previously recorded The connection information is changed to the current connection information.
- the data packet B may be an uplink data packet for the mobile terminal to request a downlink data packet from the corresponding video server, or may be an uplink data packet for other purposes, because it is determined whether the data packet B is used for
- the mobile terminal requests a downlink data packet from the corresponding video server, and may determine by step 308.
- the data packet may be determined to be a GET packet, and used to mark the preset video service Know the corresponding video server to request downstream packets.
- the data packet B sent by the mobile terminal is received in the DNS lifetime of the preset video service identifier, and the packet of the data packet B is determined. Whether the length is greater than the GET packet length threshold corresponding to the preset video service identifier. If the length is greater than, the packet B is determined to carry the preset service identifier, and the possible implementation manner may further reduce the number of unpackets. .
- the data packet B sent by the mobile terminal is received in a DNS lifetime period corresponding to the preset video service identifier, and it is determined whether the packet length of the data packet B is greater than the pre- And setting a GET packet length threshold corresponding to the video service identifier and determining whether the data packet B carries the preset service identifier.
- the data packet B is parsed to obtain a fragmentation duration.
- the video server corresponding to the preset video service identifier obtains a fragment size for the downlink data packet sent by the data packet B.
- the device determines whether the data packet A is a GET packet, and the specific determining process is: before acquiring the data packet A.
- the DNS packet and the DNS lifetime period corresponding to the DNS packet determining whether the sending time point of the data packet A is within the DNS lifetime time period, and if the DNS lifetime time period is within the DNS lifetime time period, determining the data packet A Whether the packet length is greater than a GET packet length threshold corresponding to the video service identifier corresponding to the DNS packet; if greater than, determining that the data packet A is a GET packet.
- the data packet A After determining that the data packet A is a GET packet, parsing the data packet A to obtain a fragmentation duration, and acquiring a fragment size according to the downlink data packet sent for the data packet A, thereby calculating a video bit rate. If the packet does not carry the preset video service identifier, the packet A does not carry any processing; if the packet A has a packet length smaller than the preset video, The GET packet length threshold corresponding to the service identifier is not processed.
- the parsing of the data-independent data packet can be avoided, and the parsing amount can be reduced.
- the GET packet length threshold can further reduce the calculation amount, thereby improving the efficiency of acquiring the video bit rate. Through analytical calculation, the accuracy of the video bit rate can be guaranteed.
- FIG. 4 is a schematic structural diagram of an apparatus for acquiring a video bit rate according to an embodiment of the present invention.
- the apparatus 40 includes a request packet acquisition unit 401, a parameter acquisition unit 402, and a code rate calculation unit 403.
- the request packet obtaining unit 401 is configured to acquire a first video service request packet that carries a preset video service identifier sent by the mobile terminal, and an attribute parameter of the first video service request packet, where the first video service request packet is used by the The mobile terminal requests the first video segment from the video server corresponding to the preset video service identifier.
- the parameter obtaining unit 402 is configured to acquire, according to the first video service request packet, a fragmentation duration of the first video fragment, if the attribute parameter of the first video service request packet satisfies a preset video code rate calculation condition And a slice size of the first video slice.
- the code rate calculation unit 403 is configured to calculate a video code rate of the first video slice according to a slice duration of the first video slice and a slice size of the first video slice.
- the preset video service identifier is any one of the preset at least one domain name server DNS identifier, or any one of the preset at least one video server identifier.
- the request packet obtaining unit 401 is further configured to acquire the first video service request packet that carries the preset video service identifier sent by the mobile terminal and the attribute parameter of the first video service request packet. a connection request packet that is sent by the mobile terminal and that carries the preset video service identifier, where the connection request packet is used by the mobile terminal to establish a connection with a video server corresponding to the preset video service identifier;
- the device 40 further includes:
- the identifier detecting unit 404 is configured to detect whether the preset video service identifier exists in a connection mapping table, where the connection mapping table includes a video service identifier corresponding to a video server currently connected to the mobile terminal, and the video service identifier. Corresponding DNS survival time period;
- the time obtaining unit 405 is configured to acquire a DNS lifetime time period corresponding to the preset video service identifier, and change the connection mapping table, if the preset video service identifier does not exist in the connection mapping table.
- the time obtaining unit 405 is further configured to acquire a time point at which the mobile terminal sends the first video service request packet.
- the device 40 further includes:
- a condition detecting unit 406 configured to: if the mobile terminal sends the first video service request packet If the time parameter is in the DNS lifetime of the preset video service identifier, it is detected whether the attribute parameter of the first video service request packet satisfies the preset video code rate calculation condition.
- the attribute parameter of the first video service request packet includes a packet length of the first video service request packet
- the preset video code rate calculation condition includes a video service request corresponding to the preset video service identifier.
- the condition detecting unit 406 is specifically configured to: if the packet length of the first video service request packet is greater than a video service request packet length threshold corresponding to the preset video service identifier; The video service request packet length threshold determines that the attribute parameter of the first video service request packet satisfies the preset video bit rate calculation condition.
- the parameter obtaining unit 402 includes a duration acquiring unit, a video stream acquiring unit, and a size acquiring unit, which are not indicated in FIG. 4.
- a time length obtaining unit configured to parse the first video service request packet, and obtain a fragmentation duration of the first video segment according to the parsing result
- a video stream obtaining unit configured to acquire a downlink data packet sent by the video server corresponding to the preset video service identifier for the first video service request packet;
- a size obtaining unit configured to acquire a fragment size of the first video fragment according to the downlink data packet.
- the device 40 further includes:
- the request packet detecting unit 407 is configured to: detect, in the DNS lifetime time period corresponding to the preset video service identifier, whether the second video service request packet that is sent by the mobile terminal and that carries the preset video service identifier is obtained.
- the second video service request packet is used by the mobile terminal to request a second video segment from a video server corresponding to the preset video service identifier;
- the condition detecting unit 406 is further configured to: if the second video service request packet is obtained in the DNS lifetime of the preset video service identifier, whether the attribute parameter of the second video service request packet is satisfied The preset video bit rate calculation condition;
- the parameter obtaining unit 402 is further configured to: if the attribute parameter of the second video service request packet meets the preset video code rate calculation condition, acquire the second video score according to the second video service request packet The slice duration of the slice and the slice size of the second video slice;
- the parameter calculation unit 403 is further configured to calculate a video code rate of the second video segment according to a fragmentation duration of the second video fragment and a fragment size of the second video fragment.
- the above units may be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application-Specific). Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
- the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
- the network side device may be the network side device shown in FIG. 5 when the foregoing units are processors.
- the network side device 50 includes a processor 511, a transceiver 512, and an antenna. It should be noted that, in actual application, the transceiver 512 is not limited to two, and the antenna is not limited to two. The structure of the network side device 50 does not constitute a limitation on the embodiment of the present invention.
- the processor 511 mainly includes four components: a cell controller, a voice channel controller, a signaling channel controller, and a multi-channel interface for expansion.
- the processor 511 is responsible for all mobile communication interface management, primarily the allocation, release and management of wireless channels.
- the processor 511 is applied to the embodiments of the present invention for implementing the functions of the respective units shown in FIG.
- the transceiver 512 includes a receiver and a transmitter. For the mobile terminal, uplink data can be transmitted through the transmitter, and downlink data can be received through the receiver.
- the transceiver 512 is used in the embodiment of the present invention to monitor and receive data packets sent by the mobile terminal to the video server, and downlink data packets that the video server feeds back to the mobile terminal.
- Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
- a storage medium may be any available media that can be accessed by a computer.
- the computer readable medium may include a random access memory (RAM), a read-only memory (ROM), and an electrically erasable programmable read-only memory (Electrically Erasable Programmable).
- EEPROM Electrically Error Read-Only Memory
- CD-ROM Compact Disc Read-Only Memory
- Any connection may suitably be a computer readable medium.
- the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are included in the fixing of the associated medium.
- DSL Digital Subscriber Line
- a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
本发明涉及视频通信技术领域,尤其涉及一种获取视频码率的方法、装置及网络侧设备。The present invention relates to the field of video communication technologies, and in particular, to a method, an apparatus, and a network side device for acquiring a video bit rate.
随着无线网络覆盖范围的扩大以及移动设备(例如手机、平板电脑等)的逐渐普及,用户可以随时随地使用移动设备聊天、观看视频、听歌等等。目前,视频业务在现网数据中占有的比重越来越大,对于视频业务的体验评估变得越来越重要。网络侧设备为了能够更好地实现无线资源调度,改进用户视频业务体验或者评估用户体验,需要获得视频码率等信息。视频码率,又名分片码率,等于视频分片的分片大小除以视频分片的分片时长。一个视频可能会分为多个片段进行下载,每个片段称为一个视频分片。视频码率作为视频业务体验评估的一项重要计算参数,如何准确的获得视频码率就显得尤为重要。With the expansion of wireless network coverage and the increasing popularity of mobile devices (such as mobile phones, tablets, etc.), users can use mobile devices to chat, watch videos, listen to songs, and more, anytime, anywhere. At present, video services occupy an increasing proportion in the existing network data, and the evaluation of the experience of video services becomes more and more important. In order to better implement wireless resource scheduling, improve the user video service experience, or evaluate the user experience, the network side device needs to obtain information such as a video bit rate. The video bit rate, also known as the slice rate, is equal to the slice size of the video slice divided by the slice duration of the video slice. A video may be divided into multiple segments for download, and each segment is called a video segment. Video bit rate is an important calculation parameter for video service experience evaluation. How to accurately obtain the video bit rate is especially important.
目前,获取视频码率的方案有两种:Currently, there are two options for obtaining video bitrates:
(1)深度包检测(Deep Packet Inspection,DPI)获取方案,这是一种通过解析视频业务的报文获取视频码率相关信息进行码率识别的方案。网络侧设备对移动终端发送的每个数据包的内容进行解析,判断其是否包括视频业务,若某个数据包包括视频业务,则通过解包获得视频分片的分片时长和分片大小,并通过分片时长和分片大小计算该视频分片的视频码率。该种方案获得视频码率的准确性高,但是由于解析的数据包太多,获得码率的效率不高,是一种重量级的码率获取方案。(1) Deep Packet Inspection (DPI) acquisition scheme, which is a scheme for obtaining a code rate identification by parsing a video code rate related information of a video service. The network side device parses the content of each data packet sent by the mobile terminal to determine whether it includes a video service. If a data packet includes a video service, the fragmentation duration and the fragment size of the video fragment are obtained by unpacking. The video bit rate of the video segment is calculated by the slice duration and the slice size. The scheme has high accuracy in obtaining the video bit rate, but since the parsed data packet is too much, the efficiency of obtaining the code rate is not high, and it is a heavyweight code rate acquisition scheme.
(2)根据视频业务的流特征获取视频码率的方案,该种方案可以称为业务聚类(Service Classification,SC),其过程可以包括:网络侧设备根据视频业务的流特征对移动终端的业务行为进行识别,若识别出某个业务为视频业务,则使用该业务对应的视频流下行总净荷获取视频分片的分片大小,基于离线系统的统计分析(基于视频分片的分片时长波动较小的情况)获取视频分片的分片时长,并通过分片时长和分片大小计算视频分片的视频码率。实际应用中,由于基于视频分片的分片时长波动较大,导致该种方案获取的分片时长准确性较低,进而导致计算的视频码率的准确性较低。 (2) A scheme for obtaining a video code rate according to a stream feature of the video service, the scheme may be referred to as a service classification (SC), and the process may include: the network side device according to the stream feature of the video service to the mobile terminal The service behavior is identified. If a service is identified as a video service, the downlink total payload of the video stream corresponding to the service is used to obtain the fragment size of the video fragment, and the offline system based statistical analysis (video fragmentation based fragmentation) When the fluctuation of the duration is small, the fragmentation duration of the video fragment is obtained, and the video bit rate of the video fragment is calculated by the fragmentation duration and the slice size. In practical applications, the fragmentation duration based on the video fragmentation fluctuates greatly, which results in lower accuracy of the fragmentation time obtained by the scheme, and the accuracy of the calculated video bitrate is lower.
由此可见,目前获取视频码率的方案存在获取效率低下,获取的视频码率准确性较低的问题。It can be seen that the current scheme for obtaining the video bit rate has the problems of low acquisition efficiency and low accuracy of the obtained video bit rate.
发明内容Summary of the invention
本发明实施例提供了一种获取视频码率的方法、装置及网络侧设备,既能保证视频码率的准确性,又能提高获取视频码率的效率。The embodiment of the invention provides a method, a device and a network side device for acquiring a video bit rate, which can ensure the accuracy of the video bit rate and improve the efficiency of obtaining the video bit rate.
本发明实施例第一方面提供一种获取视频码率的方法,包括:A first aspect of the embodiments of the present invention provides a method for acquiring a video bit rate, including:
获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及所述第一视频业务请求包的属性参数,所述第一视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第一视频分片;Obtaining, by the mobile terminal, a first video service request packet carrying a preset video service identifier, and an attribute parameter of the first video service request packet, where the first video service request packet is used by the mobile terminal to the preset The video server corresponding to the video service identifier requests the first video fragmentation;
若所述第一视频业务请求包的属性参数满足预设视频码率计算条件,则根据所述第一视频业务请求包获取所述第一视频分片的分片时长和所述第一视频分片的分片大小;Obtaining, according to the first video service request packet, a fragmentation duration of the first video fragment and the first video segment, if the attribute parameter of the first video service request packet meets a preset video code rate calculation condition Slice size of the slice;
根据所述第一视频分片的分片时长和所述第一视频分片的分片大小计算所述第一视频分片的视频码率。Calculating a video code rate of the first video slice according to a slice duration of the first video slice and a slice size of the first video slice.
本发明实施例第一方面,对携带预设视频业务标识的视频业务请求进行检测,并在满足预设视频码率计算条件的情况下,根据视频业务请求获取分片时长和分片大小,进而计算视频码率,可以减少需要解包的数量,提高获取视频码率的效率,同时保证视频码率的准确性。The first aspect of the embodiment of the present invention detects a video service request that carries a preset video service identifier, and obtains a fragmentation duration and a fragment size according to a video service request, if the preset video code rate calculation condition is met. Calculating the video bit rate can reduce the number of unpacking required, improve the efficiency of obtaining the video bit rate, and ensure the accuracy of the video bit rate.
在一种可能实现的方式中,所述预设视频业务标识为预设的至少一个域名服务器DNS标识中的任意一个,所述至少一个DNS标识中每个DNS标识为运行在移动终端上的视频客户端对应的DNS标识;或,所述预设视频业务标识为预设的至少一个视频服务器标识中的任意一个,所述至少一个视频服务器标识为运行在所述移动终端上的视频客户端对应的视频服务器的标识。所述预设视频业务标识用于识别视频业务,与其它业务进行区分。In a possible implementation, the preset video service identifier is any one of preset at least one domain name server DNS identifier, and each of the at least one DNS identifier is a video running on the mobile terminal. The DNS identifier corresponding to the client; or the preset video service identifier is any one of the preset at least one video server identifier, and the at least one video server identifier is corresponding to the video client running on the mobile terminal. The identity of the video server. The preset video service identifier is used to identify a video service and distinguish it from other services.
在一种可能实现的方式中,在获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及所述第一视频业务请求包的属性参数之前,获取所述移动终端发送的携带所述预设视频业务标识的连接请求包(DNS包),所述连接请求包用于所述移动终端请求与所述预设视频业务标识对应的视频服务器建立连接;检测所述预设视频业务标识是否存在于连接映射表中,所述连接 映射表包括所述移动终端当前连接的视频服务器对应的视频业务标识,以及所述视频业务标识对应的DNS生存时间段,用于判断所述移动终端是否第一次请求连接所述预设视频业务标识对应的视频服务器;若所述预设视频业务标识不存在于所述连接映射表中,表明第一次请求连接所述预设视频业务标识对应的视频服务器,则获取所述预设视频业务标识对应的DNS生存时间段,并更改所述连接映射表,即在所述连接映射表中将之前的记录更改为此次连接的记录;若所述预设视频业务标识存在于所述连接映射表中,表明非第一次请求连接所述预设视频业务标识对应的视频服务器,则在所述连接映射表中更新所述预设视频业务标识对应的DNS生存时间段。In a possible implementation manner, before acquiring the first video service request packet that carries the preset video service identifier sent by the mobile terminal and the attribute parameter of the first video service request packet, acquiring the carried by the mobile terminal a connection request packet (DNS packet) of the preset video service identifier, where the connection request packet is used by the mobile terminal to establish a connection with a video server corresponding to the preset video service identifier; and detecting the preset video service Whether the identifier exists in the connection mapping table, the connection The mapping table includes a video service identifier corresponding to the video server currently connected to the mobile terminal, and a DNS lifetime time period corresponding to the video service identifier, and is used to determine whether the mobile terminal requests to connect to the preset video service for the first time. Identifying the corresponding video server; if the preset video service identifier does not exist in the connection mapping table, indicating that the video server corresponding to the preset video service identifier is requested to be connected for the first time, acquiring the preset video service Identifying a corresponding DNS lifetime time period, and changing the connection mapping table, that is, changing the previous record to the record of the connection in the connection mapping table; if the preset video service identifier exists in the connection mapping In the table, the non-first time requesting the connection of the video server corresponding to the preset video service identifier is performed, and the DNS lifetime time period corresponding to the preset video service identifier is updated in the connection mapping table.
在一种可能实现的方式中,在若所述第一视频业务请求包的属性参数满足所述预设视频码率计算条件,则根据所述第一视频业务请求包获取所述第一视频分片的分片时长和所述第一视频分片的分片大小之前,获取所述移动终端发送所述第一视频业务请求包的时间点;若所述移动终端发送所述第一视频业务请求包的时间点在所述预设视频业务标识对应的DNS生存时间段内,则检测所述第一视频业务请求包的属性参数是否满足所述预设视频码率计算条件。In a possible implementation manner, if the attribute parameter of the first video service request packet satisfies the preset video code rate calculation condition, acquiring the first video score according to the first video service request packet Obtaining a time point at which the mobile terminal sends the first video service request packet before the fragmentation duration of the slice and the slice size of the first video segment; if the mobile terminal sends the first video service request If the time parameter of the packet is within the DNS lifetime of the preset video service identifier, it is detected whether the attribute parameter of the first video service request packet satisfies the preset video code rate calculation condition.
在一种可能实现的方式中,所述第一视频业务请求包的属性参数包括所述第一视频业务请求包的包长度,所述预设视频码率计算条件包括所述预设视频业务标识对应的视频业务请求包包长度阈值,检测所述第一视频业务请求包的属性参数是否满足所述预设视频码率计算条件的具体过程为:In a possible implementation manner, the attribute parameter of the first video service request packet includes a packet length of the first video service request packet, and the preset video code rate calculation condition includes the preset video service identifier. The corresponding video service request packet length threshold, and the specific process of detecting whether the attribute parameter of the first video service request packet satisfies the preset video bit rate calculation condition is:
检测所述第一视频业务请求包的包长度是否大于所述预设视频业务标识对应的视频业务请求包包长度阈值,可以理解的是,大于所述预设视频业务标识对应的视频业务请求包包长度阈值的视频业务请求包用于请求视频流;Detecting that the length of the packet of the first video service request packet is greater than the length of the video service request packet corresponding to the preset video service identifier, which is greater than the video service request packet corresponding to the preset video service identifier. A video service request packet of a packet length threshold is used to request a video stream;
若大于所述预设视频业务标识对应的视频业务请求包包长度阈值,则确定所述第一视频业务请求包的属性参数满足所述预设视频码率计算条件,从而在众多的视频业务请求包中剔除不请求视频流的视频业务请求包,进而提高获取视频码率的效率。If the video service request packet length threshold corresponding to the preset video service identifier is greater than the preset video service request packet, the attribute parameter of the first video service request packet satisfies the preset video bit rate calculation condition, thereby requesting a plurality of video services. The video service request packet that does not request the video stream is removed from the packet, thereby improving the efficiency of obtaining the video bit rate.
在一种可能实现的方式中,根据所述第一视频业务请求包获取所述第一视频分片的分片时长和所述第一视频分片的分片大小的具体过程为:In a possible implementation manner, the specific process of obtaining the fragmentation duration of the first video fragment and the fragmentation size of the first video fragment according to the first video service request packet is:
解析所述第一视频业务请求包,并根据解析结果获取所述第一视频分片的分片时长; Parsing the first video service request packet, and acquiring a fragmentation duration of the first video segment according to the parsing result;
获取所述预设视频业务标识对应的视频服务器针对所述第一视频业务请求包发送的下行数据包;Obtaining a downlink data packet sent by the video server corresponding to the preset video service identifier for the first video service request packet;
根据所述下行数据包获取所述第一视频分片的分片大小。该种可能实现的方式通过解析视频业务请求包获得分片时长,通过解析针对视频业务请求包发送的第一个或者第二个下行数据包获得准确的分片大小,或通过累加针对视频业务请求发送的所有下行数据包的净荷获得准确的分片大小,使得获取的分片时长和分片大小均准确,从而保证视频码率的准确性。And acquiring, according to the downlink data packet, a fragment size of the first video fragment. The possible implementation manner obtains the fragmentation duration by parsing the video service request packet, obtains an accurate fragment size by parsing the first or second downlink data packet sent for the video service request packet, or accumulates the request for the video service by accumulating The payload of all downlink packets sent obtains an accurate fragment size, so that the obtained fragmentation duration and fragment size are accurate, thereby ensuring the accuracy of the video bit rate.
在一种可能实现的方式中,所述方法还包括:In a possible implementation manner, the method further includes:
检测在所述预设视频业务标识对应的DNS生存时间段内是否获取到所述移动终端发送的携带所述预设视频业务标识的第二视频业务请求包,所述第二视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第二视频分片;Detecting, in the DNS lifetime time period corresponding to the preset video service identifier, whether the second video service request packet that carries the preset video service identifier sent by the mobile terminal is obtained, and the second video service request packet is used. And requesting, by the mobile terminal, a second video fragment to the video server corresponding to the preset video service identifier;
若在所述预设视频业务标识对应的DNS生存时间段内获取到所述第二视频业务请求包,则检测第二视频业务请求包的属性参数是否满足所述预设视频码率计算条件;If the second video service request packet is obtained in the DNS lifetime time period corresponding to the preset video service identifier, detecting whether the attribute parameter of the second video service request packet meets the preset video code rate calculation condition;
若所述第二视频业务请求包的属性参数满足所述预设视频码率计算条件,则根据所述第二视频业务请求包获取所述第二视频分片的分片时长和所述第二视频分片的分片大小;If the attribute parameter of the second video service request packet satisfies the preset video code rate calculation condition, obtain the fragmentation duration and the second of the second video fragment according to the second video service request packet. The fragment size of the video fragment;
根据所述第二视频分片的分片时长和所述第二视频分片的分片大小计算所述第二视频分片的视频码率。该种可能实现的方式用于计算第二视频分片的视频码率,可以理解的是,对每个视频分片均可按照该方法进行计算,从而既能保证视频码率的准确性,又能提高获取视频码率的效率。Calculating a video code rate of the second video slice according to a slice duration of the second video slice and a slice size of the second video slice. The possible implementation manner is used to calculate the video bit rate of the second video segment. It can be understood that each video segment can be calculated according to the method, thereby ensuring the accuracy of the video bit rate. Can improve the efficiency of obtaining video bit rate.
本发明实施例第二方面提供一种获取视频码率的装置,包括:A second aspect of the embodiments of the present invention provides an apparatus for acquiring a video bit rate, including:
请求包获取单元,用于获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及所述第一视频业务请求包的属性参数,所述第一视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第一视频分片;a request packet obtaining unit, configured to acquire a first video service request packet that carries a preset video service identifier sent by the mobile terminal, and an attribute parameter of the first video service request packet, where the first video service request packet is used by the The mobile terminal requests the first video segment from the video server corresponding to the preset video service identifier;
参数获取单元,用于若所述第一视频业务请求包的属性参数满足预设视频码率计算条件,则根据所述第一视频业务请求包获取所述第一视频分片的分片时长和所述第一视频分片的分片大小; a parameter obtaining unit, configured to acquire a fragmentation duration of the first video fragment according to the first video service request packet, if the attribute parameter of the first video service request packet satisfies a preset video code rate calculation condition a slice size of the first video slice;
码率计算单元,用于根据所述第一视频分片的分片时长和所述第一视频分片的分片大小计算所述第一视频分片的视频码率。And a code rate calculation unit, configured to calculate a video code rate of the first video slice according to a slice duration of the first video slice and a slice size of the first video slice.
本发明实施例第二方面提供的获取视频码率的装置用于实现本发明实施例第一方面提供的方法,在此不再赘述。The device for obtaining a video code rate according to the second aspect of the present invention is used to implement the method provided by the first aspect of the embodiments of the present invention, and details are not described herein again.
本发明实施例第三方面提供一种网络侧设备,所述网络侧设备包括收发器和处理器,其中,所述处理器用于执行本发明实施例第一方面提供的方法。A third aspect of the embodiments of the present invention provides a network side device, where the network side device includes a transceiver and a processor, where the processor is configured to perform the method provided by the first aspect of the embodiments of the present invention.
在本发明实施例中,通过获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及第一视频业务请求包的属性参数,并在第一视频业务请求包的属性参数满足预设视频码率计算条件的情况下,根据第一视频业务请求包获取第一视频分片的分片时长和第一视频分片的分片大小,并根据第一视频分片的分片时长和第一视频分片的分片大小计算第一视频分片的视频码率,从而既能保证视频码率的准确性,又能提高获取视频码率的效率。In the embodiment of the present invention, the first video service request packet carrying the preset video service identifier and the attribute parameter of the first video service request packet sent by the mobile terminal are obtained, and the attribute parameters of the first video service request packet are satisfied. When the video bit rate calculation condition is set, the fragmentation duration of the first video fragment and the fragment size of the first video fragment are obtained according to the first video service request packet, and according to the fragmentation duration of the first video fragment. The slice size of the first video slice calculates the video bit rate of the first video slice, thereby ensuring the accuracy of the video bit rate and improving the efficiency of acquiring the video bit rate.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1为应用本发明实施例的一种可能的网络架构示意图;1 is a schematic diagram of a possible network architecture to which an embodiment of the present invention is applied;
图2为本发明实施例提供的一种获取视频码率的方法的流程示意图;2 is a schematic flowchart of a method for acquiring a video bit rate according to an embodiment of the present invention;
图3为本发明实施例提供的另一种获取视频码率的方法的流程示意图;FIG. 3 is a schematic flowchart diagram of another method for acquiring a video bit rate according to an embodiment of the present disclosure;
图4为本发明实施例提供的一种获取视频码率的装置的结构示意图;FIG. 4 is a schematic structural diagram of an apparatus for acquiring a video bit rate according to an embodiment of the present disclosure;
图5为本发明实施例提供的一种网络侧设备的结构示意图。FIG. 5 is a schematic structural diagram of a network side device according to an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
在本说明书中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关 的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在2个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可例如根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。The terms "component", "module", "system" and the like as used in this specification are used to mean computer related Entity, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside within a process and/or execution thread, and the components can be located on one computer and/or distributed between two or more computers. Moreover, these components can execute from various computer readable media having various data structures stored thereon. A component may, for example, be based on signals having one or more data packets (eg, data from two components interacting with another component between the local system, the distributed system, and/or the network, such as the Internet interacting with other systems) Communicate through local and/or remote processes.
应理解,本发明实施例的技术方案可以应用于长期演进(Long Term Evolution,LTE)架构,还可以应用于通用移动通信系统(Universal Mobile Telecommunications System,UMTS)陆地无线接入网(UMTS Terrestrial Radio Access Network,UTRAN)架构,或者全球移动通信系统(Global System for Mobile Communication,GSM)/增强型数据速率GSM演进(Enhanced Data Rate for GSM Evolution,EDGE)系统的无线接入网(GSM EDGE Radio Access Network,GERAN)架构。本发明实施例的技术方案还可以应用于其他通信系统,例如公共陆地移动网络(Public Land Mobile Network,PLMN)系统,甚至未来的5G通信系统等,本发明实施例对此不作限定。It should be understood that the technical solution of the embodiment of the present invention can be applied to a Long Term Evolution (LTE) architecture, and can also be applied to a Universal Mobile Telecommunications System (UMTS) terrestrial radio access network (UMTS Terrestrial Radio Access). Network, UTRAN) architecture, or Global System for Mobile Communication (GSM)/Enhanced Data Rate for GSM Evolution (EDGE) system radio access network (GSM EDGE Radio Access Network, GERAN) architecture. The technical solution of the embodiment of the present invention can also be applied to other communication systems, such as a Public Land Mobile Network (PLMN) system, and even a future 5G communication system.
本发明各个实施例可以应用于网络侧设备中。网络侧设备可以是用于与移动终端进行通信的设备,例如,可以是GSM系统或CDMA中的基站(Base Transceiver Station,BTS),也可以是WCDMA系统中的基站(NodeB,NB),还可以是LTE系统中的演进型基站(Evolutional Node B,eNB或eNodeB),或者未来5G通信系统中的网络侧设备等。Various embodiments of the present invention can be applied to a network side device. The network side device may be a device for communicating with the mobile terminal, for example, may be a base station (Base Transceiver Station, BTS) in the GSM system or CDMA, or may be a base station (NodeB, NB) in the WCDMA system, or It is an evolved base station (Evolutional Node B, eNB or eNodeB) in an LTE system, or a network side device in a future 5G communication system.
其中,移动终端可以与网络侧设备进行通信,也可以经无线接入网(Radio Access Network,RAN)与一个或多个核心网进行通信,移动终端可以包括但不限于手机、平板电脑(PAD)个人数字处理(Personal Digital Assistant,PDA)、便携式电脑、车载设备、可穿戴设备,未来5G通信系统中的终端设备等。需要说明的是,本发明实施例中的移动终端能够支持各类视频客户端的运行,能够通过这些视频客户端播放视频。移动终端的操作系统可以包括但不限于:Android系统、塞班系统、Windows系统、iOS(苹果公司开发的移动操作系 统)系统等等。The mobile terminal may communicate with the network side device, or communicate with one or more core networks via a radio access network (RAN), and the mobile terminal may include but is not limited to a mobile phone or a tablet (PAD). Personal Digital Assistant (PDA), portable computers, in-vehicle devices, wearable devices, terminal devices in future 5G communication systems, and the like. It should be noted that the mobile terminal in the embodiment of the present invention can support the running of various video clients, and can play video through these video clients. The operating system of the mobile terminal may include but is not limited to: Android system, Symbian system, Windows system, iOS (Mobile operating system developed by Apple Inc.) System) and so on.
此外,本发明的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(Compact Disk,CD)、数字通用盘(Digital Versatile Disk,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。Furthermore, various aspects or features of the present invention can be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques. The term "article of manufacture" as used in this application encompasses a computer program accessible from any computer-readable device, carrier, or media. For example, the computer readable medium may include, but is not limited to, a magnetic storage device (eg, a hard disk, a floppy disk, or a magnetic tape, etc.), such as a compact disk (CD), a digital versatile disk (Digital Versatile Disk, DVD). Etc.), smart cards and flash memory devices (eg, Erasable Programmable Read-Only Memory (EPROM), cards, sticks or key drivers, etc.). Additionally, various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" may include, without limitation, a wireless channel and various other mediums capable of storing, containing, and/or carrying instructions and/or data.
在视频体验评估中,需要获取如初始缓冲时延、视频平均主观得分(video Mean Opinion Score,vMOS)等体验指标,而这些指标的计算需要使用视频码率。针对视频分片的分片时长波动较大的情况,现有的SC获取视频码率的方案,获取的视频码率误差较大;而DPI获取视频码率的方案,是一个重量级的获取方案,为获取视频码率占用的资源较多,获取视频码率的效率较低。In the video experience evaluation, it is necessary to obtain experience indicators such as initial buffer delay and video Mean Opinion Score (vMOS), and the calculation of these indicators requires the use of video bit rate. For the case where the fragmentation duration of the video fragment fluctuates greatly, the existing SC obtains the video bit rate scheme, and the obtained video bit rate error is large; and the DPI acquisition video bit rate scheme is a heavyweight acquisition scheme. In order to obtain a video bit rate, more resources are used, and the video bit rate is less efficient.
鉴于此,本发明实施例提供一种获取视频码率的方法、装置及网络侧设备,既能保证视频码率的准确性,又能提高视频码率的效率。本发明实施例提供的获取视频码率的方法为一种轻量级的方案,更适宜应用于现网无线网络环境第二代移动通信(2nd-Generation,2G)、第三代移动通信(3rd-Generation,3G)或者第三代移动通信(4-Generation,4G),甚至第五代移动通信(5-Generation,5G)的网络环境中。本发明实施例中的获取视频码率的装置可以为网络侧设备的一部分或全部。In view of this, the embodiments of the present invention provide a method, a device, and a network side device for acquiring a video bit rate, which can ensure the accuracy of the video bit rate and improve the efficiency of the video bit rate. The method for obtaining the video bit rate provided by the embodiment of the present invention is a lightweight solution, which is more suitable for the second generation mobile communication (2nd-Generation, 2G) and the third generation mobile communication (3rd) in the existing network wireless network environment. -Generation, 3G) or third generation mobile communication (4-Generation, 4G), even in the fifth generation mobile communication (5-Generation, 5G) network environment. The device for obtaining the video bit rate in the embodiment of the present invention may be part or all of the network side device.
请参见图1,为应用本发明实施例的一种可能的网络架构示意图。图1所示的网络架构包括移动终端、网络侧设备、网络管理设备、核心网以及互联网。需要说明的是,实际应用中,图1所示的网络架构不仅仅包括一个移动终端、一个网络侧设备。Please refer to FIG. 1 , which is a schematic diagram of a possible network architecture in which an embodiment of the present invention is applied. The network architecture shown in FIG. 1 includes a mobile terminal, a network side device, a network management device, a core network, and the Internet. It should be noted that, in practical applications, the network architecture shown in FIG. 1 includes not only one mobile terminal but also one network side device.
用户选择进入移动终端上的视频客户端,选择观看某个视频,此时移动终端向该视频客户端对应的视频服务器发送连接请求,该连接请求通过网络侧设备、核心网发送至互联网上该视频客户端对应的视频服务器上,该视频客户端 对应的视频服务器根据该请求建立与该视频客户端的连接。在建立连接之后,该视频客户端向该视频服务器发送视频业务请求包,请求视频数据流,同样该视频业务请求包通过网络侧设备、核心网发送至该视频服务器,该视频服务器在接收到该视频业务请求包时,通过核心网、网络侧设备向移动终端发送视频数据流,按照此过程,用户可通过该视频客户端观看视频。The user selects to enter the video client on the mobile terminal and selects to watch a certain video. At this time, the mobile terminal sends a connection request to the video server corresponding to the video client, and the connection request is sent to the Internet through the network side device and the core network. The video client on the video server corresponding to the client The corresponding video server establishes a connection with the video client based on the request. After the connection is established, the video client sends a video service request packet to the video server to request a video data stream, and the video service request packet is sent to the video server through the network side device and the core network, and the video server receives the When the video service requests the packet, the video data stream is sent to the mobile terminal through the core network and the network side device. According to this process, the user can watch the video through the video client.
网络管理设备用于故障管理、配置管理、性能管理、安全管理、计费管理。在本发明实施例中,网络管理设备主要用于配置管理,可以配置视频域名服务器(Domain Name Server,DNS)配置表以及视频GET包包长度阈值配置表。其中,视频DNS配置表包括可以运行在移动终端上的视频客户端对应的DNS标识,例如,移动终端上的优酷客户端的DNS标识为k.youku.com,搜狐客户端的DNS标识为hot.vrs.sohu.com、my.tv.sohu.com、data.vod.itc.cn。视频GET包包长度阈值配置表包括各个视频客户端对应的GET包包长度阈值,例如优酷客户端对应的GET包包长度阈值为600,搜狐客户端对应的GET包包长度阈值为500等等,具体各个视频客户端对应的GET包包长度阈值的具体值在此不做限定。视频GET包包长度阈值配置表用于判断确定数据包是否可能为GET包。网络管理设备可向网络侧设备提供视频DNS配置表和视频GET包包长度阈值配置表。Network management equipment is used for fault management, configuration management, performance management, security management, and billing management. In the embodiment of the present invention, the network management device is mainly used for configuration management, and a video domain name server (DNS) configuration table and a video GET packet length threshold configuration table may be configured. The video DNS configuration table includes a DNS identifier corresponding to a video client that can be run on the mobile terminal. For example, the DNS identifier of the Youku client on the mobile terminal is k.youku.com, and the DNS identifier of the Sohu client is hot.vrs. Sohu.com, my.tv.sohu.com, data.vod.itc.cn. The video GET packet length threshold configuration table includes a GET packet length threshold corresponding to each video client. For example, the GET packet length threshold corresponding to the Youku client is 600, and the GET packet length threshold corresponding to the Sohu client is 500, and the like. The specific value of the GET packet length threshold corresponding to each video client is not limited herein. The video GET packet length threshold configuration table is used to determine whether the data packet is likely to be a GET packet. The network management device may provide a video DNS configuration table and a video GET packet length threshold configuration table to the network side device.
下面将结合附图2和附图3对本发明实施例提供的获取视频码率的方法进行详细介绍。A method for obtaining a video bit rate according to an embodiment of the present invention will be described in detail below with reference to FIG. 2 and FIG.
请参见图2,为本发明实施例提供的一种获取视频码率的方法的流程示意图,该方法可以包括:FIG. 2 is a schematic flowchart of a method for obtaining a video bit rate according to an embodiment of the present disclosure, where the method may include:
201,获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及所述第一视频业务请求包的属性参数,所述第一视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第一视频分片;Step 201: Obtain a first video service request packet that is sent by the mobile terminal and that carries a preset video service identifier, and an attribute parameter of the first video service request packet, where the first video service request packet is used by the mobile terminal to The video server corresponding to the preset video service identifier requests the first video segmentation;
具体的,获取视频码率的装置在网络中监听移动终端发送的各种数据包,这些数据包可以包括但不限于语音业务数据包、视频业务数据包、文字业务数据包、图片业务数据包等等,这些数据包由所述移动终端发送至对应的服务器。其中,所述视频业务数据包可以包括连接请求包、视频业务请求包等等,所述连接请求包可用于请求与视频服务器建立连接,所述视频业务请求包可用于向视频服务器请求视频业务或视频分片。所述移动终端上的不同视频客户端对应 着不同的视频服务器,例如优酷客户端对应着优酷服务器。Specifically, the device for obtaining a video bit rate monitors various data packets sent by the mobile terminal in the network, and the data packets may include, but are not limited to, a voice service data packet, a video service data packet, a text service data packet, a picture service data packet, and the like. And so, these data packets are sent by the mobile terminal to the corresponding server. The video service data packet may include a connection request packet, a video service request packet, and the like, where the connection request packet may be used to request to establish a connection with a video server, where the video service request packet may be used to request a video service from a video server or Video fragmentation. Corresponding to different video clients on the mobile terminal Different video servers, such as Youku client, correspond to Youku server.
当所述移动终端接收用户针对某个视频客户端的某个视频输入的打开指令时,可以确认用户要观看该视频,而不是浏览视频信息,此时所述移动终端可向该视频客户端对应的视频服务器发送所述连接请求包,所述连接请求包可携带该视频客户端对应的DNS标识,或该视频服务器的标识,以便所述连接请求包能够到达该视频服务器,进而便于建立该视频客户端与该视频服务器之间的准确连接关系,便于该视频客户端获取视频业务或视频分片。在该视频客户端与该视频服务器建立连接后,该视频客户端可向该视频服务器发送视频业务请求包,请求该视频服务器中存储的视频业务或视频分片。为了明确视频业务请求包是向哪个视频服务器请求视频业务或视频分片,视频业务请求包可携带该视频客户端对应的DNS标识,或该视频服务器的标识。When the mobile terminal receives an opening instruction of a video input by a user for a certain video client, it may confirm that the user wants to view the video instead of browsing the video information, and the mobile terminal may correspond to the video client. The video server sends the connection request packet, and the connection request packet may carry a DNS identifier corresponding to the video client, or an identifier of the video server, so that the connection request packet can reach the video server, thereby facilitating establishment of the video client. The exact connection between the terminal and the video server facilitates the video client to obtain video services or video fragments. After the video client establishes a connection with the video server, the video client may send a video service request packet to the video server to request a video service or video fragment stored in the video server. In order to clarify which video server requests the video service or the video fragment, the video service request packet may carry the DNS identifier corresponding to the video client or the identifier of the video server.
所述装置监听所述移动终端发送的携带预设视频业务标识的第一视频业务请求包,所述第一视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第一视频分片。其中,所述预设视频业务标识可为预设的至少一个DNS标识中的任意一个。所述至少一个DNS标识中每个DNS标识为运行在移动终端上的视频客户端对应的DNS标识,可参见表1,为视频DNS配置表,包括视频客户端标识与DNS标识的对应关系。The device monitors a first video service request packet that is sent by the mobile terminal and carries a preset video service identifier, where the first video service request packet is used by the mobile terminal to identify a video server corresponding to the preset video service identifier. Request the first video slice. The preset video service identifier may be any one of preset preset at least one DNS identifier. Each of the at least one DNS identifier is a DNS identifier corresponding to a video client running on the mobile terminal. For example, refer to Table 1, which is a video DNS configuration table, including a correspondence between a video client identifier and a DNS identifier.
表1视频DNS配置表Table 1 Video DNS Configuration Table
需要说明的是,表1仅用于举例性说明,并不构成对本发明实施例的限定。视 频DNS配置表可由所述装置向图1所示的网络管理设备获取,所述装置向所述网络管理设备发送请求视频DNS配置表的指令,所述网络管理设备根据该指令向所述装置下发视频DNS配置表。所述装置可对视频DNS配置表进行存储,也可以需要时向网络管理设备获取。It should be noted that Table 1 is for illustrative purposes only and does not constitute a limitation on the embodiments of the present invention. Vision The frequency DNS configuration table may be obtained by the device to the network management device shown in FIG. 1, the device sending an instruction to the network management device requesting a video DNS configuration table, and the network management device is directed to the device according to the instruction Send a video DNS configuration table. The device may store the video DNS configuration table or may acquire the network DNS device when needed.
其中,视频DNS配置表中的DNS标识只有在移动终端上对应的视频客户端中的视频业务被点击播放时才会出现。所述预设视频业务标识也可为预设的至少一个视频服务器标识中的任意一个。所述至少一个视频服务器标识中每个视频服务器标识为运行在移动终端上的视频客户端对应的视频服务器的标识,可以理解的是,所述至少一个视频服务器标识为所述至少一个DNS标识对应的视频服务器的标识。视频服务器标识可以为名称、网络互连协议(Internet Protocol,IP)地址、域名等。因此,在所述装置监听到所述移动终端发送的数据包时,可根据所述预设视频业务标识或视频DNS配置表确定该数据包是否与视频业务相关,从而排除与视频业务不相关的数据包,保留与视频业务相关的数据包,避免在获取视频码率时对所述移动终端发送的所有数据包进行解包,可以有效减少解包的盲目性。The DNS identifier in the video DNS configuration table only appears when the video service in the corresponding video client on the mobile terminal is clicked and played. The preset video service identifier may also be any one of preset preset at least one video server identifier. Each of the at least one video server identifier is an identifier of a video server corresponding to the video client running on the mobile terminal. It can be understood that the at least one video server identifier corresponds to the at least one DNS identifier. The identity of the video server. The video server identifier can be a name, an Internet Protocol (IP) address, a domain name, and the like. Therefore, when the device monitors the data packet sent by the mobile terminal, whether the data packet is related to the video service may be determined according to the preset video service identifier or the video DNS configuration table, thereby excluding the video service. The data packet retains the data packet related to the video service, and avoids unpacking all the data packets sent by the mobile terminal when acquiring the video bit rate, which can effectively reduce the blindness of the unpacking.
所述装置在监听所述第一视频业务请求包之前,获取所述移动终端发送的携带所述预设视频业务标识的连接请求包,所述连接请求包用于所述移动终端请求与所述预设视频业务标识对应的视频服务器建立连接。And acquiring, by the mobile terminal, a connection request packet that is sent by the mobile terminal and carrying the preset video service identifier, where the connection request packet is used by the mobile terminal to request The video server corresponding to the preset video service identifier establishes a connection.
所述装置检测所述预设视频业务标识是否存在于连接映射表中,所述连接映射表包括所述移动终端当前连接的视频服务器对应的视频业务标识,以及所述视频业务标识对应的DNS生存时间段。可以理解的是,所述网络侧设备在第一次连接上某个视频服务器时,将该视频服务器的视频业务标识、所述视频业务标识对应的DNS生存时间段与所述移动终端的标识进行关联记录,记录在所述连接映射表中。需要说明的是,所述连接映射表只记录一次,即当前连接的这次,若新的连接请求包连接其它的视频服务器,则更改所述连接映射表。若所述预设视频业务标识存在于所述连接映射表中,表明所述预设视频业务标识与当前连接的视频服务器的视频业务标识相同,并非第一次连接所述预设视频业务标识对应的视频服务器,则所述装置更新所述连接映射表,即更新所述预设视频业务标识对应的DNS生存时间段。若所述预设视频业务标识不存在于所述连接映射表中,表明所述预设视频业务标识与当前连接的视频服务器的 视频业务标识不同,或为第一次连接所述预设视频业务标识对应的视频服务器,则所述装置获取所述预设视频业务标识对应的DNS生存时间段,并更改所述连接映射表,即所述连接映射表此时记录所述预设视频业务标识、所述预设视频业务标识对应的DNS生存时间段与所述移动终端的标识的关联关系。所述装置在更改所述连接映射表之后,便可监听所述移动终端发送的所述第一视频业务请求包。The device detects whether the preset video service identifier exists in a connection mapping table, where the connection mapping table includes a video service identifier corresponding to a video server currently connected to the mobile terminal, and a DNS survival corresponding to the video service identifier period. It can be understood that, when the network side device is connected to a video server for the first time, the video service identifier of the video server, the DNS lifetime time period corresponding to the video service identifier, and the identifier of the mobile terminal are performed. The association record is recorded in the connection mapping table. It should be noted that the connection mapping table is recorded only once, that is, this time of the current connection, if the new connection request packet is connected to other video servers, the connection mapping table is changed. If the preset video service identifier is in the connection mapping table, it indicates that the preset video service identifier is the same as the video service identifier of the currently connected video server, and is not the first time that the preset video service identifier is connected. The video server, the device updates the connection mapping table, that is, updates the DNS lifetime time period corresponding to the preset video service identifier. If the preset video service identifier does not exist in the connection mapping table, indicating that the preset video service identifier is related to the currently connected video server. If the video service identifier is different, or the video server corresponding to the preset video service identifier is connected for the first time, the device acquires a DNS lifetime time period corresponding to the preset video service identifier, and changes the connection mapping table. That is, the connection mapping table records the association relationship between the preset video service identifier, the DNS lifetime time period corresponding to the preset video service identifier, and the identifier of the mobile terminal. After the device changes the connection mapping table, the device may listen to the first video service request packet sent by the mobile terminal.
其中,DNS生存时间段包括从所述连接请求包发送的时间点至有效时间值结束的时间点,不同的视频服务器或不同的视频业务标识对应的有效时间值有所不同,具体数值由各个视频服务器各自设定。视频服务器可在接收到所述连接请求包时,向视频客户端或所述移动终端反馈其IP地址以及有效时间值。The timeout period of the DNS includes the time point from the time when the connection request packet is sent to the time when the valid time value ends. The valid time values of different video servers or different video service identifiers are different. The specific value is determined by each video. The server is set individually. The video server may feed back the IP address and the valid time value to the video client or the mobile terminal upon receiving the connection request packet.
所述装置在监听到所述第一视频业务请求包时,获取所述第一视频业务请求包的属性参数,所述第一视频业务请求包的属性参数可以包括包长度、视频类型(高清、标清、流畅)等等。同时,所述装置获取所述移动终端发送所述第一视频业务请求包的时间点,并检测所述移动终端发送所述第一视频业务请求包的时间点是否在所述预设视频业务标识对应的DNS生存时间段内,若所述移动终端发送所述第一视频业务请求包的时间点在所述预设视频业务标识对应的DNS生存时间段内,则检测所述第一视频业务请求包的属性参数是否满足所述预设视频码率计算条件。所述预设视频码率计算条件用于确定对视频业务请求包进行解析,并计算视频业务请求包对应的视频分片的视频码率。The device obtains an attribute parameter of the first video service request packet when the first video service request packet is received, and the attribute parameter of the first video service request packet may include a packet length and a video type (HD, SD, smooth, and so on. At the same time, the device acquires a time point at which the mobile terminal sends the first video service request packet, and detects whether the time point at which the mobile terminal sends the first video service request packet is in the preset video service identifier. Detecting the first video service request, if the time point of the first video service request packet is in the DNS lifetime of the preset video service identifier, Whether the attribute parameter of the packet satisfies the preset video bit rate calculation condition. The preset video bit rate calculation condition is used to determine that the video service request packet is parsed, and calculate a video bit rate of the video segment corresponding to the video service request packet.
在一种可能实现的方式中,所述第一视频业务请求包的属性参数所述第一视频业务请求包的包长度,所述预设视频码率计算条件包括所述预设视频业务标识对应的视频业务请求包包长度阈值。在本发明实施例中,所述网络管理设备可向所述装置提供视频GET包包长度阈值配置表,包括视频客户端标识与视频GET包包长度阈值的对应关系,用于判断确定数据包是否可能为GET包。具体的可参见下表2,视频GET包即为视频业务请求包。In a possible implementation, the attribute of the first video service request packet is a packet length of the first video service request packet, and the preset video code rate calculation condition includes that the preset video service identifier corresponds to The video service requests the packet length threshold. In the embodiment of the present invention, the network management device may provide a video GET packet length threshold configuration table, including a correspondence between a video client identifier and a video GET packet length threshold, for determining whether the data packet is determined. May be a GET package. For details, see Table 2 below. The video GET packet is the video service request packet.
表2视频GET包包长度阈值配置表Table 2 video GET packet length threshold configuration table
需要说明的是,表2仅用于举例性说明,并不构成对本发明实施例的限定。视频GET包包长度阈值配置表可由所述装置向所述网络管理设备获取,所述装置向所述网络管理设备发送请求视频GET包包长度阈值配置表的指令,所述网络管理设备根据该指令向所述装置下发视频GET包包长度阈值配置表。所述装置可对视频GET包包长度阈值配置表进行存储,也可以需要时向网络管理设备获取。表2包括视频客户端标识与视频GET包包长度阈值的对应关系,结合表1可以推导出视频业务标识与视频GET包包长度阈值的对应关系。It should be noted that Table 2 is for illustrative purposes only and does not constitute a limitation on the embodiments of the present invention. The video GET packet length threshold configuration table may be obtained by the device to the network management device, and the device sends an instruction to the network management device to request a video GET packet length threshold configuration table, and the network management device according to the instruction A video GET packet length threshold configuration table is sent to the device. The device may store the video GET packet length threshold configuration table, or may acquire the video GET packet length threshold configuration table when needed. Table 2 includes the correspondence between the video client identifier and the video GET packet length threshold. The correspondence between the video service identifier and the video GET packet length threshold can be derived in conjunction with Table 1.
所述装置检测所述第一视频业务请求包的包长度是否大于所述预设视频业务标识对应的视频业务请求包包长度阈值,即确定所述第一视频业务请求包是否为GET包,进而确定是否对所述第一视频业务请求包进行解析,计算所述第一视频分片的视频码率。若大于所述预设视频业务标识对应的视频业务请求包包长度阈值,则确定所述第一视频业务请求包为GET包,并确定所述第一视频业务请求包的属性参数满足所述预设视频码率计算条件,进而确定需要对所述第一视频业务请求包进行解析。The device detects whether the packet length of the first video service request packet is greater than a video service request packet length threshold corresponding to the preset video service identifier, that is, determines whether the first video service request packet is a GET packet, and further Determining whether to parse the first video service request packet, and calculating a video bit rate of the first video segment. If the video service request packet length threshold is greater than the preset video service identifier, determine that the first video service request packet is a GET packet, and determine that the attribute parameter of the first video service request packet meets the pre- The video bit rate calculation condition is set, thereby determining that the first video service request packet needs to be parsed.
表3腾讯iOS视频上行包大小特征统计Table 3 Tencent iOS video uplink packet size feature statistics
表4优酷视频上行包大小特征统计Table 4 Youku video uplink packet size characteristics statistics
表3中是统计的腾讯iOS视频业务中上行包占比情况。统计的结果表明:上行ACK包占上行包的比例在90%以上。根据设置的腾讯iOS的阈值为500,从表3中发现净荷大于500的上行包占比低于2%。这说明通过视频GET包包长度阈值的设置,可以将解包的数目减小到上行包的2%左右。其它视频的情况与此类似,表4中显示通过设置优酷视频的GET包包长度阈值为600,可以使解包工作量减小到GET包数目的1%左右。Table 3 shows the statistics of the proportion of uplink packets in Tencent's iOS video service. The statistical results show that the ratio of uplink ACK packets to upstream packets is above 90%. According to the set threshold of Tencent iOS of 500, it is found from Table 3 that the uplink packet ratio of the payload greater than 500 is less than 2%. This shows that by setting the video GET packet length threshold, the number of unpacking can be reduced to about 2% of the upstream packet. The situation of other videos is similar. Table 4 shows that by setting the GET packet length threshold of Youku video to 600, the unpacking workload can be reduced to about 1% of the number of GET packets.
表2中每个视频客户端对应的视频GET包包长度阈值的获得是通过对特定视频的GET请求包大小的统计规律得出的。下图a中显示的是腾讯iOS的GET包包长度大小,可以发现其长度在610到613之间,本发明将腾讯iOS的阈值设置为500留下了一定变化空间。下图b中显示的是优酷视频分片的GET包包长度大小,可以发现其长度在764到770之间变化,本发明将优酷视频的阈值设置为600,同样留下了一定的变化空间。The video GET packet length threshold corresponding to each video client in Table 2 is obtained by the statistical rule of the GET request packet size for a specific video. The following figure shows the length of the GET packet of Tencent iOS. It can be found that the length is between 610 and 613. The invention leaves the threshold of Tencent iOS to 500 and leaves a certain change space. The length of the GET packet of the Youku video segment is shown in the following figure b. It can be found that the length varies from 764 to 770. The threshold of the Youku video is set to 600, which also leaves a certain change space.
图a腾讯iOS视频分片的上行GET包包长度大小Figure a: Tencent GET packet length of Tencent iOS video segmentation
图b优酷视频分片的上行GET包包长度大小Figure b Youku video segmentation of the upstream GET packet length
202,若所述第一视频业务请求包的属性参数满足预设视频码率计算条件,则根据所述第一视频业务请求包获取所述第一视频分片的分片时长和所述第一视频分片的分片大小;202. If the attribute parameter of the first video service request packet meets a preset video code rate calculation condition, obtain a fragmentation duration of the first video fragment and the first according to the first video service request packet. The fragment size of the video fragment;
具体的,若所述第一视频业务请求包的属性参数满足所述预设视频码率计算条件,则所述装置解析所述第一视频业务请求包,并根据解析结果获取所述第一视频分片的分片时长。在满足所述预设视频码率计算条件时,才进行解析,可以进一步减少需要解析的上行GET包数目。Specifically, if the attribute parameter of the first video service request packet satisfies the preset video code rate calculation condition, the device parses the first video service request packet, and obtains the first video according to the parsing result. The fragmentation duration of the fragment. When the preset video bit rate calculation condition is satisfied, the parsing is performed, and the number of uplink GET packets that need to be parsed can be further reduced.
所述预设视频业务标识对应的视频服务器在接收到所述第一视频业务请求包时,根据所述第一视频业务请求包向所述移动终端发送下行数据包,所述下行数据包可能携带视频流,也可能携带其它的内容。所述预设视频业务标识对应的视频服务器可针对一个视频业务请求包发送至少两个下行数据包,具体下行数据包的数量由视频业务请求包和视频服务器确定。所述预设视频业务标识对应的视频服务器在接收到下一个视频业务请求包之前所发送的下行数据包均是针对本次视频业务请求包发送的。所述装置监听并获取所述预设视频业务标识对应的视频服务器针对所述第一视频业务请求包发送的下行数据包,在所述装置监听到第二视频业务请求包之前所监听到的下行数据包即为所述第一视频业务请求包对应的下行数据包。When receiving the first video service request packet, the video server corresponding to the preset video service identifier sends a downlink data packet to the mobile terminal according to the first video service request packet, where the downlink data packet may be carried The video stream may also carry other content. The video server corresponding to the preset video service identifier may send at least two downlink data packets for one video service request packet, where the number of specific downlink data packets is determined by the video service request packet and the video server. The downlink data packet sent by the video server corresponding to the preset video service identifier before receiving the next video service request packet is sent for the current video service request packet. The device monitors and acquires the downlink data packet sent by the video server corresponding to the preset video service identifier for the first video service request packet, and the downlink monitored before the device monitors the second video service request packet. The data packet is the downlink data packet corresponding to the first video service request packet.
所述装置根据预设算法或流特征对所述至少两个下行数据包中每个下行数据包进行识别,并从所述两个下行数据包中选择出携带视频流的下行数据包,舍弃不携带视频流的下行数据包。其中,所述预设算法可为SC算法,SC算法通过DNS标识和流特征相结合,将包含视频DNS标识并且满足视频流特征的业务数据流识别为视频流。在一种可能实现的方式中,所述装置获取对针对所述第一视频业务请求包发送的第一个或者第二个携带视频流的下行数据包进行解析,以获取所述第一视频分片的分片大小。在另一种可能实现的方式中,所述装置获取每个携带视频流的下行数据包的净荷,并累加所述每个携带视频流的下行数据包的净荷得到总净荷,并将所述总净荷作为所述第一视频分片的分片大小。其中,净荷表示一个数据包中传输的用户数据部分,在本发明实施例中表示在下行数据包中传输的视频流的大小。The device identifies each downlink packet in the at least two downlink data packets according to a preset algorithm or a flow feature, and selects a downlink data packet that carries the video stream from the two downlink data packets, and discards the A downstream packet carrying a video stream. The preset algorithm may be an SC algorithm. The SC algorithm combines a DNS identifier and a stream feature to identify a service data stream that includes a video DNS identifier and satisfies a video stream feature as a video stream. In a possible implementation manner, the device acquires, by using a first data packet sent by the first video service request packet, a downlink data packet that is sent by the first video service request packet, to obtain the first video segment. The slice size of the slice. In another possible implementation manner, the device acquires a payload of each downlink data packet carrying the video stream, and accumulates the payload of each downlink data packet carrying the video stream to obtain a total payload, and The total payload is used as a slice size of the first video slice. The payload represents a portion of the user data transmitted in a data packet, and represents the size of the video stream transmitted in the downlink data packet in the embodiment of the present invention.
203,根据所述第一视频分片的分片时长和所述第一视频分片的分片大小计算所述第一视频分片的视频码率; 203. Calculate a video code rate of the first video segment according to a fragmentation duration of the first video fragment and a fragment size of the first video fragment.
具体的,所述装置用所述第一视频分片的分片大小除以所述第一视频分片的分片时长便得到所述第一视频分片的视频码率。Specifically, the device obtains a video code rate of the first video segment by dividing a slice size of the first video segment by a slice duration of the first video segment.
所述装置检测在所述预设视频业务标识对应的DNS生存时间段内是否获取到所述移动终端发送的携带所述预设视频业务标识的第二视频业务请求包,所述第二视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第二视频分片。若在所述预设视频业务标识对应的DNS生存时间段内获取到所述第二视频业务请求包,则所述装置可按照对所述第一视频业务请求包的流程计算所述第二视频分片的视频码率。若在所述预设视频业务标识对应的DNS生存时间段内获取到第三视频业务请求包,则所述装置可按照对所述第一视频业务请求包的流程计算所述第三视频分片的视频码率,以此类推,并在当前系统时间达到所述预设视频业务标识对应的DNS生存时间段时,停止对视频码率的计算。The device detects whether the second video service request packet carrying the preset video service identifier sent by the mobile terminal is acquired in the DNS lifetime time period corresponding to the preset video service identifier, and the second video service is obtained. The request packet is used by the mobile terminal to request a second video fragment from a video server corresponding to the preset video service identifier. If the second video service request packet is obtained in the DNS lifetime of the preset video service identifier, the device may calculate the second video according to the process of requesting the first video service request packet. The video bit rate of the slice. If the third video service request packet is obtained in the DNS lifetime of the preset video service identifier, the device may calculate the third video fragment according to the process of requesting the first video service request packet. The video bit rate, and so on, and when the current system time reaches the DNS lifetime time period corresponding to the preset video service identifier, the calculation of the video bit rate is stopped.
在本发明实施例中,通过获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及第一视频业务请求包的属性参数,并在第一视频业务请求包的属性参数满足预设视频码率计算条件的情况下,根据第一视频业务请求包获取第一视频分片的分片时长和第一视频分片的分片大小,并根据第一视频分片的分片时长和第一视频分片的分片大小计算第一视频分片的视频码率,从而既能保证视频码率的准确性,又能提高获取视频码率的效率。In the embodiment of the present invention, the first video service request packet carrying the preset video service identifier and the attribute parameter of the first video service request packet sent by the mobile terminal are obtained, and the attribute parameters of the first video service request packet are satisfied. When the video bit rate calculation condition is set, the fragmentation duration of the first video fragment and the fragment size of the first video fragment are obtained according to the first video service request packet, and according to the fragmentation duration of the first video fragment. The slice size of the first video slice calculates the video bit rate of the first video slice, thereby ensuring the accuracy of the video bit rate and improving the efficiency of acquiring the video bit rate.
请参见图3,为本发明实施例提供的另一种获取视频码率的方法的流程示意图,该方法可以包括:FIG. 3 is a schematic flowchart of another method for obtaining a video bit rate according to an embodiment of the present invention. The method may include:
301,判断移动终端发送的数据包A是否为DNS包;301. Determine whether the data packet A sent by the mobile terminal is a DNS packet.
其中,所述DNS包为所述移动终端请求与对应的视频服务器建立连接。获取视频码率的装置判断所述数据包A是否为DNS包,可以将视频业务与其它业务进行区分。若所述数据包A为所述DNS包,则执行步骤302。The DNS packet requests the mobile terminal to establish a connection with a corresponding video server. The device for obtaining the video bit rate determines whether the data packet A is a DNS packet, and can distinguish the video service from other services. If the data packet A is the DNS packet,
需要说明的是,所述DNS包为不加密的数据包,同理图2所示实施例中的连接请求包也为不加密的数据包。It should be noted that the DNS packet is a data packet that is not encrypted, and the connection request packet in the embodiment shown in FIG. 2 is also a data packet that is not encrypted.
302,若所述数据包A为所述DNS包,则判断所述数据包A是否携带预设视频业务标识;302. If the data packet A is the DNS packet, determine whether the data packet A carries a preset video service identifier.
具体的,所述装置判断所述DNS包是否携带所述预设视频业务标识,可 以在视频业务中对移动终端上的视频客户端相关的视频业务进行识别。其中,所述预设视频业务标识的介绍可参见图2所示实施例中对其的介绍,在此不再赘述。Specifically, the device determines whether the DNS packet carries the preset video service identifier, where The video service related to the video client on the mobile terminal is identified in the video service. For the description of the preset video service identifier, refer to the description in the embodiment shown in FIG. 2, and details are not described herein again.
若所述数据包A携带所述预设视频业务标识,则执行步骤304;若携带所述预设视频业务标识,则执行步骤303。If the data packet A carries the preset video service identifier,
303,若所述数据包A不携带所述预设视频业务标识,则不做任何处理;303. If the data packet A does not carry the preset video service identifier, no processing is performed.
304,若所述数据包A携带所述预设视频业务标识,则判断所述预设视频业务标识是否存在于连接映射表中;If the data packet A carries the preset video service identifier, it is determined whether the preset video service identifier exists in the connection mapping table.
具体的,所述装置判断所述预设视频业务标识是否存在于所述连接映射表中,可以理解的是,判断是否第一次请求建立连接,所述连接映射表只记录当前连接的信息。Specifically, the device determines whether the preset video service identifier exists in the connection mapping table. It may be understood that determining whether to establish a connection for the first time, the connection mapping table only records information of the current connection.
305,若存在于所述连接映射表中,则更新所述预设视频业务标识对应的DNS生存时间段;305. If it exists in the connection mapping table, update a DNS lifetime time period corresponding to the preset video service identifier.
具体的,若存在于所述连接映射表中,表明非第一次请求建立连接,则更新所述预设视频业务标识对应的DNS生存时间段。Specifically, if it exists in the connection mapping table, indicating that the connection is not established for the first time, the DNS lifetime time period corresponding to the preset video service identifier is updated.
306,若不存在于所述连接映射表中,则获取所述预设视频业务标识对应的DNS生存时间段,并更改所述连接映射表;306. If not in the connection mapping table, obtain a DNS lifetime period corresponding to the preset video service identifier, and change the connection mapping table.
具体的,若不存在于所述连接映射表中,表明第一次请求建立连接,则获取所述预设视频业务标识对应的DNS生存时间段,并更改所述连接映射表,即将之前记录的连接信息更改为现在的连接信息。Specifically, if the connection mapping table is not present, indicating that the connection is established for the first time, the DNS lifetime time period corresponding to the preset video service identifier is obtained, and the connection mapping table is changed, that is, the previously recorded The connection information is changed to the current connection information.
307,在所述预设视频业务标识对应的DNS生存时间段内接收所述移动终端发送的携带所述预设视频业务标识的数据包B;307: Receive, in a DNS lifetime time period corresponding to the preset video service identifier, a data packet B that is sent by the mobile terminal and that carries the preset video service identifier.
其中,所述数据包B可能为用于所述移动终端向对应的视频服务器请求下行数据包的上行数据包,也可能为其它用途的上行数据包,因为需判断所述数据包B是否用于所述移动终端向对应的视频服务器请求下行数据包,可通过步骤308判断。The data packet B may be an uplink data packet for the mobile terminal to request a downlink data packet from the corresponding video server, or may be an uplink data packet for other purposes, because it is determined whether the data packet B is used for The mobile terminal requests a downlink data packet from the corresponding video server, and may determine by
308,判断所述数据包B的包长度是否大于所述预设视频业务标识对应的GET包包长度阈值;308. Determine whether the packet length of the data packet B is greater than a GET packet length threshold corresponding to the preset video service identifier.
具体的,若某个数据包的包长度大于所述预设视频业务标识对应的GET包包长度阈值,则可以确定该数据包为GET包,用于向所述预设视频业务标 识对应的视频服务器请求下行数据包。Specifically, if the packet length of a data packet is greater than the GET packet length threshold corresponding to the preset video service identifier, the data packet may be determined to be a GET packet, and used to mark the preset video service Know the corresponding video server to request downstream packets.
对于步骤307和步骤308,在一种可能实现的方式中,在所述预设视频业务标识对应的DNS生存时间段内接收所述移动终端发送的数据包B,判断所述数据包B的包长度是否大于所述预设视频业务标识对应的GET包包长度阈值,若大于,则判断所述数据包B是否携带所述预设业务标识,该种可能实现的方式,可以进一步减少解包数量。在另一种可能实现的方式中,在所述预设视频业务标识对应的DNS生存时间段内接收所述移动终端发送的数据包B,判断所述数据包B的包长度是否大于所述预设视频业务标识对应的GET包包长度阈值并同时判断所述数据包B是否携带所述预设业务标识。For the 307 and the
309,若大于所述预设视频业务标识对应的GET包包长度阈值,则解析所述数据包B获得分片时长;309. If the threshold of the GET packet length corresponding to the preset video service identifier is greater than, the data packet B is parsed to obtain a fragmentation duration.
310,根据针对所述数据包B发送的下行数据包获取分片大小;310. Acquire a fragment size according to the downlink data packet sent by the data packet B.
具体的,根据所述预设视频业务标识对应的视频服务器针对所述数据包B发送的下行数据包获取分片大小。Specifically, the video server corresponding to the preset video service identifier obtains a fragment size for the downlink data packet sent by the data packet B.
311,根据所述分片时长和所述分片大小计算视频码率;311. Calculate a video code rate according to the fragmentation duration and the fragment size.
在步骤301的判断结构为否时,即所述数据包A不为所述DNS包,所述装置判断所述数据包A是否为GET包,具体的判断过程为:获取所述数据包A之前的DNS包以及该DNS包对应的DNS生存时间段,判断所述数据包A的发送时间点是否在该DNS生存时间段内,若在该DNS生存时间段内,则判断所述数据包A的包长度是否大于该DNS包对应的视频业务标识对应的GET包包长度阈值;若大于则确定所述数据包A为GET包。在判断出所述数据包A为GET包后,解析所述数据包A获得分片时长,根据针对所述数据包A发送的下行数据包获取分片大小,从而计算视频码率。若不在该DNS生存时间段内,则不做任何处理;若所述数据包A不携带预设视频业务标识,则不做任何处理;若所述数据包A的包长度小于所述预设视频业务标识对应的GET包包长度阈值,则不做任何处理。When the determining structure of the
在本发明实施例中,通过预设视频业务标识可以避免对与视频无关的数据包的解析,减少解析量,通过GET包包长度阈值可以进一步减少计算量,从而提高获取视频码率的效率;通过解析计算,可以保证视频码率的准确性。 In the embodiment of the present invention, by presetting the video service identifier, the parsing of the data-independent data packet can be avoided, and the parsing amount can be reduced. The GET packet length threshold can further reduce the calculation amount, thereby improving the efficiency of acquiring the video bit rate. Through analytical calculation, the accuracy of the video bit rate can be guaranteed.
请参见图4,为本发明实施例提供的一种获取视频码率的装置的结构示意图。所述装置40包括请求包获取单元401、参数获取单元402和码率计算单元403。FIG. 4 is a schematic structural diagram of an apparatus for acquiring a video bit rate according to an embodiment of the present invention. The
请求包获取单元401,用于获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及所述第一视频业务请求包的属性参数,所述第一视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第一视频分片。The request
参数获取单元402,用于若所述第一视频业务请求包的属性参数满足预设视频码率计算条件,则根据所述第一视频业务请求包获取所述第一视频分片的分片时长和所述第一视频分片的分片大小。The
码率计算单元403,用于根据所述第一视频分片的分片时长和所述第一视频分片的分片大小计算所述第一视频分片的视频码率。The code
可选的,所述预设视频业务标识为预设的至少一个域名服务器DNS标识中的任意一个,或为预设的至少一个视频服务器标识中的任意一个。Optionally, the preset video service identifier is any one of the preset at least one domain name server DNS identifier, or any one of the preset at least one video server identifier.
可选的,所述请求包获取单元401,还用于在获取移动终端发送的携带预设视频业务标识的第一视频业务请求包以及所述第一视频业务请求包的属性参数之前,获取所述移动终端发送的携带所述预设视频业务标识的连接请求包,所述连接请求包用于所述移动终端请求与所述预设视频业务标识对应的视频服务器建立连接;Optionally, the request
所述装置40还包括:The
标识检测单元404,用于检测所述预设视频业务标识是否存在于连接映射表中,所述连接映射表包括所述移动终端当前连接的视频服务器对应的视频业务标识,以及所述视频业务标识对应的DNS生存时间段;The
时间获取单元405,用于若所述预设视频业务标识不存在于所述连接映射表中,则获取所述预设视频业务标识对应的DNS生存时间段,并更改所述连接映射表。The
可选的,所述时间获取单元405,还用于获取所述移动终端发送所述第一视频业务请求包的时间点;Optionally, the
所述装置40还包括:The
条件检测单元406,用于若所述移动终端发送所述第一视频业务请求包的
时间点在所述预设视频业务标识对应的DNS生存时间段内,则检测所述第一视频业务请求包的属性参数是否满足所述预设视频码率计算条件。a
可选的,所述第一视频业务请求包的属性参数包括所述第一视频业务请求包的包长度,所述预设视频码率计算条件包括所述预设视频业务标识对应的视频业务请求包包长度阈值;Optionally, the attribute parameter of the first video service request packet includes a packet length of the first video service request packet, and the preset video code rate calculation condition includes a video service request corresponding to the preset video service identifier. Packet length threshold;
所述条件检测单元406具体用于检测所述第一视频业务请求包的包长度是否大于所述预设视频业务标识对应的视频业务请求包包长度阈值;若大于所述预设视频业务标识对应的视频业务请求包包长度阈值,则确定所述第一视频业务请求包的属性参数满足所述预设视频码率计算条件。The
可选的,所述参数获取单元402包括时长获取单元、视频流获取单元和大小获取单元,未在图4中标明。Optionally, the
时长获取单元,用于解析所述第一视频业务请求包,并根据解析结果获取所述第一视频分片的分片时长;a time length obtaining unit, configured to parse the first video service request packet, and obtain a fragmentation duration of the first video segment according to the parsing result;
视频流获取单元,用于获取所述预设视频业务标识对应的视频服务器针对所述第一视频业务请求包发送的下行数据包;a video stream obtaining unit, configured to acquire a downlink data packet sent by the video server corresponding to the preset video service identifier for the first video service request packet;
大小获取单元,用于根据所述下行数据包获取所述第一视频分片的分片大小。And a size obtaining unit, configured to acquire a fragment size of the first video fragment according to the downlink data packet.
可选的,所述装置40还包括:Optionally, the
请求包检测单元407,用于检测在所述预设视频业务标识对应的DNS生存时间段内是否获取到所述移动终端发送的携带所述预设视频业务标识的第二视频业务请求包,所述第二视频业务请求包用于所述移动终端向所述预设视频业务标识对应的视频服务器请求第二视频分片;The request
所述条件检测单元406,还用于若在所述预设视频业务标识对应的DNS生存时间段内获取到所述第二视频业务请求包,则检测第二视频业务请求包的属性参数是否满足所述预设视频码率计算条件;The
所述参数获取单元402,还用于若所述第二视频业务请求包的属性参数满足所述预设视频码率计算条件,则根据所述第二视频业务请求包获取所述第二视频分片的分片时长和所述第二视频分片的分片大小;The
所述参数计算单元403,还用于根据所述第二视频分片的分片时长和所述第二视频分片的分片大小计算所述第二视频分片的视频码率。
The
需要说明的是,上述各单元用于执行图2所示实施例中的相关步骤,在此不再赘述。It should be noted that the foregoing units are used to perform related steps in the embodiment shown in FIG. 2, and details are not described herein again.
其中,上述各单元可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。The above units may be a processor or a controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application specific integrated circuit (Application-Specific). Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
当上述各单元为处理器时,本发明实施例所涉及的网络侧设备可以为图5所示的网络侧设备。The network side device according to the embodiment of the present invention may be the network side device shown in FIG. 5 when the foregoing units are processors.
参阅图5所示,该网络侧设备50包括:处理器511、收发器512以及天线。需要说明的是,实际应用中收发器512不限于两个,天线也不限于两个,该网络侧设备50的结构并不构成对本发明实施例的限定。Referring to FIG. 5, the
其中,处理器511主要包括四个部件:小区控制器、话音信道控制器、信令信道控制器和用于扩充的多路端接口。处理器511负责所有的移动通信接口管理,主要是无线信道的分配、释放和管理。处理器511应用于本发明实施例中,用于实现图4所示的各个单元的功能。收发器512包括接收机和发射机,对于移动终端而言,可以通过发射机进行上行数据的发射,通过接收机对下行数据进行接收。收发器512应用于本发明实施例中,用于监听、接收移动终端向视频服务器发送的数据包,以及视频服务器向移动终端反馈的下行数据包。The
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为根据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In addition, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。 The steps in the method of the embodiment of the present invention may be sequentially adjusted, merged, and deleted according to actual needs.
本发明实施例装置中的单元可以根据实际需要进行合并、划分和删减。本领域的技术人员可以将本说明书中描述的不同实施例以及不同实施例的特征进行结合或组合。The units in the apparatus of the embodiment of the present invention may be combined, divided, and deleted according to actual needs. Those skilled in the art can combine or combine the different embodiments described in the specification and the features of the different embodiments.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(Digital Subscriber Line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟(CD)、激光碟、光碟、数字通用光碟(DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented in hardware, firmware implementation, or a combination thereof. When implemented in software, the functions described above may be stored in or transmitted as one or more instructions or code on a computer readable medium. Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage medium may be any available media that can be accessed by a computer. For example, but not limited to, the computer readable medium may include a random access memory (RAM), a read-only memory (ROM), and an electrically erasable programmable read-only memory (Electrically Erasable Programmable). Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, disk storage media or other magnetic storage devices, or can be used to carry or store an instruction or data structure. The desired program code and any other medium that can be accessed by the computer. Also. Any connection may suitably be a computer readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, wireless and microwave are included in the fixing of the associated medium. As used in the present invention, a disk and a disc include a compact disc (CD), a laser disc, a compact disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, wherein the disc is usually magnetically copied, and the disc is The laser is used to optically replicate the data. Combinations of the above should also be included within the scope of the computer readable media.
总之,以上所述仅为本发明技术方案的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 In summary, the above description is only a preferred embodiment of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2016/102000 WO2018068262A1 (en) | 2016-10-13 | 2016-10-13 | Video code rate acquisition method, apparatus, and network side device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2016/102000 WO2018068262A1 (en) | 2016-10-13 | 2016-10-13 | Video code rate acquisition method, apparatus, and network side device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018068262A1 true WO2018068262A1 (en) | 2018-04-19 |
Family
ID=61905110
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/102000 Ceased WO2018068262A1 (en) | 2016-10-13 | 2016-10-13 | Video code rate acquisition method, apparatus, and network side device |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2018068262A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20010023445A1 (en) * | 2000-03-15 | 2001-09-20 | Telefonaktiebolaget Lm Ericsson (Pub1) | Method and arrangement for control of non real-time application flows in a network communications system |
| CN101651855A (en) * | 2008-08-15 | 2010-02-17 | 华为技术有限公司 | Method, device and system for receiving and issuing media service, terminal and server |
| CN102045393A (en) * | 2010-12-14 | 2011-05-04 | 华为技术有限公司 | Method, equipment and system for controlling band width |
| CN102883193A (en) * | 2012-10-09 | 2013-01-16 | 乐视网信息技术(北京)股份有限公司 | Content distribution flow control method |
| CN103747283A (en) * | 2013-12-24 | 2014-04-23 | 中国科学院声学研究所 | Video fragment download method |
-
2016
- 2016-10-13 WO PCT/CN2016/102000 patent/WO2018068262A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20010023445A1 (en) * | 2000-03-15 | 2001-09-20 | Telefonaktiebolaget Lm Ericsson (Pub1) | Method and arrangement for control of non real-time application flows in a network communications system |
| CN101651855A (en) * | 2008-08-15 | 2010-02-17 | 华为技术有限公司 | Method, device and system for receiving and issuing media service, terminal and server |
| CN102045393A (en) * | 2010-12-14 | 2011-05-04 | 华为技术有限公司 | Method, equipment and system for controlling band width |
| CN102883193A (en) * | 2012-10-09 | 2013-01-16 | 乐视网信息技术(北京)股份有限公司 | Content distribution flow control method |
| CN103747283A (en) * | 2013-12-24 | 2014-04-23 | 中国科学院声学研究所 | Video fragment download method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10827421B2 (en) | Network slice selection method, user equipment, and network device | |
| US10321199B2 (en) | Streaming with optional broadcast delivery of data segments | |
| CN102843351B (en) | A kind of processing method of streaming media service, streaming media server and system | |
| CN104025548B (en) | For the method and apparatus for the flexible caching for being delivered media | |
| KR102544991B1 (en) | User Equipment and Media Streaming Network Secondary Node | |
| US9390200B2 (en) | Local caching device, system and method for providing content caching service | |
| CN102801690B (en) | The processing method of Streaming Media, Distributor, client and system | |
| US20150200992A1 (en) | Method for downloading, at a client terminal, an upcoming sequence of segments of a multimedia content, and corresponding terminal | |
| US9525755B2 (en) | Providing content based on user bandwidth | |
| EP3138319B1 (en) | Insertion and use of application or radio information in network data packet headers | |
| US10085046B2 (en) | Video transmission method, gateway device, and video transmission system | |
| US10171532B2 (en) | Methods and systems for detection and classification of multimedia content in secured transactions | |
| CN104509060B (en) | The method and device of transmission of flow media data | |
| US11356716B2 (en) | System for inserting supplemental content within a media stream | |
| EP3235258B1 (en) | Adjusting quality level of media streaming | |
| CN111211933A (en) | Method and device for determining quality of transmission link | |
| US10701408B2 (en) | Devices and methods for transmitting/receiving data in communication system | |
| US10492112B2 (en) | Apparatus and method for providing data service using heterogeneous network | |
| CN116711370A (en) | Communication method and device | |
| WO2018068262A1 (en) | Video code rate acquisition method, apparatus, and network side device | |
| US10069948B2 (en) | Method, apparatus, and system for acquiring media service parameter indication | |
| CN107211189A (en) | A kind of method and apparatus sent for video | |
| JP7128967B2 (en) | Method, apparatus and computer program for providing multimedia streaming content | |
| CN105027530B (en) | Mobile terminal, first base station and Streaming Media are segmented acquisition methods | |
| CN104427331A (en) | Video service processing method and apparatus, and network device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16918675 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16918675 Country of ref document: EP Kind code of ref document: A1 |