Message transmission method and device, electronic equipment and computer readable storage medium
By modifying DNS response packets in the broadband access server and carrying delay time or speed limit transmission, the problem of long access waiting time for terminal devices caused by insufficient BRAS resolution performance is solved, and the web page loading speed is improved.
Patent Information
- Application Number
- CN202411375199.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
AI Technical Summary
In Broadband Access Server (BRAS), due to device resolution performance limitations, DNS response packet resolution cannot be completed in time, resulting in a long wait time for terminal devices to access the destination and slow web page loading.
When receiving a DNS response message, if the BRAS does not have resolution capabilities and the cache area has free space, modify the DNS response message and carry the delay time until the BRAS recovers the resolution capabilities before sending the data message, or the cache area is full Time-limited transmission until the resolution is completed.
Through the delay time and speed limit mechanism, it is ensured that the terminal device sends data packets after the BRAS has completed parsing, avoiding retransmission and delay time, and improving access speed and user experience.
Smart Images

Figure CN119211190A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a message transmission method, device, electronic device and computer-readable storage medium. Background Art
[0002] In the current broadband access server (BRAS) application scenario, BRAS monitors the Domain Name System (DNS) response message received by the client and parses the DNS response message to obtain the domain name and Internet Protocol (IP) address requested by the client to set a specified release policy for the IP address.
[0003] However, when there are many terminals receiving DNS response messages at the same time, the BRAS cannot complete the parsing of all DNS response messages in time due to the limitation of the equipment parsing performance, resulting in the inability to set a specified release policy for the IP addresses corresponding to all DNS response messages in time, so that the data packets sent by the terminal device to the IP address are discarded, triggering the retransmission mechanism. Multiple retransmissions will cause the terminal device to wait for a long time when accessing the destination, and the web page will load slowly. Summary of the invention
[0004] In view of this, the present application provides a message transmission method, apparatus, electronic device and computer-readable storage medium to reduce the waiting time for a terminal device to access a destination.
[0005] The technical solutions provided by this application are as follows:
[0006] According to an embodiment of the first aspect of the present application, a message transmission method is proposed. The method is applied to a broadband access server BRAS. The method includes:
[0007] When a DNS response message sent to a terminal device is received, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is free space for storing the DNS response message in the cache area of the BRAS, the DNS response message is modified so that the modified DNS response message carries a delay duration; the delay duration is determined based on the time required for the BRAS to recover the ability to parse the DNS response message; the delay duration is used to indicate the delay duration for the terminal device to send a data message to the destination to be accessed;
[0008] The modified DNS response message is sent to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time carried in the DNS response message ends.
[0009] Optionally, the detecting that the BRAS currently does not have the capability of parsing the DNS response message includes:
[0010] If the number of DNS response messages received in the specified time period up to the current moment is greater than the maximum threshold of the number of DNS response messages that the BRAS can simultaneously resolve, it is determined that the BRAS currently does not have the ability to resolve the DNS response message.
[0011] Optionally, modifying the DNS response message includes:
[0012] The value of the Z field included in the flag field Flags carried in the header area of the DNS response message is modified, the Z field is a reserved field in the Flags, and the value of the Z field is used to reflect the delay duration corresponding to the DNS response message.
[0013] Optionally, the delay duration is determined based on the duration required for the BRAS to recover the ability to parse the DNS response message, including:
[0014] Determine the difference between the number of DNS response messages received in a specified time period up to the current moment and a maximum threshold value of the number of DNS response messages that the BRAS can simultaneously resolve;
[0015] Determine a ratio of the difference to a maximum threshold of the number of DNS response messages that the BRAS simultaneously resolves;
[0016] Determining the time required for the BRAS to recover the ability to parse the DNS response message according to the size of the ratio and a preset ratio size threshold range;
[0017] The time required for the BRAS to recover the ability to parse the DNS response message is determined as the delay time.
[0018] Optionally, before modifying the DNS response message, the method further includes:
[0019] Copying the DNS response message, and storing the copied DNS response message in a buffer area of the BRAS;
[0020] When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to the data message sent by the terminal device to the destination to be accessed.
[0021] Optionally, the method further includes:
[0022] When receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is no free space in the cache area of the BRAS for storing the DNS response message, the transmission of the DNS response message begins to be speed-limited until the BRAS recovers the ability to parse the latest received DNS response message;
[0023] The BRAS recovering the ability to parse the latest received DNS response message means that all the DNS response messages stored in the cache area have been completely parsed.
[0024] According to an embodiment of the second aspect of the present application, a message transmission device is provided, which is applied to a broadband access server BRAS, and includes:
[0025] A modification unit, configured to, when receiving a DNS response message sent to a terminal device, modify the DNS response message so that the modified DNS response message carries a delay duration if it is detected that the BRAS currently does not have the ability to resolve the DNS response message and there is free space in the cache area of the BRAS for storing the DNS response message; the delay duration is determined based on the duration required for the BRAS to recover the ability to resolve the DNS response message; the delay duration is used to indicate the delay duration for the terminal device to send a data message to a destination to be accessed;
[0026] The sending unit is used to send the modified DNS response message to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time carried in the DNS response message ends.
[0027] Optionally, the modification unit is specifically used for:
[0028] If the number of DNS response messages received in the specified time period up to the current moment is greater than the maximum threshold of the number of DNS response messages that the BRAS can simultaneously resolve, it is determined that the BRAS currently does not have the ability to resolve the DNS response message;
[0029] And / or, the modification unit is specifically used for:
[0030] Modify the value of the Z field included in the flag field Flags carried in the header area of the DNS response message, where the Z field is a reserved field in the Flags, and the value of the Z field is used to reflect the delay duration corresponding to the DNS response message;
[0031] And / or, the modification unit is specifically used for:
[0032] Determine the difference between the number of DNS response messages received in a specified time period up to the current moment and a maximum threshold value of the number of DNS response messages that the BRAS can simultaneously resolve;
[0033] Determine a ratio of the difference to a maximum threshold of the number of DNS response messages that the BRAS simultaneously resolves;
[0034] Determining the time required for the BRAS to recover the ability to parse the DNS response message according to the size of the ratio and a preset ratio size threshold range;
[0035] Determine the time required for the BRAS to recover the ability to parse the DNS response message as the delay time;
[0036] And / or, before modifying the DNS response message, the modifying unit is further used to:
[0037] Copying the DNS response message, and storing the copied DNS response message in a buffer area of the BRAS;
[0038] When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to a data message sent by the terminal device to a destination to be accessed;
[0039] And / or, the sending unit is further used for:
[0040] When receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is no free space in the cache area of the BRAS for storing the DNS response message, the transmission of the DNS response message begins to be speed-limited until the BRAS recovers the ability to parse the latest received DNS response message;
[0041] The BRAS recovering the ability to parse the latest received DNS response message means that all the DNS response messages stored in the cache area have been completely parsed.
[0042] According to an embodiment of the third aspect of the present application, an electronic device is provided, including:
[0043] processor; and,
[0044] A computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the processor is caused to execute the method according to the first aspect.
[0045] According to an embodiment of the fourth aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the method according to the first aspect.
[0046] It can be seen from the above technical solution that when the present application receives a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is free space in the cache area of the BRAS for storing the DNS response message, the DNS response message is modified so that the modified DNS response message carries the delay time, and the modified DNS response message is sent to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time expires, thereby ensuring that when the terminal device sends the data message, the BRAS has completed the parsing of the DNS response message, thereby avoiding the problem of a long waiting time for the terminal device to access the destination and slow web page loading. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] Figure 1 A schematic diagram of a message transmission method flow provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of the format of the header area in a DNS response message provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of the structure of the flag field Flags provided in an embodiment of the present application;
[0051] Figure 4 An overall flow chart of the message transmission method provided in the embodiment of the present application;
[0052] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0053] Figure 6 A structural diagram of a message transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0055] The Domain Name System (DNS) provides a mapping relationship between domain names and IP addresses. When a terminal device requests to open a web page, it will initiate a DNS request for the domain name to the DNS server. After receiving the DNS request for the domain name, the DNS server will reply with the information of the IP address corresponding to the domain name, and then the terminal will initiate access to the IP address.
[0056] In the current broadband access server (BRAS) application scenario, the BRAS monitors the DNS response message received by the client and parses the DNS response message to obtain the domain name and Internet Protocol (IP) IP address requested by the client to set a specified release policy for the IP address.
[0057] When there are many access terminals accessing the DNS server concurrently, the BRAS device processing performance bottleneck may be exceeded instantly (i.e., the BRAS receives multiple concurrent DNS response messages at the same time). In this case, if the DNS response message corresponding to the terminal device is not parsed and the release policy is not issued before the data message sent by the terminal device to the destination IP address reaches the BRAS, the destination address of the data message will be lost because it does not receive the release policy.
[0058] After sending a data packet, if the terminal device does not receive a response from the other end, retransmission will be triggered after the retransmission timer times out. The timeout period follows the binary backoff principle, such as {1,2,4,8,16}, which multiplies the timeout period. Especially for terminal devices with shorter retransmission timers, if the packet is discarded on the BRAS, it will be retransmitted multiple times in a short period of time. The processing bottleneck of the BRAS may cause the terminal data packet to pass through the BRAS device (the parsing and dispatching policy have been completed), but due to multiple retransmissions, the timeout waiting time is long, which ultimately leads to slow loading of terminal web pages and poor user Internet experience.
[0059] Based on this, the present application proposes a message transmission method to reduce the waiting time for a terminal device to access a destination.
[0060] Please refer to Figure 1 , Figure 1 A flow chart of a message transmission method provided in an embodiment of the present application.
[0061] In this embodiment, the method is applied to a broadband access server BRAS.
[0062] like Figure 1As shown, the method may specifically include the following steps:
[0063] Step 101, when a DNS response message sent to a terminal device is received, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is free space in the buffer area of the BRAS for storing the DNS response message, the DNS response message is modified so that the modified DNS response message carries a delay duration.
[0064] In this embodiment, when the BRAS receives a DNS response message sent to a terminal device, it may first determine whether the BRAS currently has the ability to resolve the DNS message.
[0065] Due to the limitation of BRAS's own performance, BRAS has a maximum threshold for the number of DNS response messages that can be parsed simultaneously. As an embodiment, if the number of DNS response messages received in a specified time period up to the current moment is greater than the maximum threshold for the number of DNS response messages that can be parsed simultaneously by BRAS, it is determined that BRAS currently does not have the ability to parse DNS response messages.
[0066] In this embodiment, the current moment refers to the moment when the DNS response message sent to the terminal device is received, and the number of DNS response messages received in the specified time period up to the current moment refers to the number of concurrent DNS response messages at the current moment.
[0067] In this embodiment, there is a cache area in the BRAS for storing DNS response messages that cannot be resolved temporarily. The process of caching and subsequently processing the DNS messages will be described in detail below and will not be repeated here.
[0068] When it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is free space in the BRAS cache area for storing the DNS response message, the received DNS response message can be modified to obtain a modified DNS response message, wherein the modified response message carries the delay duration.
[0069] In this embodiment, the delay duration is used to indicate the delay duration for the terminal device to send a data message to the destination to be accessed, and the delay duration is determined based on the duration required for the BRAS to recover the ability to parse the DNS response message.
[0070] As an embodiment, the method for determining the delay duration may specifically include:
[0071] Determine the difference between the number of DNS response messages received in the specified time period up to the current time and the maximum threshold of the number of DNS response messages that the BRAS can resolve simultaneously;
[0072] Determine the ratio of the difference to the maximum threshold of the number of DNS response messages that the BRAS can resolve simultaneously;
[0073] Determine the time required for the BRAS to recover the ability to parse the DNS response message according to the size of the ratio and the preset ratio size threshold range;
[0074] The time required for the BRAS to recover the ability to parse the DNS response message is determined as the delay time.
[0075] In this embodiment, the difference between the number of DNS response messages received in the specified time period up to the current moment and the maximum threshold of the number of DNS response messages simultaneously resolved by the BRAS can be determined first, that is, the difference between the number of concurrent DNS response messages at the current moment and the BRAS resolution capacity threshold.
[0076] After the difference is determined, a ratio of the difference to a maximum threshold of the number of DNS response messages that can be simultaneously resolved by the BRAS is determined.
[0077] It is easy to understand that the more concurrent DNS response messages there are at the current moment, the more the BRAS resolution threshold is exceeded. At this time, the BRAS needs a longer time to resolve the currently received DNS response message. In this embodiment, the time required for the BRAS to recover the ability to resolve the DNS response message is determined by the ratio of the difference to the maximum threshold of the number of DNS response messages that the BRAS can resolve simultaneously and the preset ratio size threshold range.
[0078] As an embodiment, multiple different ratio threshold ranges can be preset, corresponding to different delay durations. The larger the ratio threshold range, the longer the corresponding delay duration. For example, the ratio threshold ranges are set to (0, 0.2], (0.2, 0.4], (0.4, 0.6], (0.6, 0.8], and the corresponding delay durations are 1 second, 2 seconds, 3 seconds, and 4 seconds, respectively.
[0079] According to the ratio threshold range within which the determined ratio falls, the time required for the BRAS corresponding to the DNS response message to recover the ability to parse the DNS response message, that is, the delay time, is determined.
[0080] After the delay duration is determined, the DNS response message needs to be modified according to the delay duration, so that the modified DNS response message carries the delay duration.
[0081] Exemplarily, the specific method for modifying the DNS response message may include:
[0082] The value of the Z field included in the flag field Flags carried in the header area of the DNS response message is modified. The Z field is a reserved field in Flags, and the value of the Z field is used to reflect the delay duration corresponding to the DNS response message.
[0083] In this embodiment, the reserved field included in the DNS response message may be changed, and the delay duration corresponding to the DNS response message may be reflected by the value of the reserved field.
[0084] Please refer to Figure 2 , Figure 2 A schematic diagram of the format of the header area in a DNS response message provided in an embodiment of the present application.
[0085] like Figure 2 As shown, the header area format of the DNS response message is unified and includes multiple fixed fields such as the transaction ID field, the flag field Flags, and the problem count field. The solution proposed in the embodiment of the present application uses the reserved fields in the flag field Flags.
[0086] Please refer to Figure 3 , Figure 3 A schematic diagram of the structure of the flag field Flags provided in an embodiment of the present application.
[0087] like Figure 3 As shown, the length of the flag field Flags is 16 bits, wherein the solution proposed in this embodiment is to use the reserved field Z field in the flag field Flags to carry the relevant information of the delay duration, and the length of the Z field is 3 bits in total, and the default is an all-zero field.
[0088] In this embodiment, each delay duration corresponds to a fixed value of the Z field, and the delay duration is reflected by the value of the Z field.
[0089] As an embodiment, please refer to Table 1, which is a correspondence table between delay duration and Z field value.
[0090] Z field value Corresponding delay time (S) 001 1 010 2 011 3 100 4 101 5 110 6 111 7
[0091] Table 1
[0092] For example, a delay time of 1 second can be represented by a Z field value of 001, a delay time of 2 seconds can be represented by a Z field value of 010, ..., a delay time of 7 seconds can be represented by a Z field value of 111.
[0093] In this embodiment, the Z field value may be modified according to the determined delay duration to obtain a modified DNS response message.
[0094] As an embodiment, since the BRAS device also needs to parse the DNS response message to obtain the destination IP address to be accessed by the terminal device, so as to issue a release policy for the data message sent by the terminal device to the destination, before modifying the DNS response message, the method may further include:
[0095] The DNS response message is copied and stored in the buffer area of the BRAS;
[0096] When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to the data message sent by the terminal device to the destination to be accessed.
[0097] In this embodiment, before modifying the DNS message, the DNS response message may be copied. Since the BRAS device cannot parse the DNS response message at this time, the copied DNS response message may be cached in the cache area of the BRAS device.
[0098] When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to the data message sent by the terminal device to the destination to be accessed.
[0099] In this embodiment, the DNS response message is parsed to obtain the destination IP address to be accessed by the terminal device, and a release policy corresponding to the data message can be set for the IP address to manage data access to the terminal device.
[0100] At this point, the description of step 101 ends, and step 102 is executed next.
[0101] Step 102: Send the modified DNS response message to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time carried in the DNS response message ends.
[0102] In this embodiment, after the modified DNS response message is determined in step 101, the modified DNS response message can be sent to the terminal device.
[0103] After receiving the modified DNS response message, the terminal device can determine the delay duration according to the value of the Z field carried in the modified DNS response message, and send a data message to the destination to be accessed after the delay duration expires.
[0104] It is easy to understand that after the delay period ends, sending a data message to the destination to be visited can ensure that the BRAS device has completed the parsing of the DNS response message and issued the corresponding release policy, avoiding serious delays caused by multiple retransmissions of data messages by the terminal device.
[0105] This concludes the description of step 102.
[0106] As an embodiment, the message transmission method proposed in the present application may also include:
[0107] When receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is no free space in the BRAS cache area for storing the DNS response message, the transmission of the DNS response message will be limited until the BRAS recovers the ability to parse the latest received DNS response message;
[0108] The BRAS recovering the ability to parse the latest received DNS response message means that all DNS response messages stored in the cache area are completely parsed.
[0109] In this embodiment, if it is detected that the BRAS currently does not have the ability to resolve the DNS response message and there is no free space in the BRAS cache for storing the DNS response message, it indicates that the number of concurrent DNS response messages has exceeded the BRAS resolution performance threshold for too long, and the cache is already full of DNS response messages to be resolved. At this time, it is necessary to control the transmission rate of the DNS message and the number of concurrent DNS response messages until the message processing in the cache is completed and then release the speed limit value to ensure the stability of the system and avoid derivative problems caused by the CPU being under high load for a long time.
[0110] This concludes Figure 1 Description of the flowchart of the message transmission method.
[0111] When the present application receives a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is free space in the cache area of the BRAS for storing the DNS response message, the DNS response message is modified so that the modified DNS response message carries a delay time, and the modified DNS response message is sent to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time expires, thereby ensuring that the BRAS has completed the parsing of the DNS response message when the terminal device sends the data message, thereby avoiding the problem of a long waiting time for the terminal device to access the destination and slow web page loading.
[0112] Below through Figure 4The overall process of the message transmission method provided in this application is described.
[0113] Please refer to Figure 4 , Figure 4 An overall flow chart of the message transmission method provided in an embodiment of the present application.
[0114] like Figure 4 As shown, when a DNS response message is received and sent to a terminal device, it is first possible to determine whether there is a DNS response message to be resolved in the cache area. If not, it indicates that the BRAS currently has the ability to resolve the DNS response message. At this time, the DNS response message can be forwarded directly to the terminal device without being modified, and the DNS response message can be parsed at the same time to determine the release strategy for the data message of the terminal device.
[0115] If there are DNS response messages to be resolved in the cache, it means that the BRAS does not have the ability to resolve the current DNS response message. At this time, you can further determine whether there is free space in the cache. If the cache is full, it means that the number of concurrent DNS response messages exceeds the BRAS resolution performance threshold for too long. It is necessary to control the transmission rate of DNS messages and the number of concurrent DNS response messages until the message processing in the cache is completed and then release the speed limit.
[0116] If the cache area is not full, the DNS response message can be copied and cached in the cache area, and the Z field can be modified according to the determined delay duration, and the modified DNS response message can be sent to the terminal device, so that the terminal device delays sending the data packet according to the value of the Z field, ensuring that when the terminal device sends the data packet, the BRAS has completed the parsing of the DNS response message.
[0117] This concludes Figure 4 The overall process is described in the message transmission method.
[0118] Please refer to Figure 5 , Figure 5 is a schematic structural diagram of an electronic device proposed in an embodiment of the present application. Figure 5 As shown, the hardware structure may include: a processor and a computer-readable storage medium, the computer-readable storage medium storing computer-executable instructions that can be executed by the processor; the processor is used to execute the computer-executable instructions to implement the method disclosed in the above example of this application.
[0119] Please refer to Figure 6 , Figure 6 1 is a structural diagram of a message transmission device proposed in an embodiment of the present application, and the method is applied to a broadband access server BRAS. Figure 6As shown, the message transmission device may include a modification unit 601 and a sending unit 602. Specifically, the device includes:
[0120] A modification unit 601 is used for, when receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to resolve the DNS response message and there is free space in the buffer area of the BRAS for storing the DNS response message, modifying the DNS response message so that the modified DNS response message carries a delay duration; the delay duration is determined based on the duration required for the BRAS to recover the ability to resolve the DNS response message; the delay duration is used to indicate the delay duration for the terminal device to send a data message to the destination to be accessed;
[0121] The sending unit 602 is used to send the modified DNS response message to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time carried in the DNS response message ends.
[0122] Optionally, the modifying unit 601 is specifically configured to:
[0123] If the number of DNS response messages received in the specified time period up to the current time is greater than the maximum threshold of the number of DNS response messages that the BRAS can resolve simultaneously, it is determined that the BRAS currently does not have the ability to resolve the DNS response message;
[0124] And / or, the modifying unit 601 is specifically used for:
[0125] Modify the value of the Z field in the Flags field in the header area of the DNS response message. The Z field is a reserved field in Flags. The value of the Z field is used to reflect the delay duration corresponding to the DNS response message.
[0126] And / or, the modifying unit 601 is specifically used for:
[0127] Determine the difference between the number of DNS response messages received in the specified time period up to the current time and the maximum threshold of the number of DNS response messages that the BRAS can resolve simultaneously;
[0128] Determine the ratio of the difference to the maximum threshold of the number of DNS response messages that the BRAS can resolve simultaneously;
[0129] Determine the time required for the BRAS to recover the ability to parse the DNS response message according to the size of the ratio and the preset ratio size threshold range;
[0130] The time required for the BRAS to recover the ability to parse the DNS response message is determined as the delay time;
[0131] And / or, before modifying the DNS response message, the modifying unit 601 is further configured to:
[0132] The DNS response message is copied and stored in the buffer area of the BRAS;
[0133] When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to the data message sent by the terminal device to the destination to be accessed;
[0134] And / or, the sending unit 602 is further configured to:
[0135] When receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is no free space in the BRAS cache area for storing the DNS response message, the transmission of the DNS response message will be limited until the BRAS recovers the ability to parse the latest received DNS response message;
[0136] The BRAS recovering the ability to parse the latest received DNS response message means that all DNS response messages stored in the cache area are completely parsed.
[0137] So far, completed Figure 6 Description of the message transmission device.
[0138] Correspondingly, in this embodiment, the embodiment of the present application also provides a computer-readable storage medium, on which a number of computer-executable instructions are stored. When the computer-executable instructions are executed, the method disclosed in the above example of the present application can be implemented.
[0139] Exemplarily, the computer-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the computer-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0140] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of protection of the present application.
Claims
1. A message transmission method, characterized in that: The method is applied to a broadband access server BRAS, and the method comprises: When a DNS response message sent to a terminal device is received, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is free space for storing the DNS response message in the cache area of the BRAS, the DNS response message is modified so that the modified DNS response message carries a delay duration; the delay duration is determined based on the time required for the BRAS to recover the ability to parse the DNS response message; the delay duration is used to indicate the delay duration for the terminal device to send a data message to the destination to be accessed; The modified DNS response message is sent to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time carried in the DNS response message ends.
2. The method according to claim 1, characterized in that The detecting that the BRAS currently does not have the capability of parsing the DNS response message includes: If the number of DNS response messages received in the specified time period up to the current moment is greater than the maximum threshold of the number of DNS response messages that the BRAS can simultaneously resolve, it is determined that the BRAS currently does not have the ability to resolve the DNS response message.
3. The method according to claim 1, characterized in that Modifying the DNS response message includes: The value of the Z field included in the flag field Flags carried in the header area of the DNS response message is modified, the Z field is a reserved field in the Flags, and the value of the Z field is used to reflect the delay duration corresponding to the DNS response message.
4. The method according to claim 1, characterized in that The delay duration is determined based on the duration required for the BRAS to recover the ability to parse the DNS response message, including: Determine the difference between the number of DNS response messages received in a specified time period up to the current moment and a maximum threshold value of the number of DNS response messages that the BRAS can simultaneously resolve; Determine a ratio of the difference to a maximum threshold of the number of DNS response messages that the BRAS simultaneously resolves; Determining the time required for the BRAS to recover the ability to parse the DNS response message according to the size of the ratio and a preset ratio size threshold range; The time required for the BRAS to recover the ability to parse the DNS response message is determined as the delay time.
5. The method according to claim 1, characterized in that Before modifying the DNS response message, the method further includes: Copying the DNS response message, and storing the copied DNS response message in a buffer area of the BRAS; When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to the data message sent by the terminal device to the destination to be accessed.
6. The method according to claim 5, characterized in that The method further includes: When receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is no free space in the cache area of the BRAS for storing the DNS response message, the transmission of the DNS response message begins to be speed-limited until the BRAS recovers the ability to parse the latest received DNS response message; The BRAS recovering the ability to parse the latest received DNS response message means that all the DNS response messages stored in the cache area have been completely parsed.
7. A message transmission device, characterized in that: The device is applied to a broadband access server BRAS, and comprises: A modification unit, configured to, when receiving a DNS response message sent to a terminal device, modify the DNS response message so that the modified DNS response message carries a delay duration if it is detected that the BRAS currently does not have the ability to resolve the DNS response message and there is free space in the cache area of the BRAS for storing the DNS response message; the delay duration is determined based on the duration required for the BRAS to recover the ability to resolve the DNS response message; the delay duration is used to indicate the delay duration for the terminal device to send a data message to a destination to be accessed; The sending unit is used to send the modified DNS response message to the terminal device, so that the terminal device sends a data message to the destination to be accessed after the delay time carried in the DNS response message ends.
8. The device according to claim 7, characterized in that The modification unit is specifically used for: If the number of DNS response messages received in the specified time period up to the current moment is greater than the maximum threshold of the number of DNS response messages that the BRAS can simultaneously resolve, it is determined that the BRAS currently does not have the ability to resolve the DNS response message; And / or, the modification unit is specifically used for: Modify the value of the Z field included in the flag field Flags carried in the header area of the DNS response message, where the Z field is a reserved field in the Flags, and the value of the Z field is used to reflect the delay duration corresponding to the DNS response message; And / or, the modification unit is specifically used for: Determine the difference between the number of DNS response messages received in a specified time period up to the current moment and a maximum threshold value of the number of DNS response messages that the BRAS can simultaneously resolve; Determine a ratio of the difference to a maximum threshold of the number of DNS response messages that the BRAS simultaneously resolves; Determining the time required for the BRAS to recover the ability to parse the DNS response message according to the size of the ratio and a preset ratio size threshold range; Determine the time required for the BRAS to recover the ability to parse the DNS response message as the delay time; And / or, before modifying the DNS response message, the modifying unit is further used to: Copying the DNS response message, and storing the copied DNS response message in a buffer area of the BRAS; When the BRAS recovers the ability to parse the DNS response message, the DNS response message is parsed to determine a release policy corresponding to a data message sent by the terminal device to a destination to be accessed; And / or, the sending unit is further used for: When receiving a DNS response message sent to a terminal device, if it is detected that the BRAS currently does not have the ability to parse the DNS response message and there is no free space in the cache area of the BRAS for storing the DNS response message, the transmission of the DNS response message begins to be speed-limited until the BRAS recovers the ability to parse the latest received DNS response message; The BRAS recovering the ability to parse the latest received DNS response message means that all the DNS response messages stored in the cache area have been completely parsed.
9. An electronic device, characterized in that: include: processor; as well as, A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein when the computer-executable instructions are executed by the processor, the processor is enabled to execute the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that: The computer executable instructions, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Message processing method and device, related electronic equipment and readable storage medium
CN107547321A
Message caching method and device
CN107959637A
Flow control method of offline file in measurement and control data link transmission
CN112187954A
Data service overload detection and mitigation
CN112262559A
DNS caching method on kernel level based on eBPF
CN116684385A
