Bandwidth bill generation method, device, electronic device and medium
The method addresses the lack of department-specific bandwidth billing by grouping billing objects and calculating department-specific bills, enabling accurate and flexible bandwidth cost management.
Patent Information
- Application Number
- CN202010950844.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-11
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-09-11
AI Technical Summary
Existing bandwidth bill generation methods fail to provide flexible and accurate billing for individual departments within an enterprise, as they only generate a total bandwidth bill without considering department-specific usage.
A bandwidth bill generating device.
Enables the generation of refined bandwidth bills for individual departments by calculating the proportion of the total bill, allowing enterprises to accurately track and manage bandwidth resource usage and costs.
Smart Images

Figure CN114189461B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and more specifically, to a bandwidth bill generation method, device, electronic device and medium. Background Art
[0002] With the continuous development of Internet technology, more and more companies are using cloud products, such as cloud servers, content delivery networks (CDNs), and cloud high-defense products, to improve the access speed and security of enterprise applications.
[0003] At present, when electronic devices, such as billing servers or billing terminal devices, charge cloud products used by enterprises, they can generally charge and provide bills to enterprises based on the peak value of bandwidth resources used by billing objects in the enterprise in the cloud products, where the billing objects can be one or more of the domain names (Domain Names), Internet Protocol addresses (IP addresses, Internet Protocol Addresses) and other objects created by the enterprise in the cloud products. For example, for a content distribution network, an enterprise usually creates multiple domain names in the content distribution network. Therefore, when it is necessary to provide a bandwidth bill to the enterprise at the end of the month, the electronic device generally obtains the instantaneous peak value of bandwidth resources used by all domain names created by the enterprise, and obtains the billing peak value for billing according to certain rules based on the instantaneous peak value, thereby generating a bandwidth bill based on the billing peak value and providing the bandwidth bill to the enterprise.
[0004] However, an enterprise generally includes multiple departments, and different departments may use the bandwidth resources of cloud products. However, current electronic devices can only generate a total bandwidth bill when generating bandwidth bills, but cannot flexibly and accurately generate refined bandwidth bills. This results in the enterprise being unable to accurately count the bandwidth resource usage and usage costs of each department. Therefore, it is necessary to provide a new bandwidth bill generation method so that electronic devices can flexibly and accurately generate refined bandwidth bills. Summary of the invention
[0005] One object of the disclosed embodiments is to provide a new technical solution for generating bandwidth bills.
[0006] According to a first aspect of the present disclosure, a bandwidth bill generation method is provided, the method comprising:
[0007] Obtaining the total flow and total bill of bandwidth resources used by the target object, wherein the target object includes at least one billing group, and the billing group includes at least one billing object;
[0008] Acquire a first group flow of a first billing group, wherein the first billing group is any one of the at least one billing group, and the first group flow is a cumulative sum of flows of bandwidth resources used by billing objects in the first billing group;
[0009] A first bill is generated according to the first packet traffic, the total traffic, and the total bill, wherein the first bill is a bandwidth bill corresponding to the first billing group.
[0010] Optionally, generating a first bill according to the first group traffic, the total traffic and the total bill includes:
[0011] Calculate the proportion of the first group flow in the total flow;
[0012] The first bill is generated by calculating the product of the percentage value and the total bill.
[0013] Optionally, the billing group is obtained by:
[0014] Obtaining group identification information of the billing object in the target object;
[0015] The billing objects in the target object are grouped according to the group identification information to obtain the billing group.
[0016] Optionally, the group identification information includes at least one of the following: department information of the department to which the billing object belongs, and project information of the project to which the billing object belongs.
[0017] Optionally, obtaining a total bill of bandwidth resources used by the target object includes:
[0018] Receiving bandwidth resource billing message;
[0019] Obtaining the billing start and end time according to the bandwidth resource billing message;
[0020] Fitting the peak value of the bandwidth resources used by the target object within the billing start and end time range to obtain a peak sequence corresponding to the target object;
[0021] From the peak sequence, a peak that meets a preset condition is obtained as a target peak;
[0022] The total bill is calculated based on the target peak value.
[0023] Optionally, the total flow is the total flow of bandwidth resources used by the target object within the billing start and end time range, and the first group flow is the accumulated sum of the flow of bandwidth resources used by the billing object in the first billing group within the billing start and end time range.
[0024] Optionally, the method is applied to a server, and the method further includes:
[0025] The first bill is provided to a terminal device, wherein the terminal device is used to display the first bill.
[0026] Optionally, the billing object includes at least one of the following: a domain name, an Internet Protocol address.
[0027] According to a second aspect of the present disclosure, there is also provided a bandwidth bill generating device, comprising:
[0028] A total bill acquisition module, used to acquire the total flow and total bill of the bandwidth resources used by the target object, wherein the target object includes at least one billing group, and the billing group includes at least one billing object;
[0029] A packet flow acquisition module, configured to acquire a first packet flow of a first billing group, wherein the first billing group is any one of the at least one billing group, and the first packet flow is a flow accumulation sum of bandwidth resources used by a billing object in the first billing group;
[0030] The bandwidth bill generating module is used to generate a first bill according to the first group traffic, the total traffic and the total bill, wherein the first bill is a bandwidth bill corresponding to the first billing group.
[0031] According to a third aspect of the present disclosure, there is further provided an electronic device, comprising the apparatus according to the second aspect; or,
[0032] The electronic device comprises:
[0033] A memory for storing executable instructions;
[0034] A processor is used to operate the electronic device to execute the method as described in any one of the first aspects under the control of the instructions.
[0035] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method as described in any one of the first aspects when read and executed by the computer.
[0036] According to an embodiment of the present disclosure, after obtaining the total flow and total bill of the bandwidth resources used by the target object, the electronic device can obtain any first billing group for which a refined bill is to be issued from the billing group of the target object, and obtain the first group flow of the first billing group, and generate a first bill corresponding to the first billing group through the first group flow, the total flow and the total bill. This method can flexibly and accurately generate a refined bandwidth bill.
[0037] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0039] Figure 1 is a schematic diagram of an existing bandwidth bill generation process.
[0040] Figure 2 The schematic block diagram shows the hardware configuration of a server that can be used to implement the bandwidth bill generation method according to one embodiment.
[0041] Figure 3 The figure is a flow chart of a method for generating a bandwidth bill according to an embodiment.
[0042] Figure 4 is a schematic diagram of a bandwidth bill generation process according to one embodiment.
[0043] Figure 5 It is a principle block diagram of a bandwidth bill generating device according to an embodiment.
[0044] Figure 6 is a schematic diagram of the hardware structure of an electronic device according to an embodiment. DETAILED DESCRIPTION
[0045] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0046] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0047] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0048] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0049] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0050] Please see Figure 1 , which is a schematic diagram of the existing bandwidth bill generation process. Figure 1 As shown, in the cloud platform, when the electronic device generates the bandwidth bill of the enterprise, for each billing object of the enterprise, for example, billing object 1, billing object 2...billing object m, where m is an integer greater than 0, and the billing object can be an object that uses bandwidth resources such as the domain name or IP address of the enterprise, the electronic device can obtain the instantaneous peak value of the bandwidth resources used by each billing object respectively, and obtain the peak value of the enterprise at different time points within the billing start and end time by fitting the instantaneous peak values of different billing objects at the same time point, and can select the maximum value or 95 peak values or other peak values among these peak values as the billing peak value for generating the bandwidth bill, so as to calculate the total bill of the enterprise according to the billing peak value, that is, the bandwidth bill of the bandwidth resources used by all billing objects of the enterprise within the billing start and end time range.
[0051] It should be noted that the 95th peak value corresponds to the 95th percentile charging, which means that for the peak value of the bandwidth resources used by the billing object, within the billing start and end time range, a valid peak value is taken at every preset time interval and arranged in descending order to obtain a peak sequence, and then the 5% peak values with higher values in the peak sequence are removed, and the remaining higher bandwidth is used as the billing peak value for billing. For example, taking the billing start and end time as 1 month and 30 days as an example, the peak values of the bandwidth resources used by the default billing object are all valid peak values; for the peak value of the bandwidth resources used by the billing object, a peak value is taken every 5 minutes, then 12 peak values can be obtained per hour, and the peak values that can be obtained per month are: 12*24*30=8640. After all the peak values are arranged in descending order, the first 5%, that is, 8640*5%=432 peak values are removed, that is, the 433rd point can be used as the billing peak value for generating the bandwidth bill.
[0052] The existing bandwidth generation method combines the instantaneous peak values of bandwidth resources used by all billing objects when generating bandwidth bills, and provides a total bill on an enterprise basis, but cannot generate detailed bandwidth bills in a targeted manner according to the needs of the enterprise. Therefore, the existing bandwidth generation method is not flexible and accurate enough.
[0053] In response to the above problems, this embodiment provides a bandwidth bill generation method. When an electronic device needs to generate an enterprise's bandwidth bill, the total traffic and the total bill of the bandwidth resources used by the target object can be obtained first, wherein the target object includes at least one billing group, and each billing group includes at least one billing object; thereafter, any first billing group for which a refined bill is to be issued can be obtained from the billing group of the target object, as well as the first group traffic of the first billing group; thereafter, through the first group traffic, the total traffic and the total bill, the electronic device can flexibly and accurately generate the first bill corresponding to the first billing group.
[0054] <Hardware Configuration>
[0055] Please see Figure 2 , which is a principle block diagram showing the hardware configuration of a server that can be used to implement a bandwidth generation method according to an embodiment.
[0056] like Figure 2 As shown, the server 2000 may include a processor 2100, a memory 2200, an interface device 2300, a communication device 2400, a display device 2500, and an input device 2600. The processor 2100 may be, for example, a central processing unit CPU, etc. The memory 2200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 2300 may include, for example, a USB interface, a serial interface, etc. The communication device 2400 may be, for example, capable of wired or wireless communication. The display device 2500 may be, for example, a liquid crystal display screen. The input device 2600 may include, for example, a touch screen, a keyboard, etc.
[0057] In this embodiment, the server 2000 may be used to participate in implementing the bandwidth bill generation method according to any embodiment of the present disclosure.
[0058] As used in the embodiments of the present disclosure, the memory 2200 of the server 2000 is used to store instructions, and the instructions are used to control the processor 2100 to operate to support the implementation of the bandwidth bill generation method according to any embodiment of the present disclosure. The technician can design instructions according to the scheme disclosed in the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.
[0059] It should be understood by those skilled in the art that although Figure 22 shows multiple devices of the server 2000, but the server 2000 of the embodiment of the present disclosure may only involve some of the devices, for example, only the processor 2100 and the memory 2200. This is well known in the art and will not be repeated here.
[0060] <Method Example>
[0061] Please see Figure 3 , which is a flow chart of a bandwidth bill generation method according to an embodiment. The bandwidth bill generation method provided in this embodiment can be applied to a server of a cloud platform, for example, Figure 2 Alternatively, it can also be applied to a terminal device that can communicate with a cloud platform, wherein the cloud platform includes at least one cloud product, and the billing object uses the network resources in the cloud product through bandwidth resources. The cloud product can be one or more of a cloud server, a content distribution network, and a cloud high-defense product. Figure 3 As shown, the method may include the following steps S3100-S3300, which are described in detail below.
[0062] Step S3100, obtaining the total flow and total bill of the bandwidth resources used by the target object, wherein the target object includes at least one billing group, and the billing group includes at least one billing object.
[0063] The target object is a billing object created by the user in the cloud product of the cloud platform. In this embodiment, in order to enable the electronic device to flexibly provide bandwidth bills to users, the target object is an object including at least one billing group, and each billing group includes at least one billing object.
[0064] It should be noted that, in this embodiment, the user may be a corporate user or an individual user. For the convenience of description, in this embodiment, the user is an corporate user as an example.
[0065] The billing object includes at least one of the following: a domain name, an Internet Protocol address.
[0066] A domain name, also known as a network domain, is the name of a computing device or a group of computing devices on the Internet, which is composed of a string of names separated by dots. It is used to locate the computing device (sometimes also refers to the geographical location) during data transmission. For example, a domain name can be "baidu.com", "sina.com", etc. In practice, since IP addresses are inconvenient to remember and cannot display the name and nature of the address organization, domain names can be used to conveniently identify computing devices. When a user accesses a computing device through a domain name, the domain name is resolved to obtain the IP address corresponding to the computing device, allowing users to access the network more conveniently.
[0067] Specifically, in order to address the problem that the existing bandwidth bill generation method can only obtain a total bandwidth bill of a user, such as an enterprise, but cannot flexibly and accurately generate a refined bandwidth bill according to the needs of the enterprise, this embodiment, when generating a bandwidth bill, pre-groups the billing objects for the target objects to obtain at least one billing group, and when it is necessary to generate a refined bandwidth bill, generates a bandwidth bill corresponding to each billing group through the obtained total bill and total traffic, as well as the group traffic corresponding to any billing group, so that the enterprise can accurately count the bandwidth resource costs of various departments or projects within the enterprise based on the refined bandwidth bill provided by the electronic device.
[0068] In a specific implementation, the billing group can be obtained by the following method: acquiring group identification information of the billing objects in the target object; and grouping the billing objects in the target object according to the group identification information to obtain the billing group.
[0069] The group identification information is information used to uniquely identify the billing group to which the billing object belongs. The group identification information can be set by the user when creating the billing object. For example, when the user creates a domain name in the content distribution network, the corresponding group identification information can be set for the domain name at the same time; of course, the group identification information can also be set as needed after the user creates the billing object; or after setting the group identification information, the set group identification information can be modified as needed; or, the group identification information of the billing object can be set using other methods or at other time points, which will not be repeated here.
[0070] In this embodiment, the group identification information includes at least one of the following: department information of the department to which the billing object belongs, and project information of the project to which the billing object belongs.
[0071] For example, when the billing object is a domain name, the group identification information may be the department information of the department to which the domain name belongs, wherein the department information is used to uniquely identify a department, for example, the department information may be the department ID of the department; in addition, the group identification information may also be the project information of the project to which the domain name belongs, wherein the project information is used to uniquely identify a project, for example, the project information may be the project ID of the project. Of course, in specific implementation, the group identification information may also be set according to actual needs, and no special limitation is made here.
[0072] Specifically in this step, obtaining the total bill of the bandwidth resources used by the target object includes: receiving a bandwidth resource billing message; obtaining the billing start and end time according to the bandwidth resource billing message; fitting the peak value of the bandwidth resources used by the target object within the billing start and end time range to obtain a peak sequence corresponding to the target object; from the peak sequence, obtaining a peak value that meets preset conditions as a target peak value; and calculating the total bill according to the target peak value.
[0073] In a specific implementation, a timer can be set in the electronic device, and the timer is triggered at the beginning or end of each month to generate a bandwidth resource billing message. After the electronic device receives the bandwidth resource billing message, the bandwidth bill generation process is triggered. It should be noted that in a specific implementation, the bandwidth resource billing message can also be generated by other electronic devices that are connected to the electronic device for communication and sent to the electronic device, which will not be repeated here.
[0074] After the electronic device receives the bandwidth resource billing message, in order to provide the user with a refined bandwidth bill, the electronic device can first obtain the total traffic and total bill of the bandwidth resources used by the target object, where the total traffic is the cumulative sum of the traffic of the bandwidth resources used by the domain names in the target object, specifically the cumulative sum of the traffic of the bandwidth resources used by the target object within the billing start and end time range.
[0075] The billing start and end time can be obtained after the electronic device receives the bandwidth resource billing message according to the message. For example, the billing start and end time can be obtained directly from the bandwidth resource billing message, or the billing start and end time can be calculated according to a preset rule.
[0076] For example, when an electronic device generates a bandwidth bill for a domain name in a target object for this month at the end of a month, then after receiving the message, the electronic device can use the start and end time of this month as the billing start and end time; of course, when the electronic device generates a bandwidth bill for a domain name in a target object for last month at the beginning of a month, the billing start and end time can be the start and end time of last month.
[0077] Of course, in specific implementation, the user may also specify the billing start and end time. For example, a setting interface for setting the billing start and end time may be provided, and the billing start and end time set by the user may be received through the interface, which will not be repeated here.
[0078] In this embodiment, the peak value of the bandwidth resources used by the target object within the billing start and end time range is fitted by adding the peak values of the bandwidth resources used by different billing objects in the target object at the same time point to obtain the peak value corresponding to the target object at the time point.
[0079] For example, it is assumed that the target object includes two billing groups, namely billing group 1 and billing group 2, wherein the billing objects in billing group 1 are domain name 11 and domain name 12, and the billing object in billing group 2 is domain name 23, and on zz / yy / xxxx, the peak values of bandwidth resources used by domain name 11, domain name 12 and domain name 23 at 9:00, 9:05 and 9:10 are (100Mbps, 50Mbps, 30Mbps), (30Mbps, 80Mbps, 60Mbps) and (200Mbps, 120Mbps, 10Mbps) respectively. Then, by fitting the peak values of all billing objects in the target object at the same time point, for example, by adding them together, the fitted peak values corresponding to the target object at the three time points are (330Mbps, 250Mbps, 100Mbps), wherein the bit rate (bps, BitPerSecond) is a unit corresponding to the peak value, which is used to describe the number of bits transmitted per second by the bandwidth. The higher the bit rate, the greater the amount of data transmitted per unit time.
[0080] Of course, in specific implementation, other methods may also be used to fit the peak values of bandwidth resources used by different billing objects of the same user at the same time point, which is not specifically limited here.
[0081] It should be noted that, in this embodiment, for the convenience of explanation, only the peak values at three time points are used as an example for illustration. In specific implementation, the number of specific time points can be set as needed and is not specifically limited here.
[0082] After fitting to obtain the peak value set corresponding to different time points of the target object within the billing start and end time range, the peak value sequence corresponding to the target object can be obtained by performing descending processing on the peak values in the peak value set.
[0083] After obtaining the peak sequence corresponding to the target object, a peak that meets the preset conditions can be obtained from the peak sequence as the target peak, where the preset condition can be the maximum value or the 95th peak in the peak sequence. Of course, in the specific implementation, the preset condition can also be set as needed, and no special limitation is made here.
[0084] After the target peak value is obtained, the total bill can be calculated according to the target peak value. Specifically, the total bill can be calculated according to certain billing rules.
[0085] In practice, tiered charges are generally made according to bandwidth peak values. For example, within the range of "0 to 500 Mbps (inclusive)", the corresponding charging rule may be 0.6 yuan / Mbps / day; within the range of "500 to 5 Gbps (inclusive)", the corresponding charging rule may be 0.5 yuan / Mbps / day; therefore, when the target peak value is 600 Mbps, and the billing start and end time is "xxxx-yy-01 00:00:00 to xxxx-yy-30 23:59:59", that is, the billing period is 30 days, the total bill is: (500*0.6*30)+(100*0.5 yuan*30)=10,500 yuan.
[0086] Corresponding to the total bill, in this embodiment, the total traffic is the total traffic of bandwidth resources used by the target object within the billing start and end time range.
[0087] For example, the target object includes a billing group, and the billing objects in the billing group are domain name 1, domain name 2, and domain name 3. The traffic used by domain name 1 within the billing start and end time range is 100G, the traffic used by domain name 2 within the billing start and end time range is 30G, and the traffic used by domain name 3 within the billing start and end time range is 200G. The total traffic = 100+30+200=330G.
[0088] After step S3100, step S3200 is executed to obtain the first group flow of the first billing group, wherein the first billing group is any one of the at least one billing group, and the first group flow is the accumulated sum of the flow of the bandwidth resources used by the billing objects in the first billing group.
[0089] The first billing group may be any group in at least one billing group of the target object. For example, when bandwidth bills for different departments of an enterprise need to be generated, the billing group in the target object may be at least one billing group obtained using department information as group identification information. By generating the first bill corresponding to each billing group, a bandwidth bill corresponding to the department may be generated.
[0090] The first group traffic is the cumulative sum of the traffic of the bandwidth resources used by the billing objects in the first billing group. Of course, corresponding to the method for obtaining the total bill of the target object in the above step S3100, the first group traffic can be the cumulative sum of the traffic of the bandwidth resources used by the billing objects in the first billing group within the billing start and end time range.
[0091] Step S3300: Generate a first bill according to the first group traffic, the total traffic and the total bill, wherein the first bill is a bandwidth bill corresponding to the first billing group.
[0092] After the total traffic and total bill of the target object are obtained in step S3100, and the first group traffic of the first billing group is obtained in step S3200, a first bill corresponding to the first billing group can be generated based on the total traffic, the total bill and the first group traffic.
[0093] Specifically, generating the first bill according to the first packet traffic, the total traffic and the total bill includes: calculating the proportion of the first packet traffic in the total traffic; and generating the first bill by calculating the product of the proportion and the total bill.
[0094] Please see Figure 4 , which is a schematic diagram of a bandwidth bill generation process according to one embodiment. Figure 4 As shown, the target object includes three billing groups, namely billing group 1, billing group 2 and billing group 3, wherein billing group 1 includes billing objects 11 and 12, billing group 2 includes billing objects 21 and 22, and billing group 3 includes billing object 31; and the total bill of the target object is 2000 yuan, the total flow is 1900G, and the flow of bandwidth resources used by other billing objects is shown in the figure; then the bandwidth bill corresponding to the billing group can be obtained by obtaining the cumulative flow of bandwidth resources used by all billing objects in the billing group, that is, the group flow, and by multiplying the proportion of the group flow in the total flow with the total bill, the bandwidth bill corresponding to the billing group can be generated. For example, for billing group 1, according to the calculation, it can be obtained that the corresponding group flow is 100+200=300G, then its bandwidth bill, that is, bill 1 is: (300 / 1900)*2000=315.789 yuan.
[0095] It should be noted that in this embodiment, after calculating the total bill of the target object, the bandwidth bill corresponding to the billing group is obtained by calculating the percentage of the packet traffic used by the billing group in the total traffic. However, when the peak value of the bandwidth resources used by a certain billing group is relatively stable, this method may lead to inaccurate statistics. For example, the target peak value for calculating the total bill is 600Mbps, but the average peak value of billing group 1 is 50Mbps. When generating the bandwidth bill corresponding to the billing group based on the percentage of the packet traffic of each billing group in the total traffic, there are problems of inaccuracy and fairness.
[0096] In order to solve this problem, in a specific implementation, before implementing the method, the first average peak value corresponding to the first billing group can be obtained in advance, wherein the first average peak value is the average value of the peak values of the domain names in the first billing group within the billing start and end time range; the absolute value of the difference between the first average peak value and the target peak value is obtained, and when the absolute value of the difference is less than the preset difference threshold, the first first group flow is obtained; the first bill is generated according to the first group flow, the total flow and the total bill. And
[0097] When the absolute value of the difference is less than a preset difference threshold, the cumulative sum of the group peaks of all billing groups in the target object is obtained; and the first group peak of the first billing group is obtained; and the first bill of the first domain name group is generated according to the first group peak, the cumulative sum and the total bill.
[0098] Among them, the group peak of the billing group is the peak value of the bandwidth resources used by the domain name in the billing group. The group peak is obtained by the following method: fitting the peak values of all domain names in the billing group within the billing start and end time range to obtain a group peak sequence, and based on the group peak sequence, obtaining a peak that meets preset conditions as the group peak.
[0099] It should be noted that, in this embodiment, the electronic device executing the method may be a server. After the server uses the above method to obtain the first bill for each billing group in the target object, the method also includes: providing the first bill to a terminal device, wherein the terminal device is used to display the first bill.
[0100] According to the above steps S3100-S3300, after the electronic device obtains the total flow and total bill of the bandwidth resources used by the target object, the method of this embodiment can obtain any first billing group to be issued for a refined bill from the billing group of the target object, and obtain the first group flow of the first billing group, and generate the first bill corresponding to the first billing group through the first group flow, the total flow and the total bill. This method can flexibly and accurately generate a refined bandwidth bill.
[0101] <Device Example>
[0102] In this embodiment, a bandwidth bill generating device is also provided, which can be applied to electronic devices, for example, Figure 2 In the server 2000 shown in FIG. Figure 5 As shown, the device 5000 may include a total bill acquisition module 5100 , a packet traffic acquisition module 5200 , and a bandwidth bill generation module 5300 .
[0103] The total bill acquisition module 5100 is used to acquire the total flow and the total bill of the bandwidth resources used by the target object, wherein the target object includes at least one billing group, and the billing group includes at least one billing object.
[0104] In one embodiment, the device 5000 further includes a billing group obtaining module, which is used to obtain group identification information of the billing objects in the target object; and group the billing objects in the target object according to the group identification information to obtain the billing group.
[0105] In one embodiment, when the total bill acquisition module 5100 is used to obtain the total bill of the bandwidth resources used by the target object, it can be used to: receive a bandwidth resource billing message; obtain the billing start and end time according to the bandwidth resource billing message; fit the peak value of the bandwidth resources used by the target object within the billing start and end time range to obtain a peak sequence corresponding to the target object; from the peak sequence, obtain a peak value that meets preset conditions as a target peak value; and calculate the total bill according to the target peak value.
[0106] The packet flow module 5200 is used to obtain the first packet flow of the first billing group, wherein the first billing group is any one of the at least one billing group, and the first packet flow is the accumulated flow of the bandwidth resources used by the billing objects in the first billing group.
[0107] The bandwidth bill generating module 5300 is used to generate a first bill according to the first group traffic, the total traffic and the total bill, wherein the first bill is a bandwidth bill corresponding to the first billing group.
[0108] In one embodiment, when the bandwidth bill generation module 5300 is used to generate a first bill based on the first packet traffic, the total traffic and the total bill, it can be used to: calculate the proportion of the first packet traffic in the total traffic; and generate the first bill by calculating the product of the proportion and the total bill.
[0109] In one embodiment, the apparatus 5000 can be applied to a server, and the apparatus further includes a first bill providing module, which is used to provide the first bill to a terminal device, wherein the terminal device is used to display the first bill.
[0110] <Equipment Embodiment>
[0111] In this embodiment, an electronic device is further provided, which may include the bandwidth bill generating device 5000 according to any embodiment of the present disclosure, and is used to implement the bandwidth bill generating method according to any embodiment of the present disclosure.
[0112] like Figure 6 As shown, the electronic device 6000 may also include a processor 6200 and a memory 6100, wherein the memory 6100 is used to store executable instructions; the processor 6200 is used to operate the electronic device according to the control of the instructions to execute the bandwidth bill generation method according to any embodiment of the present disclosure.
[0113] Each module of the above device 5000 can be implemented by the processor 6200 running the instruction to execute the bandwidth bill generation method according to any embodiment of the present disclosure.
[0114] The electronic device 6000 may be a server. For example, the electronic device 6000 may be Figure 2 Server 2000, etc.
[0115] <Medium Example>
[0116] In this embodiment, a computer-readable storage medium is further provided, which stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method described in any of the above embodiments of the present disclosure when read and executed by the computer.
[0117] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0118] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0119] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0120] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0121] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0122] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0124] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0125] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.
Claims
1. A bandwidth bill generation method, characterized in that: include: Obtaining the total flow and total bill of bandwidth resources used by the target object, wherein the target object includes at least one billing group, and the billing group includes at least one billing object; Acquire a first group flow of a first billing group, wherein the first billing group is any one of the at least one billing group, and the first group flow is a cumulative sum of flows of bandwidth resources used by billing objects in the first billing group; generating a first bill according to the first packet flow, the total flow and the total bill, wherein the first bill is a bandwidth bill corresponding to the first billing group, The step of obtaining a total bill of bandwidth resources used by the target object includes: Receiving bandwidth resource billing message; Obtaining the billing start and end time according to the bandwidth resource billing message; Fitting the peak value of the bandwidth resources used by the target object within the billing start and end time range to obtain a peak sequence corresponding to the target object; From the peak sequence, a peak that meets a preset condition is obtained as a target peak; According to the target peak value, the total bill is calculated, Before the step of generating a first bill according to the first packet traffic, the total traffic and the total bill, the method further includes: Obtain a first average peak value corresponding to the first billing group, wherein the first average peak value is the average value of the peak values of the billing objects in the first billing group within the billing start and end time range; obtain the absolute value of the difference between the first average peak value and the target peak value, and when the absolute value of the difference is less than a preset difference threshold, execute the step of generating a first bill based on the first group traffic, the total traffic and the total bill.
2. The method according to claim 1, characterized in that The generating a first bill according to the first group traffic, the total traffic and the total bill includes: Calculate the proportion of the first group flow in the total flow; The first bill is generated by calculating the product of the percentage value and the total bill.
3. The method according to claim 1, characterized in that The billing group is obtained by the following method: Obtaining group identification information of the billing object in the target object; The billing objects in the target object are grouped according to the group identification information to obtain the billing group.
4. The method according to claim 3, characterized in that The group identification information includes at least one of the following: department information of the department to which the billing object belongs, and project information of the project to which the billing object belongs.
5. The method according to claim 1, characterized in that The total flow is the total flow of bandwidth resources used by the target object within the billing start and end time range, and the first group flow is the accumulated sum of the flow of bandwidth resources used by the billing object in the first billing group within the billing start and end time range.
6. The method according to claim 1, characterized in that The method is applied to a server, and the method further comprises: The first bill is provided to a terminal device, wherein the terminal device is used to display the first bill.
7. The method according to claim 1, characterized in that The billing object includes at least one of the following: a domain name, an Internet Protocol address.
8. A bandwidth bill generating device, characterized in that: include: A total bill acquisition module, used to acquire the total flow and total bill of the bandwidth resources used by the target object, wherein the target object includes at least one billing group, and the billing group includes at least one billing object; A packet flow acquisition module, configured to acquire a first packet flow of a first billing group, wherein the first billing group is any one of the at least one billing group, and the first packet flow is a flow accumulation sum of bandwidth resources used by a billing object in the first billing group; a bandwidth bill generating module, configured to generate a first bill according to the first packet flow, the total flow and the total bill, wherein the first bill is a bandwidth bill corresponding to the first billing group, Wherein, when obtaining the total bill of bandwidth resources used by the target object, the total bill acquisition module is specifically used to: Receiving bandwidth resource billing message; Obtaining the billing start and end time according to the bandwidth resource billing message; Fitting the peak value of the bandwidth resources used by the target object within the billing start and end time range to obtain a peak sequence corresponding to the target object; From the peak sequence, a peak that meets a preset condition is obtained as a target peak; According to the target peak value, the total bill is calculated, The bandwidth bill generation module is specifically used to obtain a first average peak value corresponding to the first billing group, wherein the first average peak value is the average value of the peak values of the billing objects in the first billing group within the billing start and end time range; obtain the absolute value of the difference between the first average peak value and the target peak value, and generate the first bill according to the first group traffic, the total traffic and the total bill when the absolute value of the difference is less than a preset difference threshold.
9. An electronic device, characterized in that: The device comprising claim 8; or, The electronic device comprises: A memory for storing executable instructions; A processor is used to operate the electronic device to execute the method according to any one of claims 1 to 7 under the control of the instruction.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method according to any one of claims 1 to 7 when being read and executed by the computer.
