A method, apparatus, computer device, and storage medium for generating traffic quotas.

By obtaining the total traffic of the terminal and the current remaining traffic, and countercalculating dynamic quotas based on factors such as whether to share package information, the problem of inefficient traffic quota authorization in the existing system is solved, and more efficient traffic quota management is achieved.

CN114071388BActive Publication Date: 2025-03-14AKSU PREFECTURE BRANCH OF CHINA MOBILE GRP XINJIANG +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010760309.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2025-03-14
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

The existing systems are less efficient when authorizing traffic quota, resulting in frequent communication between network elements and traffic quota systems, increasing system pressure and computing volume.

Method used

By obtaining the total traffic of the terminal and the current remaining traffic, checking whether the package information is shared, and dynamic quotas are reverse calculated based on this information, network type, total traffic and current remaining traffic to generate traffic quotas.

Benefits of technology

It improves the efficiency of traffic quota, reduces the communication frequency between network elements and traffic quota systems, and reduces the system pressure and computing volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114071388B_ABST
    Figure CN114071388B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, computer equipment and storage medium for generating a flow quota. In the technical solution provided by the embodiment of the present invention, the total flow and the current remaining flow of a terminal are obtained; whether the terminal shares a package information is queried; and a dynamic quota is calculated based on whether the terminal shares a package information, the obtained network type, the total flow and the current remaining flow to generate a flow quota, which can improve the flow quota efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, computer equipment and storage medium for generating a flow quota. [Background technology]

[0002] At present, the existing system performs traffic quota authorization by obtaining the default quota corresponding to the network type to which the terminal belongs and the actual usage of the terminal, batch pricing and updating the used traffic, and then further performing account consolidation to obtain real-time bills, remaining free resources, balances, simulated account cancellations, reverse quota calculations and other steps to determine the final allocated quota. With the rapid growth of traffic services, the number of message requests from network elements has increased dramatically, and network elements and traffic quota authorization systems have frequently communicated. The existing system performs traffic quota authorization in a relatively single way, making quota efficiency low. [Summary of the invention]

[0003] In view of this, embodiments of the present invention provide a method, apparatus, computer device and storage medium for generating a traffic quota, which can improve the efficiency of the traffic quota.

[0004] On the one hand, an embodiment of the present invention provides a method for generating a traffic quota, the method comprising:

[0005] Get the total traffic and current remaining traffic of the terminal;

[0006] Query whether the terminal shares the package information;

[0007] The dynamic quota is calculated based on whether the terminal shares the package information, the obtained network type, the total traffic and the current remaining traffic to generate the traffic quota.

[0008] Optionally, the dynamic quota is calculated based on the information of whether the terminal shares the package, the network type, the total traffic, and the current remaining traffic to generate the traffic quota, including:

[0009] Divide the current remaining flow by the total flow to generate the flow usage ratio;

[0010] Through the set dynamic authorization rules, traffic quotas are generated according to the traffic usage ratio, network type, and whether the terminal shares the package information.

[0011] Optionally, before obtaining the total flow and the current remaining flow of the terminal, the method further includes:

[0012] Determine whether the difference between the generated large flow determination coefficient and the obtained initial residual flow is greater than or equal to a set difference threshold;

[0013] If it is determined that the difference between the large flow determination coefficient and the initial remaining flow is greater than or equal to the difference threshold, the actual flow used by the terminal in the current period is obtained;

[0014] The actual flow is subtracted from the obtained initial remaining flow to generate the current remaining flow, and the steps of obtaining the total flow and the current remaining flow of the terminal are continued.

[0015] Optionally, before judging whether the difference between the generated large flow determination coefficient and the obtained initial residual flow is greater than or equal to a set difference threshold, the method further includes:

[0016] Receiving the quota request information sent by the gateway network element, where the quota request information includes the network type of the terminal;

[0017] A large traffic determination coefficient is generated according to the network type, the set network traffic rate, the set quota period, and the set minimum traffic quota.

[0018] Optionally, before querying whether the terminal shares the package information, the method further includes:

[0019] Get the terminal's traffic expiration time and current time;

[0020] Determine whether the sum of the current time and the quota period is less than or equal to the traffic expiration time;

[0021] If it is determined that the sum of the current time and the quota period is less than or equal to the traffic expiration time, continue to execute the step of querying whether the terminal shares the package information.

[0022] Optionally, after the dynamic quota is calculated based on the information of whether the terminal shares the package, the network type, the total traffic and the current remaining traffic, and the traffic quota is generated, the method further includes:

[0023] Divide the actual traffic by the current period to generate the Internet access rate;

[0024] Match the traffic threshold value according to the Internet access rate and / or network type and / or traffic quota;

[0025] Send dynamic cooperation authorization information to the gateway network element, the dynamic cooperation authorization information includes traffic quota and traffic threshold value, so that the gateway network element can allocate the traffic quota to the terminal and determine whether the current remaining traffic is less than or equal to the traffic threshold value according to the specified time interval. If it is determined that the current remaining traffic is less than or equal to the traffic threshold value, continue to execute the step of receiving the request quota information sent by the gateway network element.

[0026] Optionally, a large flow determination coefficient is generated according to the network type, the set network flow rate, the set quota period, and the set minimum flow quota, including:

[0027] Get the weight corresponding to the network type;

[0028] The formula L`=(K+S)×VT+LN is used to calculate the weight corresponding to the network type, the rate of network traffic, the quota period, and the minimum traffic quota to generate a large traffic judgment coefficient, where L` is the large traffic judgment coefficient, K is the weight corresponding to the network type, S is the rate of network traffic, VT is the quota period, and LN is the minimum traffic quota.

[0029] On the other hand, an embodiment of the present invention provides a device for generating a traffic quota, including:

[0030] A first acquisition unit, used to acquire the total flow and current remaining flow of the terminal;

[0031] A query unit, used to query whether the terminal shares package information;

[0032] The first generating unit is used to calculate the dynamic quota based on whether the terminal shares the package information, the acquired network type, the total traffic and the current remaining traffic, and generate the traffic quota.

[0033] On the other hand, an embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned method for generating traffic quotas.

[0034] On the other hand, an embodiment of the present invention provides a computer device, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, and is characterized in that the program instructions implement the above-mentioned method for generating traffic quotas when loaded and executed by the processor.

[0035] In the scheme of the embodiment of the present invention, the total traffic and the current remaining traffic of the terminal are obtained; the information on whether the terminal shares a package is queried; the dynamic quota is calculated based on the information on whether the terminal shares a package, the obtained network type, the total traffic and the current remaining traffic, and the traffic quota is generated, which can improve the efficiency of the traffic quota.

Brief Description of the Drawings

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flow chart of a method for generating a traffic quota provided by an embodiment of the present invention;

[0038] Figure 2 A flow chart of another method for generating a traffic quota provided in an embodiment of the present invention;

[0039] Figure 3 A schematic diagram of the structure of a flow quota generation device provided in an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of a computer device provided by an embodiment of the present invention. [Specific implementation method]

[0041] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0042] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0044] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0045] It should be understood that, although the terms first, second, etc. may be used to describe the set thresholds in the embodiments of the present invention, these set thresholds should not be limited to these terms. These terms are only used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of the present invention, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.

[0046] Figure 1 A flow chart of a method for generating a flow quota provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0047] Step 101: Obtain the total flow and current remaining flow of the terminal.

[0048] Step 102: Query whether the terminal shares package information.

[0049] Step 103: Reversely calculate the dynamic quota based on the terminal's shared package information, the acquired network type, the total traffic, and the current remaining traffic to generate a traffic quota.

[0050] In the technical solution provided by the embodiment of the present invention, the total traffic and the current remaining traffic of the terminal are obtained; whether the terminal shares the package information is queried; the dynamic quota is reversely calculated based on whether the terminal shares the package information, the obtained network type, the total traffic and the current remaining traffic, and the traffic quota is generated, which can improve the efficiency of the traffic quota.

[0051] Figure 2 A flow chart of another method for generating a traffic quota provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes:

[0052] Step 201: Receive quota request information sent by a gateway network element, where the quota request information includes the network type of the terminal.

[0053] In this embodiment, each step is executed by the server.

[0054] In this embodiment, the gateway network element mainly acts as a gateway, and can be connected to a variety of different data networks. As an optional solution, the gateway network element is a Gateway GPRS Support Node (Gateway GPRS Support Node, referred to as: GGSN).

[0055] In this embodiment, the network type of the terminal is the type of network to which the terminal belongs. The network type includes the second-generation mobile phone communication technology specification (2-Generation wireless telephony technology, referred to as 2G), the third-generation mobile communication technology (3rd-Generation, referred to as 3G), the fourth-generation mobile communication technology (4G) or the fifth-generation mobile networks (5G).

[0056] In this embodiment, the quota request information also includes a terminal identification code. As an optional solution, when the network type to which the terminal belongs is 4G, the terminal identification code is a mobile phone number.

[0057] Furthermore, a designated default quota is allocated to the terminal according to the network type of the terminal. For example, if the network type of the terminal is 2G or 3G, the designated default quota allocated to the terminal is 4M; if the network type of the terminal is 4G, the designated default quota allocated to the terminal is 50M.

[0058] Step 202: Generate a large traffic determination coefficient according to the network type, the set network traffic rate, the set quota period, and the set minimum traffic quota.

[0059] In this embodiment, step 202 specifically includes:

[0060] Step 2021: Obtain the weight corresponding to the network type.

[0061] In this embodiment, different network types correspond to different weights, and the weight corresponding to each network type is obtained through actual measurement.

[0062] Step 2022: Calculate the weight corresponding to the network type, the rate of network traffic, the quota period, and the minimum traffic quota through the formula L`=(K+S)×VT+LN to generate a large traffic judgment coefficient, where L` is the large traffic judgment coefficient, K is the weight corresponding to the network type, S is the rate of network traffic, VT is the quota period, and LN is the minimum traffic quota.

[0063] As an optional solution, if the network type is 3G, the network traffic rate is 120K / s-600K / s.

[0064] In this embodiment, the quota period is the waiting time for the next flow quota generation. As an optional solution, the quota period is 30 minutes.

[0065] As an optional option, the minimum traffic quota is 5G traffic.

[0066] Step 203, determine whether the difference between the generated large flow determination coefficient and the obtained initial residual flow is greater than or equal to the set difference threshold, if so, execute step 204; if not, the process ends.

[0067] In this embodiment, the initial remaining flow of the terminal can be queried according to the terminal identification code.

[0068] In this step, if it is determined that the difference between the large flow judgment coefficient and the initial residual flow is greater than or equal to the difference threshold, it indicates that the user is a large flow user, and step 204 is continued; if it is determined that the difference between the large flow judgment coefficient and the initial residual flow is less than the difference threshold, it indicates that the user is not a large flow user, and the process ends.

[0069] In this embodiment, the difference threshold value can be set according to actual conditions. As an optional solution, the difference threshold value is 0.

[0070] Step 204: Obtain the actual traffic used by the terminal in the current cycle.

[0071] In this embodiment, the actual traffic of the terminal includes the actual traffic of the mobile phone number, the actual traffic of the Internet of Things card number, or the actual traffic of the industry card number.

[0072] In this embodiment, the period can be set according to actual conditions.

[0073] Step 205: Subtract the actual flow from the obtained initial remaining flow to generate the current remaining flow.

[0074] Furthermore, the current remaining flow is used as the initial remaining flow, that is, the used flow is updated.

[0075] Furthermore, a first real-time bill is obtained, which includes the used traffic and the current balance; the used traffic and the current balance are simulated for cancellation to generate a second real-time bill, which includes the real-time remaining traffic and the real-time balance.

[0076] Step 206: Obtain the total flow and current remaining flow of the terminal.

[0077] In this embodiment, the total traffic of the terminal includes the total traffic of the mobile phone number, the total traffic of the Internet of Things card number, or the total traffic of the industry card number.

[0078] In this embodiment, the current remaining traffic of the terminal includes the current remaining traffic of the mobile phone number, the current remaining traffic of the Internet of Things card number, or the current remaining traffic of the industry card number.

[0079] In this embodiment, the terminal's large traffic package content can be queried according to the terminal identification code, and the large traffic package content includes the total traffic that the terminal can use for free. For example, if the large traffic package content of the terminal is queried to be 30 yuan 60G traffic, then 60G traffic is the total traffic that the terminal can use for free.

[0080] Step 207: Obtain the terminal's traffic expiration time and current time.

[0081] In this embodiment, the terminal's high-volume package content can be queried according to the terminal identification code, and the high-volume package content includes the flow expiration time. For example, if a one-month high-volume package service that takes effect at 0:00 on May 1 is queried, the flow expiration time is 0:00 on June 1.

[0082] For example: the traffic expiration time is 0:00 on June 1, and the current time is 15:23 on May 9.

[0083] Step 208: Determine whether the sum of the current time and the quota period is less than or equal to the traffic expiration time. If so, execute step 209; if not, the process ends.

[0084] In this embodiment, if it is determined that the sum of the current time and the quota period is less than or equal to the traffic expiration time, it indicates that the traffic quota time is sufficient, and step 209 is continued; if it is determined that the sum of the current time and the quota period is greater than the traffic expiration time, it indicates that the traffic is about to expire, no quota is given, and the process ends.

[0085] For example, if the traffic expiration time is 0:00 on June 1, the current time is 15:23 on May 9, the quota period is 30 minutes, and the sum of the current time and the quota period is 15:53 ​​on May 9, which is less than the traffic expiration time, it indicates that the traffic quota time is sufficient, and step 209 is continued.

[0086] For example: the traffic expiration time is 0:00 on June 1st, the current time is 23:33 on May 31st, the quota period is 30 minutes, and the sum of the current time and the quota period is 0:03 on June 1st, which is greater than the traffic expiration time, indicating that the traffic is about to expire and no quota will be allocated, and the process ends.

[0087] Step 209: Query whether the terminal shares the package information.

[0088] In this embodiment, whether the terminal is a shared package information can be queried according to the terminal identification code, and whether the terminal is a shared package information includes a shared package or a non-shared package.

[0089] In this embodiment, the shared package includes two or more terminals sharing the content of one package.

[0090] Step 210: Divide the current remaining flow by the total flow to generate a flow usage ratio.

[0091] Step 211: Generate a traffic quota based on the set dynamic authorization rules, traffic usage ratio, network type, and whether the terminal shares a package.

[0092] In this embodiment, the dynamic authorization rules are mainly established based on the traffic usage ratio as the judgment condition, including: network type, whether to share package information, judgment condition and traffic quota. For example: the dynamic authorization rules are shown in Table 1.

[0093] Table 1

[0094]

[0095] Among them, N1, N2, N3, N4, M1, M2, M3 and M4 are ratio thresholds, which can be set according to actual conditions; X11, X12, X21, X22, X31, X32, X41 and X42 are traffic quotas corresponding to different judgment conditions, and the traffic quota is determined based on the comprehensive assessment results of information such as arrears risk and traffic speed; Min (current remaining traffic, specified default quota) is the smaller value between the current remaining traffic and the specified default quota as the traffic quota.

[0096] For example: If the network type is 4G, the shared package information is a shared package, and the traffic usage ratio is less than N1 and greater than 0, the corresponding traffic quota is X11.

[0097] In this embodiment, dynamic quotas are calculated by reverse calculation through dynamic authorization rules, which increases the flexibility and rationality of traffic quotas, reduces the number of requests for gateway network element information, reduces system pressure and system computing power, reduces storage usage, and saves hardware investment costs.

[0098] In this embodiment, when back-calculating the dynamic quota, dynamic authorization can be performed according to the switching time point without setting the authorization time according to the idle and busy time, thereby avoiding concentrated reporting of messages at the idle and busy switching point and reducing system pressure.

[0099] Step 212: Divide the actual traffic by the current period to generate the Internet access rate.

[0100] Step 213: Match the traffic threshold value according to the Internet access rate and / or network type and / or traffic quota.

[0101] In this embodiment, the corresponding relationship between the Internet access rate and the flow threshold value is preset, and different Internet access rates correspond to different flow threshold values, and the flow threshold value can be matched with the generated Internet access rate. For example: the Internet access rate is set to 120K / s-600K / s, and the corresponding flow threshold value is K5. When the Internet access rate is 400K / s, the flow threshold value is matched to K5.

[0102] As an optional solution, a corresponding relationship table between network type, traffic quota and traffic threshold is set, which is mainly established based on traffic quota as a judgment condition, including network type, judgment condition and traffic threshold, and the corresponding traffic threshold is matched according to network type and traffic quota. For example, the corresponding relationship table between network type, traffic quota and traffic threshold is shown in Table 2.

[0103] Table 2

[0104]

[0105] Among them, Y1 and Y2 are quota thresholds, which can be set according to actual conditions. K1, K2, K3 and K4 are flow threshold values.

[0106] Step 214: Send dynamic cooperation authorization information to the gateway network element. The dynamic cooperation authorization information includes traffic quota and traffic threshold value, so that the gateway network element can allocate traffic quota to the terminal and determine whether the current remaining traffic is less than or equal to the traffic threshold value at a specified time interval. If it is determined that the current remaining traffic is less than or equal to the traffic threshold value, continue to execute step 201.

[0107] In this embodiment, the gateway network element allocates the traffic quota to the terminal for use by the terminal.

[0108] In this embodiment, the specified time interval can be set according to actual conditions.

[0109] In this embodiment, if the gateway network element determines that the current remaining traffic is less than or equal to the traffic threshold value, it indicates that the next dynamic authorization is required, and step 201 is continued to be executed; if it is determined that the current remaining traffic is greater than the traffic threshold value, it indicates that dynamic authorization is not required at present, and the step of determining whether the current remaining traffic is less than or equal to the traffic threshold value according to the specified time interval is continued.

[0110] In this embodiment, the flow threshold value is used as a trigger condition for the terminal to initiate the next dynamic authorization, thereby ensuring the continuity of user use and enhancing user perception.

[0111] In this embodiment, based on the characteristics of high-traffic users, such as large total traffic, frequent traffic usage and long continuous usage time, the accuracy of traffic billing is guaranteed, the speed of traffic quota is accelerated, and the efficiency of traffic quota is greatly improved.

[0112] In the technical solution of the method for generating a traffic quota provided in an embodiment of the present invention, the total traffic and the current remaining traffic of the terminal are obtained; whether the terminal shares the package information is queried; the dynamic quota is reversely calculated based on whether the terminal shares the package information, the obtained network type, the total traffic and the current remaining traffic, and the traffic quota is generated, which can improve the efficiency of the traffic quota.

[0113] Figure 3 A schematic diagram of a flow quota generation device provided in an embodiment of the present invention, wherein the device is used to execute the flow quota generation method described above, such as Figure 3 As shown, the device includes: a first acquiring unit 11, a querying unit 12 and a first generating unit 13.

[0114] The first acquisition unit 11 is used to acquire the total flow and current remaining flow of the terminal.

[0115] The query unit 12 is used to query whether the terminal shares package information.

[0116] The first generating unit 13 is used to calculate the dynamic quota based on the information of whether the terminal shares the package, the acquired network type, the total traffic and the current remaining traffic, and generate the traffic quota.

[0117] In an embodiment of the present invention, the first generating unit 13 is specifically used to divide the current remaining traffic by the total traffic to generate a traffic usage ratio; through the set dynamic authorization rules, a traffic quota is generated according to the traffic usage ratio, the network type and whether the terminal shares the package information.

[0118] In the embodiment of the present invention, the device further includes: a first judging unit 14 , a second acquiring unit 15 and a second generating unit 16 .

[0119] The first judgment unit 14 is used to judge whether the difference between the generated large flow judgment coefficient and the acquired initial residual flow is greater than or equal to a set difference threshold.

[0120] The second acquisition unit 15 is used to acquire the actual flow used by the terminal in the current cycle if it is determined that the difference between the large flow determination coefficient and the initial remaining flow is greater than or equal to the difference threshold.

[0121] The second generating unit 16 is used to subtract the actual flow from the acquired initial remaining flow to generate the current remaining flow, and trigger the second acquiring unit 15 to continue to execute the steps of acquiring the total flow and the current remaining flow of the terminal.

[0122] In the embodiment of the present invention, the device further includes: a receiving unit 17 and a third generating unit 18 .

[0123] The receiving unit 17 is used to receive the quota request information sent by the gateway network element, where the quota request information includes the network type of the terminal.

[0124] The third generating unit 18 generates a large traffic determination coefficient according to the network type, the set rate of network traffic, the set quota period and the set minimum traffic quota.

[0125] In the embodiment of the present invention, the device further includes: a third obtaining unit 19 and a second determining unit 20.

[0126] The third acquisition unit 19 is used to acquire the flow expiration time and current time of the terminal.

[0127] The second judgment unit 20 is used to judge whether the sum of the current time and the quota period is less than or equal to the traffic expiration time; if it is judged that the sum of the current time and the quota period is less than or equal to the traffic expiration time, the query unit 12 is triggered to continue to execute the step of querying whether the terminal shares the package information.

[0128] In the embodiment of the present invention, the device further includes: a fourth generating unit 21 , a matching unit 22 and a sending unit 23 .

[0129] The fourth generating unit 21 is used to divide the actual traffic by the current period to generate an Internet access rate.

[0130] The matching unit 22 is used to match the flow threshold value according to the Internet access rate and / or the network type and / or the flow quota.

[0131] The sending unit 23 is used to send dynamic cooperation authorization information to the gateway network element. The dynamic cooperation authorization information includes traffic quota and traffic threshold value, so that the gateway network element can allocate the traffic quota to the terminal and determine whether the current remaining traffic is less than or equal to the traffic threshold value according to the specified time interval. If it is determined that the current remaining traffic is less than or equal to the traffic threshold value, the receiving unit 17 is triggered to continue to execute the step of receiving the request quota information sent by the gateway network element.

[0132] In an embodiment of the present invention, the third generation unit 18 is specifically used to obtain the weight corresponding to the network type; through the formula L`=(K+S)×VT+LN, the weight corresponding to the network type, the rate of network traffic, the quota period, and the minimum traffic quota are calculated to generate a large traffic judgment coefficient, wherein L` is the large traffic judgment coefficient, K is the weight corresponding to the network type, S is the rate of network traffic, VT is the quota period, and LN is the minimum traffic quota.

[0133] In the scheme of the embodiment of the present invention, the total traffic and the current remaining traffic of the terminal are obtained; the information on whether the terminal shares a package is queried; the dynamic quota is calculated based on the information on whether the terminal shares a package, the obtained network type, the total traffic and the current remaining traffic, and the traffic quota is generated, which can improve the efficiency of the traffic quota.

[0134] An embodiment of the present invention provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the embodiment of the above-mentioned method for generating a traffic quota. For a specific description, please refer to the embodiment of the above-mentioned method for generating a traffic quota.

[0135] An embodiment of the present invention provides a computer device, including a memory and a processor, the memory is used to store information including program instructions, the processor is used to control the execution of the program instructions, and when the program instructions are loaded and executed by the processor, the steps of the embodiment of the above-mentioned method for generating a traffic quota are implemented. For a specific description, please refer to the embodiment of the above-mentioned method for generating a traffic quota.

[0136] Figure 4 A schematic diagram of a computer device provided by an embodiment of the present invention. Figure 4As shown, the computer device 30 of this embodiment includes: a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and executable on the processor 31. When the computer program 33 is executed by the processor 31, the method for generating a flow quota in the embodiment is implemented. To avoid repetition, it is not described one by one here. Alternatively, when the computer program is executed by the processor 31, the functions of each model / unit in the device for generating a flow quota in the embodiment are implemented. To avoid repetition, it is not described one by one here.

[0137] The computer device 30 includes, but is not limited to, a processor 31 and a memory 32. Those skilled in the art will appreciate that Figure 4 This is only an example of the computer device 30 and does not constitute a limitation of the computer device 30. The computer device 30 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0138] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DP), application-specific integrated circuits (AIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0139] The memory 32 may be an internal storage unit of the computer device 30, such as a hard disk or memory of the computer device 30. The memory 32 may also be an external storage device of the computer device 30, such as a plug-in hard disk, a smart memory card (MC), a secure digital (D) card, a flash memory card, etc. equipped on the computer device 30. Further, the memory 32 may also include both an internal storage unit of the computer device 30 and an external storage device. The memory 32 is used to store computer programs and other programs and data required by the computer device. The memory 32 may also be used to temporarily store data that has been output or is to be output.

[0140] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0142] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating a traffic quota, characterized in that: The method comprises: Get the total traffic and current remaining traffic of the terminal; Querying whether the terminal shares package information; Reversely calculate the dynamic quota based on whether the terminal shares the package information, the acquired network type, the total traffic and the current remaining traffic to generate a traffic quota; Among them, the dynamic quota is calculated in reverse according to whether the terminal shares the package information, the network type, the total traffic and the current remaining traffic to generate the traffic quota, including: dividing the current remaining traffic by the total traffic to generate a traffic usage ratio; through the set dynamic authorization rules, the traffic quota is generated according to the traffic usage ratio, the network type and whether the terminal shares the package information.

2. The method according to claim 1, characterized in that Before obtaining the total flow and the current remaining flow of the terminal, the method further includes: Determine whether the difference between the generated large flow determination coefficient and the obtained initial residual flow is greater than or equal to a set difference threshold; If it is determined that the difference between the large flow determination coefficient and the initial remaining flow is greater than or equal to the difference threshold, obtaining the actual flow used by the terminal in the current cycle; The actual flow is subtracted from the obtained initial remaining flow to generate the current remaining flow, and the step of obtaining the total flow of the terminal and the current remaining flow is continued.

3. The method according to claim 2, characterized in that Before judging whether the difference between the generated large flow determination coefficient and the obtained initial residual flow is greater than or equal to the set difference threshold, the method further includes: Receiving request quota information sent by a gateway network element, wherein the request quota information includes a network type of the terminal; The large traffic determination coefficient is generated according to the network type, the set network traffic rate, the set quota period and the set minimum traffic quota.

4. The method according to claim 3, characterized in that Before querying whether the terminal shares the package information, the method further includes: Obtaining the flow expiration time and current time of the terminal; Determine whether the sum of the current time and the quota period is less than or equal to the traffic expiration time; If it is determined that the sum of the current time and the quota period is less than or equal to the traffic expiration time, continue to execute the step of querying whether the terminal shares the package information.

5. The method according to claim 3, characterized in that: After the dynamic quota is calculated based on the information of whether the terminal shares a package, the network type, the total traffic, and the current remaining traffic to generate the traffic quota, the method further includes: Divide the actual traffic by the current period to generate an Internet access rate; Matching a traffic threshold value according to the Internet access rate and / or the network type and / or the traffic quota; Send dynamic cooperation authorization information to the gateway network element, the dynamic cooperation authorization information including the traffic quota and the traffic threshold value, so that the gateway network element allocates the traffic quota to the terminal and determines whether the current remaining traffic is less than or equal to the traffic threshold value at a specified time interval. If it is determined that the current remaining traffic is less than or equal to the traffic threshold value, continue to execute the step of receiving the request quota information sent by the gateway network element.

6. The method according to claim 3, characterized in that: The generating of a large flow determination coefficient according to the network type, the set network flow rate, the set quota period and the set minimum flow quota includes: Obtaining a weight corresponding to the network type; The formula L`=(K+S)×VT+LN is used to calculate the weight corresponding to the network type, the rate of the network traffic, the quota period, and the minimum traffic quota to generate a large traffic judgment coefficient, wherein L` is the large traffic judgment coefficient, K is the weight corresponding to the network type, S is the rate of the network traffic, VT is the quota period, and LN is the minimum traffic quota.

7. A flow quota generation device, characterized in that: The device comprises: A first acquisition unit, used to acquire the total flow and current remaining flow of the terminal; A query unit, used to query whether the terminal shares package information; A first generating unit, configured to reversely calculate a dynamic quota based on information about whether the terminal shares a package, the acquired network type, the total traffic, and the current remaining traffic, and generate a traffic quota; Among them, the dynamic quota is calculated in reverse according to whether the terminal shares the package information, the network type, the total traffic and the current remaining traffic to generate the traffic quota, including: dividing the current remaining traffic by the total traffic to generate a traffic usage ratio; through the set dynamic authorization rules, the traffic quota is generated according to the traffic usage ratio, the network type and whether the terminal shares the package information.

8. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the method for generating a traffic quota according to any one of claims 1 to 6.

9. A computer device comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, the method for generating the traffic quota described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method, server and system for dispatching group shared traffic

    CN102255813A

  • Flow regulation and control method, device and system

    CN105813047A