Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for acquiring bandwidth information, which can quickly and accurately acquire bandwidth information of a network.
In a first aspect, an embodiment of the present invention provides a method for acquiring bandwidth information, including: the home gateway sends an IP address request message to a Broadband Remote Access Server (BRAS), wherein the IP address request message carries request information of user signed bandwidth information; the home gateway receives an IP address confirmation message sent by the BRAS, wherein the IP address confirmation message carries the user subscription bandwidth information; and the home gateway acquires the user subscription bandwidth information from the IP address confirmation message.
In a first possible embodiment, with reference to the first aspect, the request information of the subscriber subscription bandwidth information is a preset character string set in a first optional option field of the IP address request packet, where the preset character string is used to instruct the BRAS to provide the subscriber subscription bandwidth information to the home gateway.
In a second possible embodiment, with reference to the first aspect or the first possible embodiment of the first aspect, the acquiring, by the home gateway, the user subscription bandwidth information from the IP address confirmation packet includes: and the home gateway acquires the user subscription bandwidth information from a second optional option field of the IP address confirmation message.
In a third possible embodiment, with reference to the second possible embodiment of the first aspect, the user subscription bandwidth information in the IP address confirmation message is user subscription bandwidth information described in an encrypted extensible markup language XML format.
In a second aspect, an embodiment of the present invention provides a method for acquiring bandwidth information, including: a broadband remote access server BRAS receives an IP address request message sent by a home gateway, wherein the IP address request message carries request information of user signed bandwidth information; and the BRAS sends an IP address confirmation message to the home gateway, wherein the IP address confirmation message carries the user subscription bandwidth information.
In a first possible embodiment, with reference to the second aspect, before the BRAS sends an IP address acknowledgement packet to the home gateway, the method further includes: the BRAS acquires request information of the user subscription bandwidth information; the request information of the user signed bandwidth information is positioned in a first optional option field of the IP address request message; when the acquired request information of the user subscription bandwidth information is matched with a preset character string, adding the user subscription bandwidth information into a second optional option field of the IP address confirmation message; the preset character string is used for indicating the BRAS to provide the user subscription bandwidth information to the home gateway.
In a second possible embodiment, with reference to the first possible embodiment of the second aspect, when the obtained request information of the user subscription bandwidth information matches a preset character string, adding the user subscription bandwidth information to a second option field of the IP address acknowledgment packet includes:
when the acquired request information of the user subscription bandwidth information is matched with a preset character string, describing the user subscription bandwidth information in an extensible markup language (XML) format, encrypting the described user subscription bandwidth information in the XML format, and adding the encrypted user subscription bandwidth information into a second optional option field of the IP address confirmation message.
In a third aspect, an embodiment of the present invention provides an apparatus for acquiring bandwidth information, where the apparatus is applied in a home gateway, and the apparatus includes: a sending unit, configured to send an IP address request packet to a broadband remote access server BRAS, where the IP address request packet carries request information of user subscription bandwidth information; a receiving unit, configured to receive an IP address acknowledgement packet sent by the BRAS, where the IP address acknowledgement packet carries the user subscription bandwidth information; and the obtaining unit is used for obtaining the user subscription bandwidth information from the IP address confirmation message received by the receiving unit.
In a first possible embodiment, with reference to the third aspect, the request information of the subscriber subscription bandwidth information is a preset character string set in a first optional field of the IP address request packet, where the preset character string is used to instruct the BRAS to provide the subscriber subscription bandwidth information to the home gateway.
In a second possible embodiment, with reference to the third aspect or the first possible embodiment of the third aspect, the obtaining unit is further configured to obtain the user subscription bandwidth information from a second option field of the IP address acknowledgement packet.
In a third possible embodiment, with reference to the second possible embodiment of the third aspect, the user subscription bandwidth information in the IP address confirmation message is user subscription bandwidth information described in an encrypted extensible markup language XML format.
In a fourth aspect, an embodiment of the present invention provides an apparatus for acquiring bandwidth information, where the apparatus is applied in a broadband remote access server BRAS, and the apparatus includes: the receiving unit is used for receiving an IP address request message sent by a home gateway, wherein the IP address request message carries request information of user signed bandwidth information; and the sending unit is used for sending an IP address confirmation message to the home gateway, wherein the IP address confirmation message carries the user subscription bandwidth information.
In a first possible embodiment, in combination with the fourth aspect, the apparatus further includes: an acquisition unit, an addition unit; the acquiring unit is used for acquiring request information of the user signed bandwidth information; the request information of the user signed bandwidth information is positioned in a first optional option field of the IP address request message; the adding unit is used for adding the user subscription bandwidth information into a second option field of the IP address confirmation message when the acquired request information of the user subscription bandwidth information is matched with a preset character string; the preset character string is used for indicating the BRAS to provide the user subscription bandwidth information to the home gateway.
In a second possible embodiment, with reference to the first possible embodiment of the fourth aspect, the adding unit is further configured to describe the user subscription bandwidth information in an XML format of an extensible markup language (XML) format when the obtained request information of the user subscription bandwidth information matches a preset character string, encrypt the described user subscription bandwidth information in the XML format, and add the encrypted user subscription bandwidth information to the second option field of the IP address acknowledgement packet.
In a fifth aspect, an embodiment of the present invention provides an apparatus for acquiring bandwidth information, where the apparatus is applied in a home gateway, and the apparatus includes: a memory for storing information including program instructions; the system comprises a transceiver and a broadband remote access server BRAS, wherein the transceiver is used for sending an IP address request message to the broadband remote access server BRAS, and the IP address request message carries request information of user signed bandwidth information; receiving an IP address confirmation message sent by the BRAS, wherein the IP address confirmation message carries the user subscription bandwidth information; and a processor, coupled to the memory and the receiver, configured to control execution of the program instruction, and specifically configured to obtain the user subscription bandwidth information from the IP address acknowledgement packet.
In a first possible embodiment, with reference to the fifth aspect, the request information of the subscriber subscription bandwidth information is a preset character string set in a first optional field of the IP address request packet, where the preset character string is used to instruct the BRAS to provide the subscriber subscription bandwidth information to the home gateway.
In a second possible embodiment, in combination with the fifth aspect or the first possible embodiment of the fifth aspect,
the processor is further configured to obtain the user subscription bandwidth information from a second optional field of the IP address acknowledgement packet.
In a third possible embodiment, with reference to the second possible embodiment of the fifth aspect, the user subscription bandwidth information in the IP address confirmation message is user subscription bandwidth information described in an encrypted extensible markup language XML format.
In a sixth aspect, an embodiment of the present invention provides an apparatus for acquiring bandwidth information, where the apparatus is applied in a broadband remote access server BRAS, and the apparatus includes: a memory for storing information including program instructions; the system comprises a transceiver and a controller, wherein the transceiver is used for receiving an IP address request message sent by a home gateway, and the IP address request message carries request information of user signed bandwidth information; and sending an IP address confirmation message to the home gateway, wherein the IP address confirmation message carries the user subscription bandwidth information.
In a first possible embodiment, with reference to the sixth aspect, the apparatus further includes: a processor; the processor, coupled to the memory and the receiver, is configured to control execution of the program instructions, and in particular, is configured to obtain request information of the user subscription bandwidth information; the request information of the user signed bandwidth information is positioned in a first optional option field of the IP address request message; when the acquired request information of the user subscription bandwidth information is matched with a preset character string, adding the user subscription bandwidth information into a second optional option field of the IP address confirmation message; the preset character string is used for indicating the BRAS to provide the user subscription bandwidth information to the home gateway.
In a second possible embodiment, with reference to the first possible embodiment of the sixth aspect, the processor is further configured to describe the user subscription bandwidth information in an extensible markup language XML format when the obtained request information of the user subscription bandwidth information matches a preset character string, encrypt the described user subscription bandwidth information in the XML format, and add the encrypted user subscription bandwidth information to the second option field of the IP address acknowledgement packet.
The method and the device for acquiring the bandwidth information provided by the embodiment of the invention send an IP address request message to a Broadband Remote Access Server (BRAS) through a home gateway, wherein the IP address request message carries request information of user subscription bandwidth information; and then receiving an IP address confirmation message sent by the BRAS, and acquiring the user subscription bandwidth information from the IP address confirmation message. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the uploading byte number of the uploading file in unit time and the downloading byte number of the downloading file in unit time, the invention can request the user signing bandwidth information from the BRAS through the home gateway, further directly receives the user contract bandwidth information provided by the BRAS without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a method for acquiring bandwidth information, as shown in fig. 1, the method includes:
101. the home gateway sends an IP address request message to a BRAS (Broadband Remote Access Server), wherein the IP address request message carries request information of user signed bandwidth information.
The user subscription bandwidth information comprises an uplink available bandwidth and a downlink available bandwidth of the home gateway.
It should be noted that the home gateway in the embodiment of the present invention is the subscriber subscription bandwidth information obtained in the process of requesting the IP address from the BRAS. The home gateway may use DHCP (Dynamic host configuration Protocol) or PPP (Point to Point Protocol) when requesting an IP address from the BRAS. The basic flow of requesting an IP address using these two protocols is similar, and the following description will use DHCP as an example.
Firstly, the home gateway sends a DHCP discover message in a broadcast mode, all the BRAS receiving the DHCP discover message can receive the DHCP discover message, all the BRAS receiving the DHCP discover message send a DHCPoffer message to the home gateway, the DHCP offer message carries an IP address which can be allocated to the home gateway, the home gateway generally only processes the received first DHCP offer message, and sends a DHCP request message to the BRAS sending the first DHCP offer message, wherein the DHCP request message carries the IP address required by the home gateway.
The IP address request message of the step is a DHCP request message sent to the BRAS by the home gateway, and the step adds request information of the user signed bandwidth information in the DHCP request message.
102. And the home gateway receives an IP address confirmation message sent by the BRAS, wherein the IP address confirmation message carries the user subscription bandwidth information.
It should be noted that, after the home gateway sends the DHCP request to the BRAS, the home gateway receives the DHCP ack packet sent by the BRAS, and carries the use lease information of the IP address required by the home gateway.
The IP address confirmation message in the step is a DHCP ack message sent to the BRAS by the home gateway, and the user subscription bandwidth information is added into the DHCP ack message in the step.
103. And the home gateway acquires the user subscription bandwidth information from the IP address confirmation message.
After receiving the DHCP ack message, the home gateway can obtain the use lease information of the IP address from the DHCP ack message, and can obtain the user subscription bandwidth information from the DHCP ack message. The home gateway requests the IP address and acquires the user signed bandwidth information, and then the home gateway uses the requested IP address to connect the network, so that the process of acquiring the user signed bandwidth information does not influence the normal internet access of the user.
The method for acquiring the bandwidth information provided by the embodiment of the invention sends an IP address request message to a Broadband Remote Access Server (BRAS) through a home gateway, wherein the IP address request message carries request information of user signed bandwidth information; and then receiving an IP address confirmation message sent by the BRAS, and acquiring the user subscription bandwidth information from the IP address confirmation message. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the uploading byte number of the uploading file in unit time and the downloading byte number of the downloading file in unit time, the invention can request the user signing bandwidth information from the BRAS through the home gateway, further directly receives the user contract bandwidth information provided by the BRAS without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
It should be noted that the request information of the user subscription bandwidth information carried in the IP address request packet sent by the home gateway to the BRAS is a preset character string set in a first option (optional) field of the IP address request packet, and the preset character string is used to indicate the BRAS to provide the user subscription bandwidth information to the home gateway.
For example, option225 of the IP address request message carries a preset string, where the preset string is "HW _00E0FC _ BANDWIDTH"
In addition, the home gateway is the user subscription bandwidth information obtained from the second optional field of the IP address confirmation message.
For example, the user subscription bandwidth information is obtained from the option 226 of the IP address confirmation message.
It should be noted that the user subscription bandwidth information in the IP address confirmation message is encrypted user subscription bandwidth information in XML (Extensible Markup Language) format.
When the uplink available bandwidth is 750 and the downlink available bandwidth is 10000, the user subscription bandwidth information in the XML format specifically includes:
< BANDWIDTH > (Start tag: Bandwidth)
< NAME > bandwidth </NAME > (NAME is bandwidth)
< LINK >0</LINK > (0 is used to indicate the upstream available bandwidth)
< VALUE >750</VALUE > (upstream available bandwidth 750Kbps)
< LINK >1</LINK > (1 for indicating upstream available bandwidth)
< VALUE >10000</VALUE > (the downstream available bandwidth is 10000Kbps)
</BANDWIDTH > (end tag: BANDWIDTH)
It should be noted that, after acquiring the user subscription bandwidth information, the home gateway may configure QoS (Quality of Service) through the user subscription bandwidth information, and may display the uplink available bandwidth of the home gateway and the downlink available bandwidth of the home gateway, which are included in the user subscription bandwidth information, to the user, so that the user may know the actual available bandwidth of the home network conveniently.
Optionally, an extension field may be inserted into the IP address acknowledgement packet, and the user subscription bandwidth information is added to the extension field.
It can be understood that, if the user subscription bandwidth information is located in the extension field, the user subscription bandwidth information is extracted from the extension field of the IP address confirmation message.
With reference to fig. 1, an embodiment of the present invention further provides a method for acquiring bandwidth information, as shown in fig. 2, where the method includes:
201. and the BRAS receives an IP address request message sent by the home gateway, wherein the IP address request message carries the request information of the user signed bandwidth information.
The user subscription bandwidth information comprises an uplink available bandwidth and a downlink available bandwidth of the home gateway.
202. And the BRAS sends an IP address confirmation message to the home gateway, wherein the IP address confirmation message carries the user subscription bandwidth information.
The method for acquiring bandwidth information provided by the embodiment of the invention receives an IP address request message sent by a home gateway through a BRAS, wherein the IP address request message carries request information of user signed bandwidth information, and then sends an IP address confirmation message to the home gateway, and the IP address confirmation message carries the user signed bandwidth information. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the number of uploading bytes of the uploading file in unit time and the number of downloading bytes of the downloading file in unit time, the method can receive the request information of the user subscription bandwidth information sent by the home gateway through the BRAS, further directly provides the user contract signing bandwidth information to the home gateway without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth of the home gateway in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
An embodiment of the present invention further provides a method for acquiring bandwidth information, as shown in fig. 3, before the BRAS sends an IP address acknowledgement packet to the home gateway in step 201, the method further includes:
203. the BRAS acquires request information of the user subscription bandwidth information.
The request information of the user signing bandwidth information is located in a first optional field of the IP address request message.
The request information of the user subscription bandwidth information may be specifically located in the option225 of the IP address request packet.
204. And when the acquired request information of the user subscription bandwidth information is matched with the preset character string, adding the user subscription bandwidth information into a second optional option field of the IP address confirmation message.
The preset character string is used for instructing the BRAS to provide the user subscription BANDWIDTH information to the home gateway, for example, the preset character string is "HW _00E0FC _ BANDWIDTH".
When the acquired request information of the user subscription bandwidth information is matched with the preset character string, describing the user subscription bandwidth information in an extensible markup language (XML) format, encrypting the described user subscription bandwidth information in the XML format, and adding the encrypted user subscription bandwidth information into a second option field of the IP address confirmation message.
When the uplink available bandwidth is 750 and the downlink available bandwidth is 10000, the user subscription bandwidth information in the XML format specifically includes:
< BANDWIDTH > (Start tag: Bandwidth)
< NAME > bandwidth </NAME > (NAME is bandwidth)
< LINK >0</LINK > (0 is used to indicate the upstream available bandwidth)
< VALUE >750</VALUE > (upstream available bandwidth 750Kbps)
< LINK >1</LINK > (1 for indicating upstream available bandwidth)
< VALUE >10000</VALUE > (the downstream available bandwidth is 10000Kbps)
</BANDWIDTH > (end tag: BANDWIDTH)
In the method for acquiring bandwidth information provided by the embodiment of the invention, the BRAS acquires the request information of the user signed bandwidth information, when the acquired request information of the user signed bandwidth information is matched with the preset character string, the user signed bandwidth information is added into the second optional option field of the IP address confirmation message, wherein the user signed bandwidth information is described in an XML format, in order to protect the user privacy, the user signed bandwidth information in the XML format is encrypted and then added into the second optional option field, and then the BRAS sends the IP address confirmation message carrying the user signed bandwidth information to the home gateway. According to the invention, the BRAS can send the user subscription bandwidth information to the home gateway according to the request information of the user subscription information without uploading and downloading files, and the byte number of the transmission IP address request message and the byte number of the transmission IP address confirmation message are far smaller than the byte number of the uploaded files and the byte number of the downloaded files, so that the time for acquiring the user subscription bandwidth information is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth of the home gateway in the user subscription bandwidth information acquired in the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network. In addition, the prior art occupies the whole bandwidth of the home gateway during speed measurement, so that a user cannot surf the internet during the speed measurement.
An embodiment of the present invention further provides a method for acquiring bandwidth information, as shown in fig. 4, the method includes:
401. the home gateway sends an IP address request message to the BRAS, and a first optional option field in the IP address request message carries request information of user subscription bandwidth information.
The request information of the user subscription bandwidth information is a preset character string arranged in a first optional field of the IP address request message, and the preset character string is used for indicating the BRAS to provide the user subscription bandwidth information for the home gateway.
402. The BRAS acquires the request information of the user subscription bandwidth information from the first optional field of the IP address request message.
403. And when the request information of the user subscription bandwidth information acquired by the BRAS is matched with the preset character string, adding the user subscription bandwidth information into a second optional field of the IP address confirmation message.
404. And the BRAS sends an IP address confirmation message to the home gateway, wherein the second optional field of the IP address confirmation message carries the user subscription bandwidth information.
405. And the home gateway acquires the user subscription bandwidth information from the second optional option field of the IP address confirmation message.
The method for acquiring the bandwidth information provided by the embodiment of the invention sends an IP address request message to a Broadband Remote Access Server (BRAS) through a home gateway, wherein the IP address request message carries request information of user signed bandwidth information; and then receiving an IP address confirmation message sent by the BRAS, and acquiring the user subscription bandwidth information from the IP address confirmation message. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the uploading byte number of the uploading file in unit time and the downloading byte number of the downloading file in unit time, the invention can request the user signing bandwidth information from the BRAS through the home gateway, further directly receives the user contract bandwidth information provided by the BRAS without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
With reference to the method flow shown in fig. 1, the present invention provides an apparatus for acquiring bandwidth information, where the apparatus is applied in a home gateway, and as shown in fig. 5, the apparatus includes: a transmitting unit 51, a receiving unit 52, and an acquiring unit 53.
The sending unit 51 is configured to send an IP address request packet to a broadband remote access server BRAS, where the IP address request packet carries request information of user subscription bandwidth information.
And the receiving unit 52 is configured to receive an IP address acknowledgement message sent by the BRAS, where the IP address acknowledgement message carries user subscription bandwidth information.
The obtaining unit 53 is configured to obtain the user subscription bandwidth information from the IP address confirmation message received by the receiving unit 52.
It should be noted that the request information of the subscriber subscription bandwidth information is a preset character string set in the first option field of the IP address request packet, and the preset character string is used to instruct the BRAS to provide the subscriber subscription bandwidth information to the home gateway.
Further, the obtaining unit 53 is further configured to obtain the user subscription bandwidth information from the second option field of the IP address acknowledgement packet.
And the user subscription bandwidth information in the IP address confirmation message is encrypted user subscription bandwidth information in an XML format.
The device for acquiring the bandwidth information provided by the embodiment of the invention sends an IP address request message to a Broadband Remote Access Server (BRAS) through a sending unit, wherein the IP address request message carries request information of user signed bandwidth information; then the receiving unit receives the IP address confirmation message sent by the BRAS, and the obtaining unit obtains the user subscription bandwidth information from the IP address confirmation message. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the uploading byte number of the uploading file in unit time and the downloading byte number of the downloading file in unit time, the invention can request the user signing bandwidth information from the BRAS through the sending unit, the acquisition unit further acquires the user subscription bandwidth information provided by the BRAS without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
With reference to the method flows shown in fig. 2 and fig. 3, the present invention further provides a device for acquiring bandwidth information, where the device is applied to a BRAS, as shown in fig. 6, the device includes: a receiving unit 61 and a transmitting unit 62.
A receiving unit 61, configured to receive an IP address request packet sent by a home gateway, where the IP address request packet carries request information of user subscription bandwidth information;
and a sending unit 62, configured to send an IP address confirmation message to the home gateway, where the IP address confirmation message carries the user subscription bandwidth information.
Further, in another embodiment of the present invention, as shown in fig. 7, the apparatus further includes: an acquisition unit 63 and an adding unit 64.
An obtaining unit 63, configured to obtain request information of user subscription bandwidth information; the request information of the user signing bandwidth information is positioned in a first optional field of the IP address request message.
The adding unit 64 is configured to add the user subscription bandwidth information to the second option field of the IP address acknowledgment packet when the acquired request information of the user subscription bandwidth information matches the preset character string; the preset character string is used for indicating the BRAS to provide the user subscription bandwidth information for the home gateway.
The adding unit 64 is further configured to, when the obtained request information of the user subscription bandwidth information matches a preset character string, describe the user subscription bandwidth information in an extensible markup language XML format, encrypt the described user subscription bandwidth information in the XML format, and add the encrypted user subscription bandwidth information to the second option field of the IP address acknowledgement packet.
The device for acquiring bandwidth information provided by the embodiment of the invention receives an IP address request message sent by a home gateway through a receiving unit, wherein the IP address request message carries request information of user signed bandwidth information, and then the sending unit sends an IP address confirmation message to the home gateway, wherein the IP address confirmation message carries the user signed bandwidth information. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the number of bytes of uploaded files in unit time and the number of bytes of downloaded files in unit time, the method can receive the request information of the user signed bandwidth information sent by the home gateway through the receiving unit, further the sending unit directly provides the user signed bandwidth information to the home gateway without uploading and downloading the files, and the time for obtaining the uplink and downlink available bandwidth of the home gateway is reduced because the number of bytes for transmitting the IP address request message and the IP address confirmation message is far less than the number of bytes of the uploaded files and the downloaded files, and the uplink and downlink available bandwidth of the home gateway in the user signed bandwidth information obtained by the method is more accurate compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, therefore, the home gateway can rapidly and accurately acquire the bandwidth information of the network.
As shown in fig. 8, fig. 8 is a schematic diagram of a hardware structure of the home gateway depicted in fig. 5. The home gateway may include a memory 81, a transceiver 82, a processor 83 and a bus 84, wherein the memory 81, the transceiver 82 and the processor 83 are communicatively connected through the bus 84.
The Memory 81 may be a Read Only Memory (ROM), a static Memory device, a dynamic Memory device, or a Random Access Memory (RAM). The memory 81 may store an operating system and other application programs. When the technical solution provided by the embodiment of the present invention is implemented by software or firmware, a program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 81 and executed by the processor 83.
The transceiver 82 is used for communication between the apparatus and other devices or communication networks (such as, but not limited to, ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.).
The processor 83 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present invention.
Bus 84 may include a path that conveys information between various components of the device, such as memory 81, transceiver 82, and processor 83.
It should be noted that although the hardware shown in fig. 8 only shows the memory 81, the transceiver 82 and the processor 83, as well as the bus 84, in a specific implementation, a person skilled in the art will understand that the terminal also contains other components necessary for achieving a proper functioning. Also, hardware components for performing other functions may be included, as would be apparent to one skilled in the art, according to particular needs.
Specifically, when the home gateway shown in fig. 8 is used to implement the device shown in the embodiment of fig. 5, the transceiver 82 in the device is used to send an IP address request packet to the broadband remote access server BRAS, where the IP address request packet carries request information of user subscription bandwidth information; receiving an IP address confirmation message sent by a BRAS, wherein the IP address confirmation message carries user subscription bandwidth information;
and a processor 83, coupled to the memory 81 and the transceiver 82, for controlling execution of the program instructions, and specifically for obtaining the user subscription bandwidth information from the IP address acknowledgement message.
It should be noted that the request information of the subscriber subscription bandwidth information is a preset character string set in the first option field of the IP address request packet, and the preset character string is used to instruct the BRAS to provide the subscriber subscription bandwidth information to the home gateway.
The processor 83 is further configured to obtain the user subscription bandwidth information from the second option field of the IP address acknowledgement packet.
And the user subscription bandwidth information in the IP address confirmation message is encrypted user subscription bandwidth information in an XML format.
The device for acquiring the bandwidth information provided by the embodiment of the invention sends an IP address request message to a Broadband Remote Access Server (BRAS) through a transceiver, wherein the IP address request message carries request information of user signed bandwidth information; and then receiving an IP address confirmation message sent by the BRAS, and acquiring the user signed bandwidth information from the IP address confirmation message by the processor. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the uploading byte number of the uploading file in unit time and the downloading byte number of the downloading file in unit time, the invention can request the user signing bandwidth information from the BRAS through the home gateway, further directly receives the user contract bandwidth information provided by the BRAS without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
As shown in fig. 9, fig. 9 is a schematic diagram of the hardware structure of the BRAS depicted in fig. 6. The BRAS may include a memory 91, a transceiver 92, a processor 93, and a bus 94, wherein the memory 91, the transceiver 92, and the processor 93 are communicatively coupled via the bus 94.
The Memory 91 may be a Read Only Memory (ROM), a static Memory device, a dynamic Memory device, or a Random Access Memory (RAM). The memory 91 may store an operating system and other application programs. When the technical solution provided by the embodiment of the present invention is implemented by software or firmware, a program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 91 and executed by the processor 93.
The transceiver 92 is used for communication between the apparatus and other devices or communication networks (such as, but not limited to, ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.).
The processor 93 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present invention.
Bus 94 may include a path that transfers information between the various components of the device, such as memory 91, transceiver 92, and processor 93.
It should be noted that although the hardware shown in fig. 9 only shows the memory 91, the transceiver 92 and the processor 93, as well as the bus 94, in a specific implementation, a person skilled in the art will understand that the terminal also contains other components necessary for achieving a proper functioning. Also, hardware components for performing other functions may be included, as would be apparent to one skilled in the art, according to particular needs.
Specifically, when the BRAS shown in fig. 9 is used to implement the device shown in the embodiment of fig. 6, the transceiver 92 in the device is configured to receive an IP address request message sent by a home gateway, where the IP address request message carries request information of user subscription bandwidth information; and sending an IP address confirmation message to the home gateway, wherein the IP address confirmation message carries the user signed bandwidth information.
A processor 93, coupled to the memory 91 and the transceiver 92, for controlling execution of program instructions, specifically for obtaining request information of the user contract bandwidth information; the request information of the user signing bandwidth information is positioned in a first optional option field of the IP address request message; when the acquired request information of the user subscription bandwidth information is matched with a preset character string, adding the user subscription bandwidth information into a second optional option field of the IP address confirmation message; the preset character string is used for indicating the BRAS to provide the user subscription bandwidth information for the home gateway.
The processor 93 is further configured to, when the obtained request information of the user subscription bandwidth information matches a preset character string, describe the user subscription bandwidth information in an extensible markup language XML format, encrypt the described user subscription bandwidth information in the XML format, and add the encrypted user subscription bandwidth information to the second option field of the IP address acknowledgement packet.
The device for acquiring bandwidth information provided by the embodiment of the invention receives an IP address request message sent by a home gateway through a transceiver, wherein the IP address request message carries request information of user signed bandwidth information, and then sends an IP address confirmation message to the home gateway, and the IP address confirmation message carries the user signed bandwidth information. Compared with the prior art that the uplink available bandwidth and the downlink available bandwidth of the home gateway can be respectively obtained only by calculating the number of uploading bytes of the uploading file in unit time and the number of downloading bytes of the downloading file in unit time, the method can receive the request information of the user subscription bandwidth information sent by the home gateway through the BRAS, further directly provides the user contract signing bandwidth information to the home gateway without uploading and downloading files, because the byte number of the transmission IP address request message and the IP address confirmation message is far less than the byte number of the uploading file and the downloading file, therefore, the time for acquiring the uplink and downlink available bandwidth of the home gateway is reduced, and compared with the uplink and downlink available bandwidth of the home gateway measured in the prior art, the uplink and downlink available bandwidth of the home gateway in the user signed bandwidth information acquired by the invention is more accurate, so that the home gateway can quickly and accurately acquire the bandwidth information of the network.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.