CN107547323B - Message transmission method and device, related electronic equipment and readable storage medium - Google Patents

Message transmission method and device, related electronic equipment and readable storage medium Download PDF

Info

Publication number
CN107547323B
CN107547323B CN201710538440.6A CN201710538440A CN107547323B CN 107547323 B CN107547323 B CN 107547323B CN 201710538440 A CN201710538440 A CN 201710538440A CN 107547323 B CN107547323 B CN 107547323B
Authority
CN
China
Prior art keywords
user
message
time
time index
online
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.)
Active
Application number
CN201710538440.6A
Other languages
Chinese (zh)
Other versions
CN107547323A (en
Inventor
廖以顺
章靠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710538440.6A priority Critical patent/CN107547323B/en
Publication of CN107547323A publication Critical patent/CN107547323A/en
Application granted granted Critical
Publication of CN107547323B publication Critical patent/CN107547323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application provides a message transmission method, a message transmission device, related electronic equipment and a readable storage medium, which are applied to the technical field of computer communication, wherein the method comprises the following steps: after receiving an online message of a new online user, recording the online time of the new online user; when other users who have been on-line currently have corresponding time indexes, determining the time index of the new on-line user based on the time difference value of the on-line time of the new on-line user and the on-line time corresponding to the currently existing time index; after the charging period corresponding to the target time index expires, packaging information for charging a target user corresponding to the target time index to obtain a packaged message; and sending the encapsulated message to an AAA server. The method and the device have the advantages that the information for charging the users with the same time index is packaged and then sent to the AAA server, and the processing pressure of the messages between the BRAS equipment and the AAA server is effectively reduced.

Description

Message transmission method and device, related electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer communications technologies, and in particular, to a method and an apparatus for message transmission, a related electronic device, and a readable storage medium.
Background
With the development of services such as internet, multimedia and the like, people have increasingly growing demand for broadband networks. The BRAS (Broadband Remote Access Server) is an Access gateway facing Broadband network application, is a bridge between a Broadband Access network and a backbone network, and can provide a basic Access means and a management function of the Broadband Access network. Specifically, the access, Authentication, Authorization, and Accounting operations of the broadband network user are implemented by connecting an AAA (Authentication Authorization Accounting) server. Referring to fig. 1, fig. 1 is a schematic diagram of a connection relationship between a BRAS device and a user device, an AAA server, and the internet, where the user device is connected to the internet through the BRAS device, the BRAS device is connected to the AAA server, and the BRAS device interacts information sent by a user with the AAA server to complete authentication, authorization, and accounting for the user. When the user equipment passes the authentication, the internet can be accessed through the BRAS equipment. Wherein, the user equipment includes: and all terminals such as a computer, a mobile phone or a set-top box and the like which can be accessed to the network. In addition, the user equipment can be accessed to the BRAS equipment through a switch instead of being directly connected with the BRAS equipment.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for transmitting a message, a related electronic device, and a readable storage medium, so as to reduce message interaction between a BRAS device and an AAA server and improve stability of the BRAS device and the AAA server. The specific technical scheme is as follows:
the embodiment of the application provides a message transmission method, which is applied to BRAS equipment and comprises the following steps:
after receiving an online message of a new online user, recording the online time of the new online user;
when other users who have been online currently have corresponding time indexes, determining the time index of the new online user based on the time difference value of the online time of the new online user and the online time corresponding to the current existing time index;
after the charging period corresponding to the target time index expires, packaging information for charging a target user corresponding to the target time index to obtain a packaged message;
and sending the packaged message to an authentication, authorization and accounting AAA server.
The embodiment of the application provides a message transmission method, which is applied to an AAA server and comprises the following steps:
receiving a transmission message sent by BRAS equipment, wherein the transmission message is obtained by encapsulating information for charging target users with the same time index;
decapsulating the transmission message to obtain charging update request information of each user in the target users;
and processing the charging updating request information of each user to obtain a response message of the target user.
The embodiment of the application provides a message transmission device, which is applied to BRAS equipment, and the device comprises:
the online time recording module is used for recording the online time of a new online user after receiving the online message of the new online user;
the time index determining module is used for determining the time index of the new online user based on the time difference value of the online time of the new online user and the online time corresponding to the currently existing time index when the corresponding time index exists in other currently online users;
the message encapsulation module is used for encapsulating the information for charging the target user corresponding to the target time index after the charging period corresponding to the target time index expires, so as to obtain an encapsulated message;
and the message sending module is used for sending the packaged message to an authentication, authorization and accounting AAA server.
The embodiment of the application provides a message transmission device, which is applied to an AAA server, and the device comprises:
the system comprises a message receiving module, a service module and a service module, wherein the message receiving module is used for receiving a transmission message sent by BRAS equipment, and the transmission message is obtained by packaging information used for charging target users with the same time index;
a decapsulation module, configured to decapsulate the transmission packet to obtain charging update request information of each user in the target users;
and the message processing module is used for processing the charging updating request information of each user to obtain a response message of the target user.
An embodiment of the present application provides a BRAS device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the described method steps for application to a BRAS device.
An embodiment of the present application provides an AAA server, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the described method steps as applied to an AAA server.
Embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing any of the method steps described above.
According to the message transmission method, the message transmission device, the related electronic equipment and the readable storage medium, when the corresponding time indexes exist in other users who are currently online, the time index of the new online user is determined based on the time difference value between the online time of the new online user and the online time corresponding to the currently existing time index; after the charging period corresponding to the target time index expires, packaging information for charging a target user corresponding to the target time index to obtain a packaged message; and sending the encapsulated message to an AAA server. According to the embodiment of the application, the time index is established, the information of the user with the same time index is encapsulated and then sent to the AAA server, so that the message interaction between the BRAS equipment and the AAA server is effectively reduced, the processing pressure of the BRAS equipment and the CPU of the AAA server is reduced, and the stability of the BRAS equipment and the AAA server is improved. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a connection relationship between a BRAS device and a user device, an AAA server, and the internet;
fig. 2 is a flowchart of a message transmission method according to an embodiment of the present application;
fig. 3 is another flowchart of a message transmission method according to an embodiment of the present application;
fig. 4 is another flowchart of a message transmission method according to an embodiment of the present application;
fig. 5 is a structural diagram of a message transmission apparatus according to an embodiment of the present application;
fig. 6 is another structural diagram of a message transmission apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
Since BRAS equipment carries a large number of users, and a large number of users are simultaneously brought on line at some time. Supposing that the BRAS equipment charging period is T, at the time T1, N users are successfully on-line at the same time, at the time T2 of T1+ T, the BRAS equipment concurrently sends the charging update request messages of the N users to the AAA server, and the AAA server receives the N charging update request messages, responds to the N charging update request messages, and sends the obtained N response messages to the BRAS equipment. Then, when a large number of users are concurrently online, a larger number of charging update request messages or response messages of the charging update request messages are sent and processed between the BRAS device and the AAA server at a certain time or within a certain period, which is a great impact on the Processing performance of the uploading queues of the BRAS device and the AAA server and a CPU (Central Processing Unit), and even causes the loss of the messages between the BRAS device and the AAA server, thereby affecting the user experience.
In order to solve the problem that when a large number of users are on-line concurrently, the CPU processing pressure of the BRAS device and the AAA server is too high due to more message interactions between the BRAS device and the AAA server, embodiments of the present application provide a message transmission method, apparatus, related electronic device, and readable storage medium, so as to reduce the message interactions between the BRAS device and the AAA server and maintain the stability of the BRAS device and the AAA server. First, a message transmission method provided in the embodiment of the present application is described below.
Referring to fig. 2, fig. 2 is a flowchart of a message transmission method according to an embodiment of the present application, where an execution subject of each step in the embodiment of fig. 2 is a BRAS device, and the method includes the following steps:
s201, after receiving the online message of the new online user, recording the online time of the new online user.
In the embodiment of the application, the user equipment is connected with the BRAS equipment, the BRAS equipment sends the request information of the user to the AAA server, and after the AAA server finishes the authentication and authorization of the user, the user starts to get on line and enjoys network service. Generally, the online time of different users is different, and the BRAS device records the online time of a new online user after receiving an online message of the new online user.
S202, when the corresponding time indexes exist in other users who are on-line currently, the time index of the new on-line user is determined based on the time difference value between the on-line time of the new on-line user and the on-line time corresponding to the currently existing time index.
After receiving an online message of a new online user, the BRAS device records an online time of the new online user, where the online time of the user may be recorded in a user table entry. Besides recording the online time of the user, the user table entry further includes: user name, user ID, and IP (Internet Protocol) address. Referring to table one, table one is a user table entry according to the embodiment of the present application.
Watch 1
Figure BDA0001341243020000051
Figure BDA0001341243020000061
In the embodiment of the application, each user corresponds to one charging period, and the BRAS equipment can enable the AAA server to charge and deduct the fee for the user according to the charging period. In one embodiment, the billing period for each user is the same. After the accounting period of each user expires, the BRAS device sends an accounting update request message for accounting the user to the AAA server, so that when the online time of the user is the same or differs by an integral multiple of the accounting period, the time for the BRAS device to send the accounting update request message to the AAA server will be the same. Therefore, in order to obtain users with the same time when the BRAS device sends the accounting update request message to the AAA server, in the embodiment of the present application, a time index is established for each user, and the time index of the new online user is set to be a time index in which, in the currently existing time index, the time difference between the corresponding online time and the online time of the new online user is an integral multiple of the accounting period, so that the sending times of the accounting update request messages of the users corresponding to the same time index are the same.
For example, by taking the user in table one as an example, assuming that the charging period is T, according to the online time of the user in table one, the BRAS device may send a charging update request message for charging user a and user B to the AAA server at time 8:10:3+ T, send a charging update request message for charging user C, user E, and user F to the AAA server at time 8:10:4+ T, and send a charging update request message for charging user D to the AAA server at time 8:10:5+ T, that is, a total of 6 charging update request messages are sent to the AAA server between time 8:10:3+ T and time 8:10:5+ T.
In the embodiment of the present application, since the sending time of the charging update request packet for charging the user a and the user B is the same, and the sending time of the charging update request packet for charging the user C, the user E, and the user F is also the same, the time index of the user can be recorded by establishing the associated user table. If the time indexes of the users are the same, the sending time of the charging updating request message for charging the users is the same. Table two is a related user table in the embodiment of the present application.
Watch two
Figure BDA0001341243020000071
Since the users are on-line, the associated user table is also updated continuously, and the second table is the associated user table obtained at the time of 8:10: 5. The determination process of the time index of the user specifically comprises the following steps: in the user table entry, for the user who has been online, the time indexes of the users with the same online time or the difference of the time indexes by integral multiple of the charging period are determined as the same time index. For example, the time index for user A and user B is T1, the time index for user C, user E, and user F is T2, and the time index for user D is T3.
And for the new online user, calculating the time difference between the online time of the new online user and the online time corresponding to the existing time index, and determining the time difference of the corresponding online time in the existing time index as the time index of integral multiple of the charging period as the time index of the new online user. For example, when the time point 8:10:4+ T is reached, the time difference between the online time point of the user G and the online time point of the user C (or the user E, or the user F) is T, and the time difference T is equal to an integral multiple of the charging period T, so as to obtain an associated user table after updating the table two, that is, the table three.
Watch III
Figure BDA0001341243020000072
In addition, the online time of the user can be recorded by a timer, and for the users with different online times, the online time of the user can be recorded by different timers. In the embodiment of the application, for the users with different online moments but different online moments by integral multiples of the charging period, because the arrival moments of the next charging period are the same, the online moments of the users can be recorded by the same timer, so that compared with the situation that one timer records the online moments of one user, the embodiment of the application can reduce the using number of the timers.
And S203, after the charging period corresponding to the target time index is expired, packaging information for charging the target user corresponding to the target time index to obtain a packaged message.
For each user, after the accounting period is expired, the BRAS equipment sends an accounting update request message for accounting the user to the AAA server. Then, for the users with the same time index, the same time when the BRAS device sends the accounting update request message for accounting the users to the AAA server. In the embodiment of the application, the target time index refers to the time index of the user with the same time index, and the user corresponding to the target time index is the target user. Therefore, after the charging period corresponding to the target time index expires, the information for charging the target user may be encapsulated to obtain an encapsulated packet.
In an implementation manner of the present application, encapsulating information for charging a target user corresponding to a target time index to obtain an encapsulated packet includes the following steps:
the first step is to obtain the user identification of each user in the target users to obtain the target user identification.
And secondly, packaging the target user identification to obtain the packaged user identification and a charging updating request message corresponding to the packaged user identification.
In the embodiment of the application, in order to enable the AAA server to conveniently obtain the request messages of which users are included in the encapsulated message, the user identifier of each user in the target users is obtained according to the associated user table, so as to obtain the target user identifier. Wherein, the user identification is: user name, user ID, etc. And packaging the target user identification, namely packaging a plurality of user identifications into one target user identification to obtain a charging updating request message corresponding to the packaged user identification.
Taking table two as an example for explanation, T2 is the target time index, and the target time index T2 corresponds to user C, user E, and user F, so that user C, user E, and user F are target users. If the user identifier is a user name, the user identifiers of the target users are C, E and F, that is, the target user identifier is encapsulated, the encapsulated user identifier may be denoted as C | E | F, and the charging update request message corresponding to the encapsulated user identifier may be table four.
Watch four
C|E|F tx_account_update_info
In another implementation manner of the present application, encapsulating information for charging a target user corresponding to a target time index to obtain an encapsulated packet includes the following steps:
the first step is to obtain a charging updating request message of each user in the target users to obtain the target charging updating request message.
And step two, packaging the target charging updating request message to obtain a packaged message.
In the embodiment of the application, besides the target user identifier is packaged, the charging update request message of each user in the target users can be obtained to obtain the target charging update request message, and the target charging update request message is packaged to obtain the packaged message.
Taking table two as an example for explanation, T2 is the target time index, and the target time index T2 corresponds to user C, user E, and user F, so that user C, user E, and user F are target users. The charging update request messages of the user C, the user E and the user F, that is, the target charging update request message, can be referred to as table five.
Watch five
tx_account_update_info
tx_account_update_info
tx_account_update_info
And the BRAS equipment encapsulates the target charging updating request message to obtain encapsulated messages about the user C, the user E and the user F, wherein the encapsulated messages can be referred to as table six.
Watch six
C|E|F
tx_account_update_info
tx_account_update_info
tx_account_update_info
As can be seen from table five, the number of the non-encapsulated accounting update request messages is 3, and the number of the encapsulated messages in table four and table six is 1, and compared with table five, the encapsulated messages in table four and table six are sent to the AAA server, so that obviously, the number of message transmissions between the BRAS device and the AAA server is reduced. In addition, when the charging update request message is encapsulated, a Maximum Transmission Unit (MTU) of a BRAS device interface can be used as the Maximum value of the encapsulated message, so that fragmentation processing on the encapsulated message when the message is sent due to overlarge encapsulated message is avoided, and the message transmission efficiency is reduced.
The time index T3 in table two corresponds to the user D, and since there is only one user, the BRAS device may encapsulate the charging update request packet for charging the user D by the method of the embodiment of the present application, and certainly, there is only one charging update request packet for the user in the encapsulated packet. The BRAS device may also not encapsulate the charging update request message for charging the user D. S204, the packaged message is sent to an AAA server.
Specifically, after obtaining the encapsulated message, the BRAS device sends the encapsulated message to the AAA server. For example, the BRAS device sends encapsulated messages for user a and user B, encapsulated messages for user C, user E, and user F, and encapsulated messages for user D to the AAA server. Therefore, only 3 messages are sent to the AAA server by the BRAS equipment between the time of 8:10:3+ T and the time of 8:10:5+ T, and compared with the method of independently sending the accounting update request message of each user, the sending quantity of the messages is greatly reduced.
It should be noted that, a user can go online or offline according to the requirement, and for a new online user, refer to the embodiment in fig. 2. When the BRAS equipment receives the offline message of the user with the existing time index, deleting the online time of the user corresponding to the offline message; and if all the users corresponding to the time indexes are offline, deleting the time indexes of which all the users are offline. Since this step is an operation performed by the BRAS device according to the offline requirement of the user, this step may be before or after any step in the embodiment of fig. 2, and is not limited herein. The user who has the time index refers to an online user, when the online user carries out offline, an offline message is sent to the BRAS equipment, the user who sends the offline message is the offline user, then, relevant information of the offline user is deleted, and the relevant information comprises: and if the user corresponding to a certain time index is offline, the time index can be deleted.
According to the message transmission method provided by the embodiment of the application, after the online message of the new online user is received, the online time of the new online user is recorded; when other users who have been on-line currently have corresponding time indexes, determining the time index of the new on-line user based on the time difference value of the on-line time of the new on-line user and the on-line time corresponding to the currently existing time index; after the charging period corresponding to the target time index expires, packaging information for charging a target user corresponding to the target time index to obtain a packaged message; and sending the encapsulated message to an AAA server. According to the embodiment of the application, the time index is established, the information of the user with the same time index is encapsulated and then sent to the AAA server, so that the message interaction between the BRAS equipment and the AAA server is effectively reduced, the processing pressure of the BRAS equipment and the CPU of the AAA server is reduced, and the stability of the BRAS equipment and the AAA server is improved.
In the embodiment of fig. 2, S202 is a method for determining a time index of a new online user, in an implementation manner of the present application, refer to fig. 3, and fig. 3 is another flowchart of a message transmission method in the embodiment of the present application, which includes the following steps:
s301, taking the current existing time index as the current time index to be matched.
The existing time index refers to a time index of an online user, the online time of the online user is known, and the time index of the online user and the online time are in one-to-one correspondence. In order to obtain the time index of the new online user, a time difference between the online time of the new online user and the online time of the online user needs to be calculated. Because the online time of the users with the same time index differs by an integral multiple of the charging period, in the embodiment of the present application, the currently existing time index may be sequentially used as the current time index to be matched, and S302, S303, S304, and S305 may be executed. Then, one of the currently existing time indexes is first used as the current to-be-matched time index.
S302, determining the time difference value between the online time of the new online user and the online time corresponding to the current time index to be matched.
In the embodiment of the application, the online time of one of the users corresponding to the time index can be selected as the online time corresponding to the time index; and calculating the time difference between the online time of the new online user and the online time corresponding to the current time index to be matched, wherein compared with the calculation of the time difference between the online time of the new online user and the online time of each online user, the same time index can correspond to a plurality of online users, that is, the number of the online times corresponding to the time index is less than that of the online times of the online users, so that the calculation amount of the time difference can be reduced.
S303, judging whether the time difference is integral multiple of the charging period.
And S304, when the judgment result in the S303 is yes, determining the time index of the new online user as the current time index to be matched.
S305, when the judgment result of the S303 is negative, taking the unmatched time index in the currently existing time indexes as the current time index to be matched.
In this embodiment of the application, when the time difference obtained in S302 is an integer multiple of the charging period, the time index of the new online user is the current time index to be matched, and when the time difference obtained in S302 is not equal to the integer multiple of the charging period, the unmatched time index in the current existing time index is used as the current time index to be matched, and the process returns to S302 until the time index of the new online user is determined in S304, or the unmatched time index does not exist in the current existing time index.
S306, determining the time index of the new online user according to a preset strategy when the corresponding time difference value is not the time index of integral multiple of the charging period in the current existing time index.
And determining the time index of the new online user according to a preset strategy when the unmatched time index does not exist in the current existing time index, namely the time index of which the corresponding time difference is integral multiple of the charging period does not exist in the current existing time index. The preset strategy meets the following conditions: the time index of the new online user is different from the current existing time index, and the specific form of the time index in the preset strategy is not limited in the embodiment of the application.
In the embodiment of the application, the time difference between the online time of the new online user and the online time corresponding to the current time index to be matched is calculated in sequence, and when the time difference is integral multiple of the charging period, the time index of the new online user is determined to be the current time index to be matched. Otherwise, calculating the time difference between the online time of the new online user and the online time corresponding to the next time index in the existing time indexes, if the time difference between the online time corresponding to all the existing time indexes and the online time of the new online user does not meet the condition that the time difference is integral multiple of the charging period, determining the time index of the new online user according to a preset strategy, and by the method, the sending time of the charging updating request message of the user corresponding to the same time index is the same, and the BRAS equipment can package the charging updating request message according to the time index.
After the time index of the new online user is determined, the corresponding relationship between the new online user, the online time and the time index can be recorded.
Fig. 2 is an embodiment applied to a BRAS device, and an embodiment of the present application further discloses a message transmission method applied to an AAA server, referring to fig. 4, fig. 4 is another flowchart of the message transmission method according to the embodiment of the present application, and an execution subject of each step in the embodiment of fig. 4 may be the AAA server, and the method includes the following steps:
s401, receiving a transmission message sent by BRAS equipment, wherein the transmission message is obtained by encapsulating information for charging target users with the same time index.
In the embodiment of the application, in order to reduce the message interaction between the BRAS device and the AAA server, the transmission message sent by the BRAS device is obtained by encapsulating information for charging a target user with the same time index. Therefore, the number of messages sent by the BRAS equipment to the AAA server can be reduced.
S402, the transmission message is de-encapsulated to obtain the charging updating request information of each user in the target users.
Specifically, after the AAA server receives the transmission packet, the transmission packet needs to be decapsulated to obtain the charging update request information of each user in the target users. The transmission message may be a user identifier of a target user or a charging update request message of each user in the target user, and accordingly, the charging update request information obtained after decapsulating the transmission message may be a decapsulated user identifier, where the decapsulated user identifier may include a plurality of user identifiers, and the charging update request information may also be a charging update request message of each user in the target user.
S403, processing the charging updating request information of each user to obtain the response message of the target user.
In the embodiment of the application, the charging update request information of each user is processed, so that the response message of each user in the target users can be obtained. After the response message of the target user is obtained, the response message of the target user can be sent to the BRAS equipment. In an implementation manner of the present application, the response packet of each user in the target users may be sent to the BRAS device, that is, each response packet is sent to the BRAS device. In another implementation manner of the present application, the response packet of the target user may also be encapsulated to obtain an encapsulated response packet, and the encapsulated response packet is sent to the BRAS device. Therefore, after the response message is encapsulated, the number of messages sent to the BRAS equipment by the AAA server can be reduced.
In the message transmission method of the embodiment of the application, after receiving a transmission message sent by BRAS equipment, an AAA server decapsulates the transmission message to obtain charging update request information of each user in target users, and processes the charging update request information of each user to obtain a response message of the target users; and sending the response message of the target user to the BRAS equipment. The AAA server receives the message encapsulated by the BRAS equipment, thereby reducing the number of the messages sent by the BRAS equipment to the AAA server. The AAA server encapsulates the response message, so that the number of messages sent to the BRAS equipment by the AAA server is reduced, the message interaction between the BRAS equipment and the AAA server is reduced, the processing pressure of the BRAS equipment and the AAA server on the messages is relieved, and the stability of the BRAS equipment and the AAA server is improved.
Corresponding to the foregoing method embodiment, an embodiment of the present application further provides a packet transmission apparatus, referring to fig. 5, where fig. 5 is a structural diagram of the packet transmission apparatus according to the embodiment of the present application, and is applied to a BRAS device, where the structural diagram includes:
the online time recording module 501 is configured to record an online time of a new online user after receiving an online message of the new online user.
The time index determining module 502 is configured to determine, when there is a corresponding time index for another user who is currently online, a time index of the new online user based on a time difference between the online time of the new online user and the online time corresponding to the currently existing time index.
The message encapsulation module 503 is configured to encapsulate, after the charging period corresponding to the target time index expires, information for charging the target user corresponding to the target time index, so as to obtain an encapsulated message.
A message sending module 504, configured to send the encapsulated message to the AAA server.
Therefore, the message transmission device provided by the embodiment of the application records the online time of the new online user after receiving the online message of the new online user; when other users who have been on-line currently have corresponding time indexes, determining the time index of the new on-line user based on the time difference value of the on-line time of the new on-line user and the on-line time corresponding to the currently existing time index; after the charging period corresponding to the target time index expires, packaging information for charging a target user corresponding to the target time index to obtain a packaged message; and sending the encapsulated message to an AAA server. According to the embodiment of the application, the time index is established, the information of the user with the same time index is encapsulated and then sent to the AAA server, so that the message interaction between the BRAS equipment and the AAA server is effectively reduced, the processing pressure of the BRAS equipment and the CPU of the AAA server is reduced, and the stability of the BRAS equipment and the AAA server is improved.
It should be noted that, the apparatus in the embodiment of the present application is an apparatus applying the above message transmission method, and all embodiments of the above message transmission method are applicable to the apparatus and can achieve the same or similar beneficial effects.
In an implementation manner of the present application, the time index determining module 502 is configured to sequentially use a currently existing time index as a current time index to be matched, and perform the following steps a, B, and C; until the time index of a new online user is determined, or the following steps A, B and C are executed for the current existing time index:
step A, determining the time difference value of the online time of a new online user and the online time corresponding to the current time index to be matched;
step B, when the time difference is integral multiple of the charging period, determining the time index of the new online user as the current time index to be matched; when the time difference is not equal to the integral multiple of the charging period, taking the unmatched time index in the currently existing time indexes as the current time index to be matched;
and step C, when the time index exists currently and the corresponding time index with the time difference value being integral multiple of the charging period does not exist, determining the time index of the new online user according to a preset strategy.
In an implementation manner of the present application, the packet transmission apparatus further includes:
the deleting module is used for deleting the online time of the user corresponding to the offline message when the offline message of the user with the existing time index is received; and if all the users corresponding to the time indexes are offline, deleting the time indexes of which all the users are offline.
In an implementation manner of the present application, the message encapsulation module 503 is configured to obtain a user identifier of each user in the target users, so as to obtain a target user identifier; packaging the target user identification to obtain a packaged user identification and a charging updating request message corresponding to the packaged user identification; or the like, or, alternatively,
the message encapsulation module is used for acquiring a charging updating request message of each user in the target users to obtain a target charging updating request message; and packaging the target charging updating request message to obtain a packaged message.
Referring to fig. 6, fig. 6 is another structural diagram of a message transmission apparatus according to an embodiment of the present application, which is applied to an AAA server, and includes:
the message receiving module 601 is configured to receive a transmission message sent by the BRAS device, where the transmission message is obtained by encapsulating information used for charging a target user with the same time index.
A decapsulation module 602, configured to decapsulate the transmission packet to obtain charging update request information of each user in the target users.
The message processing module 603 is configured to process the charging update request information of each user to obtain a response message of the target user.
In the message transmission device of the embodiment of the application, after receiving the transmission message sent by the BRAS equipment, the AAA server decapsulates the transmission message to obtain the charging update request information of each user in the target users, and processes the charging update request information of each user to obtain the response message of the target users; and sending the response message of the target user to the BRAS equipment. The AAA server receives the message encapsulated by the BRAS equipment, thereby reducing the number of the messages sent by the BRAS equipment to the AAA server. The AAA server encapsulates the response message, so that the number of messages sent to the BRAS equipment by the AAA server is reduced, the message interaction between the BRAS equipment and the AAA server is reduced, the processing pressure of the BRAS equipment and the AAA server on the messages is relieved, and the stability of the BRAS equipment and the AAA server is improved.
In an implementation manner of the present application, the packet transmission apparatus further includes:
the first sending module is used for respectively sending the response message of each user in the target users to the BRAS equipment; or the like, or, alternatively,
and the second sending module is used for encapsulating the response message of the target user to obtain the encapsulated response message and sending the encapsulated response message to the BRAS equipment.
An embodiment of the present application further provides a BRAS device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor caused by the machine-executable instructions to: and implementing any message transmission method applied to the BRAS equipment.
An embodiment of the present application further provides an AAA server, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor caused by the machine-executable instructions to: the steps of any message transmission method applied to the AAA server are realized.
It should be noted that the machine-readable storage media mentioned in the BRAS device and the AAA server may include: a RAM (Random Access Memory), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The machine-readable storage medium may also be at least one memory device located remotely from the aforementioned processor.
The processor described above may be a general purpose processor comprising: CPU, NP (Network Processor), and the like; but also DSPs (Digital Signal Processing), ASICs (application specific Integrated circuits), FPGAs (Field Programmable Gate arrays) or other Programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
Embodiments of the present application also provide a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing any of the above message transmission methods.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the message transmission apparatus, the related electronic device and the readable storage medium, since they are substantially similar to the embodiments of the method, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (13)

1. A message transmission method is applied to a Broadband Remote Access Server (BRAS) device, and comprises the following steps:
after receiving an online message of a new online user, recording the online time of the new online user;
when other users who have been online currently have corresponding time indexes, determining the time index of the new online user based on the time difference value of the online time of the new online user and the online time corresponding to the current existing time index;
after the charging period corresponding to the target time index expires, packaging information for charging a target user corresponding to the target time index to obtain a packaged message;
sending the packaged message to an authentication, authorization and accounting AAA server;
the determining the time index of the new online user based on the time difference between the online time of the new online user and the online time corresponding to the currently existing time index comprises:
sequentially taking the currently existing time index as a current time index to be matched, and executing the following steps A, B and C; until the time index of the new online user is determined, or the following steps A, B and C are executed for the current existing time index:
step A, determining the time difference between the online time of the new online user and the online time corresponding to the current time index to be matched;
step B, when the time difference is integral multiple of the charging period, determining the time index of the new online user as the current time index to be matched; when the time difference is not equal to the integral multiple of the charging period, taking the unmatched time index in the currently existing time indexes as the current time index to be matched;
and step C, when the time index exists in the current time index and the corresponding time index with the time difference value being integral multiple of the charging period does not exist, determining the time index of the new online user according to a preset strategy.
2. The message transmission method according to claim 1, wherein the method further comprises:
when receiving the offline message of the user with the existing time index, deleting the online time of the user corresponding to the offline message; and if all the users corresponding to the time indexes are offline, deleting the time indexes of which all the users are offline.
3. The message transmission method according to claim 1, wherein the encapsulating the information for charging the target user corresponding to the target time index to obtain an encapsulated message comprises:
acquiring a user identifier of each user in the target users to obtain a target user identifier;
packaging the target user identification to obtain a packaged user identification and a charging updating request message corresponding to the packaged user identification; or the like, or, alternatively,
acquiring a charging updating request message of each user in the target users to obtain a target charging updating request message;
and packaging the target charging updating request message to obtain a packaged message.
4. A message transmission method is applied to an authentication, authorization and accounting (AAA) server, and comprises the following steps:
receiving a transmission message sent by broadband remote access server BRAS equipment, wherein the transmission message is obtained by encapsulating information for charging target users with the same time index;
decapsulating the transmission message to obtain charging update request information of each user in the target users;
and processing the charging updating request information of each user to obtain a response message of the target user.
5. The message transmission method according to claim 4, wherein after the obtaining of the response message of the target user, the method further comprises:
respectively sending the response message of each user in the target users to the BRAS equipment; or the like, or, alternatively,
and packaging the response message of the target user to obtain a packaged response message, and sending the packaged response message to the BRAS equipment.
6. A message transmission device is applied to a Broadband Remote Access Server (BRAS) device, and the device comprises:
the online time recording module is used for recording the online time of a new online user after receiving the online message of the new online user;
the time index determining module is used for determining the time index of the new online user based on the time difference value of the online time of the new online user and the online time corresponding to the currently existing time index when the corresponding time index exists in other currently online users;
the message encapsulation module is used for encapsulating the information for charging the target user corresponding to the target time index after the charging period corresponding to the target time index expires, so as to obtain an encapsulated message;
the message sending module is used for sending the packaged message to an authentication, authorization and accounting AAA server;
the time index determining module is used for sequentially taking the currently existing time index as the current time index to be matched and executing the following steps A, B and C; until the time index of the new online user is determined, or the following steps A, B and C are executed for the current existing time index:
step A, determining the time difference between the online time of the new online user and the online time corresponding to the current time index to be matched;
step B, when the time difference is integral multiple of the charging period, determining the time index of the new online user as the current time index to be matched; when the time difference is not equal to the integral multiple of the charging period, taking the unmatched time index in the currently existing time indexes as the current time index to be matched;
and step C, when the time index exists in the current time index and the corresponding time index with the time difference value being integral multiple of the charging period does not exist, determining the time index of the new online user according to a preset strategy.
7. The message transmission device according to claim 6, characterized in that the device further comprises:
the deleting module is used for deleting the online time of the user corresponding to the offline message when the offline message of the user with the existing time index is received; and if all the users corresponding to the time indexes are offline, deleting the time indexes of which all the users are offline.
8. The message transmission apparatus according to claim 6, wherein the message encapsulation module is configured to obtain a user identifier of each of the target users to obtain a target user identifier; packaging the target user identification to obtain a packaged user identification and a charging updating request message corresponding to the packaged user identification; or the like, or, alternatively,
the message encapsulation module is used for acquiring a charging updating request message of each user in the target users to obtain a target charging updating request message; and packaging the target charging updating request message to obtain a packaged message.
9. A message transmission apparatus, applied to an authentication, authorization and accounting AAA server, comprising:
the system comprises a message receiving module, a service module and a service module, wherein the message receiving module is used for receiving a transmission message sent by broadband remote access server BRAS equipment, and the transmission message is obtained by packaging information used for charging target users with the same time index;
a decapsulation module, configured to decapsulate the transmission packet to obtain charging update request information of each user in the target users;
and the message processing module is used for processing the charging updating request information of each user to obtain a response message of the target user.
10. The message transmission device according to claim 9, characterized in that the device further comprises:
the first sending module is used for sending the response message of each user in the target users to the BRAS equipment respectively; or the like, or, alternatively,
and the second sending module is used for encapsulating the response message of the target user to obtain an encapsulated response message and sending the encapsulated response message to the BRAS equipment.
11. A broadband remote access server, BRAS, device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 3.
12. An authentication, authorization and accounting AAA server, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: -carrying out the method steps of any one of claims 4 to 5.
13. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 5.
CN201710538440.6A 2017-07-04 2017-07-04 Message transmission method and device, related electronic equipment and readable storage medium Active CN107547323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710538440.6A CN107547323B (en) 2017-07-04 2017-07-04 Message transmission method and device, related electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710538440.6A CN107547323B (en) 2017-07-04 2017-07-04 Message transmission method and device, related electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN107547323A CN107547323A (en) 2018-01-05
CN107547323B true CN107547323B (en) 2020-10-30

Family

ID=60970927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710538440.6A Active CN107547323B (en) 2017-07-04 2017-07-04 Message transmission method and device, related electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN107547323B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429866B (en) * 2018-01-31 2020-08-14 新华三技术有限公司 Charging message processing method, device and network equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017000242A1 (en) * 2015-06-30 2017-01-05 华为技术有限公司 Charging method, network device, and charging system
CN106487530A (en) * 2016-11-30 2017-03-08 杭州迪普科技股份有限公司 Update user's charging method and device
CN106656523A (en) * 2015-10-29 2017-05-10 华为软件技术有限公司 Charging method and equipment for session merging

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561454B (en) * 2013-10-22 2016-09-28 华为技术有限公司 A kind of network insertion processing method and processing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017000242A1 (en) * 2015-06-30 2017-01-05 华为技术有限公司 Charging method, network device, and charging system
CN106656523A (en) * 2015-10-29 2017-05-10 华为软件技术有限公司 Charging method and equipment for session merging
CN106487530A (en) * 2016-11-30 2017-03-08 杭州迪普科技股份有限公司 Update user's charging method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"校园网WLAN认证计费系统的设计与实现";邓朝辉;《中国优秀硕士学位论文全文数据库-信息科技辑》;20170315;I138-1231 *

Also Published As

Publication number Publication date
CN107547323A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN108965484B (en) Internet of things data transmission method, system and terminal
US9774642B2 (en) Method and device for pushing multimedia resource and display terminal
US7761084B2 (en) Systems and methods for session records correlation
US9998298B2 (en) Data transmission method, apparatus, and computer storage medium
EP2930911B1 (en) Method and apparatus for controlling sending of heartbeat signal
US8588056B1 (en) Elimination of unwanted packets entering a restricted bandwidth network
CN111294664A (en) Audio and video data transmission method, electronic equipment and storage medium
CN101237332A (en) Billing method, billing system and traffic statistical device
WO2016173155A1 (en) Method and apparatus for processing tcp ack packet
WO2021088813A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
RU2571398C2 (en) Method and device for implementing service of multicast transmission
CN104539749B (en) A kind of connection method and device based on virtual ip address
CN107547323B (en) Message transmission method and device, related electronic equipment and readable storage medium
CN103327129A (en) Domain name analyticmethod for multi-WAN-port gateway device
CN108809549B (en) Data transmission method and equipment
US20170149674A1 (en) Setting a lifetime limit of a data packet to minimize congestion and contention
CN104284142A (en) Communication method, device and system
WO2015117446A1 (en) Method and device for sending control resource change notification message
WO2017101028A1 (en) Data transmission method, m2m server, pgw, sgw and serving network node
CN102377576B (en) Multicast realization method
CN111510394A (en) Message scheduling method, related equipment and computer storage medium
CN109067922A (en) A kind of data transmission method and device
CN105656804B (en) Message processing method and device
CN107249194A (en) Manage method, device and the equipment of wireless network connection
CN109245965B (en) Method and device for determining duration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant