WO2017016113A1 - 用于监控网络业务量的方法和装置 - Google Patents
用于监控网络业务量的方法和装置 Download PDFInfo
- Publication number
- WO2017016113A1 WO2017016113A1 PCT/CN2015/095635 CN2015095635W WO2017016113A1 WO 2017016113 A1 WO2017016113 A1 WO 2017016113A1 CN 2015095635 W CN2015095635 W CN 2015095635W WO 2017016113 A1 WO2017016113 A1 WO 2017016113A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- account
- service
- client
- traffic
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/14—Charging, metering or billing arrangements for data wireline or wireless communications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/80—Actions related to the user profile or the type of traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/14—Charging, metering or billing arrangements for data wireline or wireless communications
- H04L12/1403—Architecture for metering, charging or billing
Definitions
- the present application relates to the field of computer technologies, and in particular, to the field of network traffic distribution technologies, and in particular, to a method and apparatus for monitoring network traffic.
- the service party can perform the settlement of the service fee according to the monitoring of the network traffic provided by the client served, and then control the network traffic used by the client.
- the method of using the client first and the server after the settlement is often adopted, that is, the client first uses the network traffic, and then the server is in a time period, for example, one hour, one day, etc. Regularly query or count the usage information of the client on the network traffic, and then settle the service fee.
- the existing method for monitoring network traffic has a long monitoring interval for the network traffic used by the client, which results in delay in service fee settlement, which in turn causes the server to fail to timely allocate traffic to the client according to the amount of traffic consumed by the client. Make adjustments or decisions. Therefore, the existing methods of monitoring network traffic have low effectiveness.
- the purpose of the present application is to propose an improved method and apparatus for monitoring network traffic to solve the technical problems mentioned in the background section above.
- the present application provides a method for monitoring network traffic, the method comprising: acquiring service information of a client served by a service server from a service information set in real time, and generating an account corresponding to the client.
- the billing information where the service information set is used to store service information of the served client that is sent by the service server according to a preset time interval, and the service information includes at least one of the following: a service type, a service name, Traffic, service charging rules; generating account status information based on the charging information; and allowing or prohibiting allocation of traffic to clients corresponding to the account according to the account status information.
- the generating account status information based on the charging information comprises: updating balance information of the account based on the charging information; and generating the account status information according to the balance information.
- the updating the balance information of the account based on the charging information comprises: detecting whether the recharge information of the account is received; if yes, updating according to the charging information and the recharge information The balance information of the account.
- the account status information includes online information and offline information
- the generating account status information based on the charging information includes: generating online information when the balance information includes a balance greater than zero
- the balance information includes a balance less than or equal to zero
- offline information is generated.
- the allowing or disabling the allocation of the traffic to the client corresponding to the account according to the account state information includes: allowing the client corresponding to the account when the account state information includes the online information The terminal allocates traffic; when the account state information includes offline information, it is prohibited to allocate traffic to the client corresponding to the account.
- the allowing or disabling the allocation of the traffic to the client corresponding to the account according to the account status information further includes: when the account status information includes the online information, allowing the corresponding to the account The client allocates a traffic amount lower than the account balance, and prohibits the client corresponding to the account from being allocated a traffic volume higher than the account balance.
- the method further comprises generating a consumption record for the account based on the billing information of the account.
- the present application provides an apparatus for monitoring network traffic, where the apparatus includes: a charging information generating module configured to obtain from a service information set in real time.
- the service information of the client served by the service server generates the charging information of the account corresponding to the client, where the service information set is used to store the served client sent by the service server according to a preset time interval.
- the service information, the service information includes at least one of the following: a service type, a service name, a traffic volume, and a service charging rule; and an account status information generating module configured to generate account status information based on the charging information;
- an allocating module configured to allow or prohibit the allocation of the traffic to the client corresponding to the account according to the account status information.
- the account status information generating module includes: a balance information updating unit configured to update balance information of the account based on the charging information; and an account status information generating unit configured to be configured according to the The balance information generates the account status information.
- the balance information update unit includes: a recharge detection subunit configured to detect whether recharge information of the account is received; if yes, the balance information update unit is further configured to use the billing information and The refill information updates the balance information of the account.
- the account status information includes online information and offline information
- the account status information generating unit is further configured to generate online information when the balance information includes a balance greater than zero; When the balance information includes a balance less than or equal to zero, the offline information is generated.
- the traffic allocation module is further configured to: when the account state information includes online information, allow a traffic to be allocated to a client corresponding to the account; when the account state information includes an offline When the information is used, it is prohibited to allocate the traffic to the client corresponding to the account.
- the traffic allocation module is further configured to: when the account status information includes online information, allow a service corresponding to the account to be allocated to a client corresponding to the account, prohibiting the The client corresponding to the account allocates more traffic than the account balance.
- the apparatus further includes: a consumption record generating module configured to generate a consumption record of the account according to the billing information of the account.
- the method and device for monitoring network traffic provided by the present application are implemented in real time Obtaining service information of the client served by the service server in the service information set, generating charging information of the account corresponding to the client, and then generating account status information based on the charging information, and then allowing or prohibiting the corresponding account according to the account status information
- the client allocates traffic.
- the service information set is used to store the service information of the served client that is sent by the service server according to the preset time interval.
- the service information includes at least one of a service type, a service name, a service volume, and a service charging rule.
- the service server can send the service information of the served client to the service information set according to a preset time interval (for example, one minute), and obtain the service information from the service information set in real time (for example, at a frequency of 100,000 times per minute).
- the account status information corresponding to the client is updated in time, and then the traffic distribution of the client is adjusted, thereby improving the effectiveness of network traffic monitoring.
- FIG. 1 illustrates an exemplary system architecture to which embodiments of the present application may be applied
- FIG. 2 is a flow diagram of one embodiment of a method for monitoring network traffic in accordance with the present application
- FIG. 3 is a schematic diagram of an application scenario of a method for monitoring network traffic according to the present application.
- FIG. 4 is a flow chart of still another embodiment of a method for monitoring network traffic in accordance with the present application.
- FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for monitoring network traffic according to the present application.
- FIG. 6 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server of an embodiment of the present application.
- FIG. 1 illustrates an exemplary system architecture 100 in which embodiments of the present application may be applied.
- the system architecture 100 can include at least a terminal device 101, a network 102, and a server 103.
- the network 102 is used to provide a medium for communication links between the terminal device 101 and the server 103.
- Network 102 can include a variety of connection types, such as wired, wireless communication links, fiber optic cables, and the like.
- the terminal device 101 can interact with the server 103 via the network 102 to receive or transmit a message or the like.
- the terminal device 101 can be installed with various communication client applications, such as a cloud application, an antivirus application, a data traffic monitoring application, a social platform application, an application including a search engine, a mailbox client, an instant communication tool, and the like.
- the server 103 can allocate traffic for at least one client (e.g., cloud application) in the terminal device 101, and monitor traffic consumption of the client on the terminal device 101.
- client e.g., cloud application
- the terminal device 101 may include, but is not limited to, a smart phone, a smart watch, a tablet computer, a personal digital assistant, an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), and an MP4 ( Moving Picture Experts Group Audio Layer IV, motion imaging experts compress standard audio layers 4) players, laptops and desktop computers, and more.
- a smart phone a smart watch
- a tablet computer a personal digital assistant
- an e-book reader an MP3 player (Moving Picture Experts Group Audio Layer III)
- MP4 Moving Picture Experts Group Audio Layer IV, motion imaging experts compress standard audio layers 4
- the server 103 may be a server that provides various services, or a service server that allocates traffic for at least one client (for example, a cloud application) in the terminal device 101.
- a service server that allocates traffic for at least one client (for example, a cloud application) in the terminal device 101.
- a background server that provides support for cloud applications on the terminal device 101, and the like.
- the server can store, generate, and the like the received data, and feed back the processing result to the terminal device.
- the method for monitoring network traffic provided by the embodiment of the present application may perform all steps by the server 103.
- the example architecture 100 may not include the server 104 shown in FIG.
- the example architecture 100 can also include the server 104.
- the server 104 and the server 103 can be connected by a wired connection or a wireless connection.
- the above wireless connection methods include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) Connectivity, and other wireless connections that are now known or developed in the future.
- the method for monitoring network traffic provided by the embodiment of the present application may also perform all or part of the steps by the server 104.
- the server 104 may receive the service information sent by the server 103 to the service information set, generate charging information of the account corresponding to the client, and generate account status information based on the charging information, according to the account status information, the server 104
- the server 103 issues an instruction to allow or prohibit the allocation of traffic to the client corresponding to the account, or the server 104 transmits the account status information to the server 103, and the server 103 allows or prohibits the corresponding account according to the account status information.
- the client allocates traffic.
- the service information set may be provided on the server 103 or on the server 104.
- the apparatus for monitoring network traffic provided by the embodiments of the present application may all be disposed on the server 103; when the exemplary architecture 100 includes In the case of the server 104, the devices for monitoring network traffic provided by the embodiments of the present application may all be disposed on the server 104, or may be partially disposed on the server 104, and the rest may be disposed on the server 103.
- the server 103 can include a plurality, each server 103 allocating network traffic for a plurality of terminal devices, and network traffic of the client devices hosted by the plurality of servers 103 being monitored by the server 104 is monitored by the server 104.
- FIG. 1 a flow 200 of one embodiment of a method for monitoring network traffic is illustrated.
- a server 103 eg, may be a service server
- a server 104 eg, may be a background server that provides network traffic monitoring support for a service server
- the method for monitoring network traffic may include the following steps:
- step 201 the service information of the client served by the service server is obtained from the service information set in real time, and the account information of the account corresponding to the client is generated.
- the electronic device (for example, the server 103 or the server 104 shown in FIG. 1) can obtain the service information of the client served by the service server from the local or remote service information set in real time, and generate the client in real time. Billing letter for the corresponding account interest.
- the electronic device is a service server (for example, the server 103) that allocates traffic to the client
- the device can obtain the service information directly from the local service information set; and when the electronic device provides the network to the service server.
- the background server for example, the server 104 supported by the traffic monitoring is obtained
- the service information is obtained from the local service information set, and the service information may be obtained from the service information set of the service server by using a wired connection or a wireless connection.
- the service server may send the service information of the served client to the service information set according to a preset time interval.
- the preset time interval may be a fixed value, which is a sending period, which may be manually set, for example, 1 minute; the preset time interval may also be based on the service information of the client served by the service server.
- the change for example, can be inversely proportional to the amount of business consumed by the client.
- the service server can send the service information to the service information set according to the unified sending period. For example, starting from the service server to provide the service to the client, the service is counted every minute.
- the service information of the client is sent to the service information set; the service server can also send the service information to the service information set according to the independent transmission period of each client, for example, starting from the service server providing service for a single client, and the individual is used every minute.
- the service information of the client is sent to the service information collection.
- the business information collection can store these business information temporarily or permanently.
- the service information set temporarily stores the service information, it may be located in a temporary storage area (such as a cache) of the electronic device; when the service information set permanently stores the service information, it may be located in the permanent storage of the memory of the electronic device. In the area (such as memory).
- the service server may send the service information of the served client to the electronic device by using a message queue according to a preset time interval.
- a person skilled in the art can understand that if the service information set is set in the service server or the service information is sent through the message queue, when the electronic device is powered off, the service information can still be saved in the service information set or the message queue. In this way, when the electronic device is powered, the service information can continue to be read without causing the billing information to be missing.
- the service information may include, but is not limited to, at least one of the following: a service type, a service name, a traffic volume, and a service charging rule.
- the network traffic may have a uniform service charging rule, and the electronic device may pre-store the service charging rule.
- the service information may include only the service type, the service name, or the service volume, and the electronic device may Calculate billing information based on service type, business name, or traffic volume. For example, if the client successfully requests a cloud antivirus service to the service server within a preset time interval (for example, the service charging rule of the antivirus service is ⁇ yuan/time), the service server may only use the service type (for example, it may be an advanced cloud).
- the anti-virus ") or the service name (for example, "cloud anti-virus") is sent to the service information set, and the electronic device can calculate the charging information of the client requesting the cloud anti-virus service according to the service type or the service name.
- the service server allocates network traffic to the client (for example, the service charging rule of the network traffic is ⁇ yuan/megabyte)
- the service server can only consume the traffic consumed by the client (for example, it can be 500 megabytes).
- the network traffic is sent to the service information set, and the electronic device can calculate the charging information of the traffic consumed by the client according to the traffic volume.
- the network traffic consumed by each client may have different service charging rules (eg, different clients have different service charging rules according to cloud storage capacity and managed server configuration parameters), then the service Information can include traffic and business billing rules.
- the service charging rule is the charging amount (for example, x yuan/minute) in a unit time, and the service server sends the service information of each client to the service information set by using the unified sending period
- the service information may only be Includes business billing rules for each client. It can be understood by those skilled in the art that the situation in the actual application is complicated, and the service information may include any one of service type, service name, traffic volume, and service charging rule, or any combination thereof.
- the service information may also be the charging information generated by the service server in real time, and the electronic device may obtain the charging information in real time.
- the charging information may include an amount corresponding to the network traffic consumed by the client in a preset time interval.
- the electronic device can read the business information in the service information set in real time.
- the frequency at which the electronic device reads the service information can be associated with the frequency at which the service server transmits the service information. For example, when the service server sends the service information frequently (for example, between 1 million times/minute and 10 million times/minute), the electronic device can To read the service information in the service information set according to a certain frequency (for example, 100,000 times/second); when the service server sends the service information at a low frequency (for example, 10 times/minute to 100 times/minute), the electronic device can The service information set is detected to be written data, and when the service information set is written to the data, the electronic device reads the written data.
- a certain frequency for example, 100,000 times/second
- a low frequency for example, 10 times/minute to 100 times/minute
- the electronic device acquires the service information of the client in time after the client consumes the traffic, and calculates the charging amount of the traffic consumed by the client in a preset time interval, thereby realizing real-time monitoring of the network traffic. .
- Step 202 Generate account state information based on the foregoing charging information.
- the electronic device may then generate account status information of the account corresponding to the client based on the charging information of the client generated in step 201.
- the electronic device can perform real-time settlement on the account corresponding to the client according to the current charging information of the client.
- the electronic device may deduct the billing amount included in the billing information from the account balance, thereby updating the balance information of the account, and completing the network traffic consumed by the client in the preset time interval. Settlement.
- the electronic device may first detect whether the account recharge information is received before updating the account balance information, and if yes, add the recharge amount to update the account balance information after subtracting the billing amount included in the current billing information. .
- the process of updating the balance information according to the recharge amount and the billing amount may also be independent of each other, that is, the electronic device does not have to detect whether the recharge information is received, and when the recharge information or the billing information is received, the balance information of the account is updated separately.
- the electronic device can determine the account status based on the updated balance information. For example, the electronic device may compare the balance value included in the updated balance information with a preset balance threshold, and determine the account status according to the relationship between the balance value and the balance threshold.
- the balance threshold may be a minimum value (for example, 1 yuan) of the billing amount of the traffic consumed by the client in the preset time interval, or may be an artificially specified value (such as 0.1 yuan or 0 yuan).
- the electronic device may determine that the account status is an active state, and when the balance value is equal to or less than the balance threshold, the electronic device may determine that the account status is an invalid state.
- the electronic device can then generate account status information based on the determined account status.
- the account status information here can be a control signal (such as the high and low levels of the output), or It is a state parameter value (such as a parameter value represented by 0 or 1), and can also be a control statement or a description statement (such as a statement describing the relationship between the account balance value and the balance threshold).
- a control signal, a status parameter value, or a control statement that allows the service volume to be allocated to the client corresponding to the account
- a control signal, a state parameter value, or a control statement that prohibits the allocation of traffic to the client corresponding to the account is generated.
- Step 203 Allow or prohibit the allocation of the traffic to the client corresponding to the account according to the account status information.
- the electronic device retrieves different control schemes according to the received account state information, and allows or prohibits the allocation of traffic to the client corresponding to the account, thereby implementing control of the amount of traffic allocated to the client.
- the electronic device can directly control the traffic distribution of the service server to the client according to the account status information.
- the control signal or the status parameter value represents a signal or a parameter value of the valid state
- the electronic device allows the service server to allocate the traffic to the client, and conversely, the service server is prohibited from allocating the traffic to the client.
- the account status information can be a control statement that can allow or prohibit the service server from allocating traffic to clients corresponding to the account.
- the control statement expresses information that allows the service server to allocate traffic to the client corresponding to the account
- the service server may be allowed to allocate the traffic to the client corresponding to the account.
- the account status information may be a description statement.
- the account status information may be a statement describing the account balance, and the electronic device determines, according to the statement, whether the customer corresponding to the account needs to be prohibited. The end allocates traffic.
- the electronic device may further generate a consumption record of the corresponding account of each client according to the charging information generated in step 201.
- the consumption record may include, but is not limited to, the foregoing service information, billing amount, billing time, and the like.
- the electronic device may generate a bill for generating an account from the consumption record based on the keyword matching based on the keyword matching.
- the electronic setting The device can send prompt information (such as SMS or email) to the associated account of the client (such as mobile phone number or email account).
- the application scenario of this embodiment may be: as shown in FIG. 3, the service server may be the cloud server 302, and the electronic device may be a monitoring server 303 that provides network traffic monitoring support for the cloud server 302, where the cloud server 301 is a client. End 302 provides cloud services and can distribute traffic to client 302.
- the client 301 establishes a connection with the cloud server 302 and initiates a request for allocating traffic (such as storage resources) to the cloud server 302; then, the cloud server 302 receives the allocation.
- the service volume (such as storage space) is allocated to the client 301 through step 3021; then, the cloud server 302 can start from establishing a connection with the client 301, and step 1 through step 3022.
- the minutes are sent to the monitoring server 303 to the cloud server 302 to allocate the service information of the traffic to the client 301 in the first minute.
- the monitoring server 303 obtains the service information sent by the cloud server 302 in real time through step 3031, and generates the client 301.
- the billing information in the one minute, the account balance corresponding to the client 301 is updated in real time according to the current billing information, and once the account balance becomes equal to zero or less than zero, the invalid state information of the client 301 is immediately generated.
- the cloud server 302 Sent to the cloud server 302; then, the cloud server 302 receives the invalid status information of the client 301 in step 3023, and immediately bans The amount of traffic (such as freeing storage space) is allocated to the client 301.
- the cloud server 302 can also interrupt the connection with the client 301.
- the embodiment of the method for monitoring network traffic of the present application may monitor the traffic consumption of the client according to a preset time interval, and generate a real-time distribution of the service server to the client in a previous preset time interval.
- the effectiveness of network traffic monitoring is improved.
- a flow 400 of yet another embodiment of a method for monitoring network traffic of the present application is shown.
- This embodiment is applicable to the server 103 (which may be, for example, a service server) or the server 104 in the exemplary architecture 100 (for example, it may be The business server provides network traffic monitoring support for the backend server) in the functionality of the electronic device.
- the process 400 includes:
- step 401 the service information of the client served by the service server is obtained from the service information set in real time, and the account information of the account corresponding to the client is generated.
- the electronic device (for example, the server 103 or the server 104 shown in FIG. 1) can obtain the service information of the client served by the service server from the local or remote service information set in real time, and generate the client in real time.
- the billing information of the corresponding account can be obtained.
- the service server may send the service information of the served client to the service information set according to the preset time interval, and the electronic device may read the service information in the service information set in real time.
- the service information may include, but is not limited to, at least one of the following: a service type, a service name, a traffic volume, and a service charging rule.
- the billing information may include an amount corresponding to the amount of network traffic consumed by the client within a preset time interval.
- Step 402 Generate online information or offline information of the account based on the foregoing charging information.
- the electronic device may further deduct the billing amount included in the billing information from the account corresponding to the client in real time based on the billing information generated by the client in step 201, update the account balance information, and then update the account balance information.
- the balance information determines the account status, for example, the account status may be determined to be a valid status or an invalid status, and online information or offline information may be generated according to changes in the status of the account.
- the electronic device when the account status changes from the invalid state to the active state, the electronic device generates the online information; when the account status changes from the active state to the invalid state, the electronic device generates the offline information.
- Step 403 If the account status information includes the online information, the client corresponding to the account is allowed to allocate a traffic volume lower than the account balance, and the client corresponding to the account is prohibited from being allocated a traffic volume higher than the account balance.
- the electronic device may then invoke different control schemes according to the generated account state information to regulate the amount of traffic allocated to the client. If the account status information includes the online information, the electronic device may compare the account balance with the billing amount generated by the service server in the preset time interval, and allow the client corresponding to the account to be allocated. Billing amount generated within the above preset time interval The traffic volume lower than the account balance is prohibited from allocating the traffic amount corresponding to the account balance generated in the preset time interval to the client corresponding to the account balance. For example, if the account balance of an account is 0.6 yuan, the service volume corresponding to the client in the account consumes 5 megabytes of network traffic in 1 minute, and the service charging rule of network traffic is 0.08 yuan/megaword.
- Step 404 If the account status information includes offline information, it is prohibited to allocate the traffic to the client corresponding to the account.
- the account status information generated by the electronic device includes offline information, it is prohibited to allocate the traffic to the client corresponding to the account.
- the steps 401 and 402 in the foregoing implementation process are substantially the same as the steps 201 and 202 in the foregoing embodiment, and details are not described herein again.
- the embodiment shown in FIG. 4 can further determine the account balance when the account balance does not satisfy the condition of the invalid state, so as to pre-control the client corresponding to the account according to the preset traffic allocation policy. On the basis of improving the real-time monitoring of business volume, it is more conducive to the macro-control and configuration of business server resources.
- the present application provides an embodiment of an apparatus for monitoring network traffic, the apparatus embodiment corresponding to the method embodiment shown in FIG.
- the device can be specifically applied to an electronic device.
- the apparatus 500 for monitoring network traffic includes: a charging information generating module 501, an account status information generating module 502, and a traffic volume assigning module 503.
- the billing information generating module 501 can be configured to obtain, in real time, the service information of the client served by the service server from the service information set, and generate billing information of the account corresponding to the client, where the service information set is used to store the service.
- the service information of the served client sent by the server according to the preset time interval, and the service information includes at least one of the following: a service type, a service name, a traffic volume, a service charging rule, and an account.
- the status information generating module 502 can be configured to generate account status information based on the charging information.
- the traffic quantity assigning module 503 can be configured to allow or prohibit the allocation of the traffic to the client corresponding to the account according to the account status information.
- the device 500 for monitoring network traffic may first obtain the service information of the client served by the service server from the local or remote service information set in real time through the charging information generation module 501, and generate the real-time information in real time.
- the service server may send the service information of the served client to the service information set according to the preset time interval, and the electronic device may read the service information in the service information set in real time.
- the service information may include, but is not limited to, at least one of the following: a service type, a service name, a traffic volume, and a service charging rule.
- the billing information may include an amount corresponding to the amount of network traffic consumed by the client within a preset time interval.
- the account status information generating module 502 may then obtain the billing information of the client-side account from the billing information generating module 501, and update the account balance information according to the billing information, and then determine the account status according to the account balance information. Generate account status information.
- the account status information may be a control signal, a status parameter value, a control statement or a description statement, and the like.
- the traffic distribution module 503 may then invoke different control schemes according to the received account state information, permit or prohibit the allocation of traffic to the client corresponding to the account, and implement control over the allocated traffic of the client. .
- modules described in apparatus 500 for monitoring network traffic correspond to the various steps in the method described with reference to FIG.
- the operations and features described above in connection with FIG. 2 for the method for monitoring network traffic are equally applicable to the apparatus 500 for monitoring network traffic and the modules included therein, and are not described herein.
- FIG. 6 a block diagram of a computer system 600 suitable for use in implementing a terminal device or server of an embodiment of the present application is shown.
- computer system 600 includes a central processing unit (CPU) 601 that can be loaded into a program in random access memory (RAM) 603 according to a program stored in read only memory (ROM) 602 or from storage portion 608. And perform various appropriate actions and processes.
- RAM random access memory
- ROM read only memory
- various programs and numbers required for the operation of the system 600 are also stored. according to.
- the CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
- An input/output (I/O) interface 605 is also coupled to bus 604.
- the following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a storage portion 608 including a hard disk or the like. And a communication portion 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the Internet.
- Driver 610 is also coupled to I/O interface 605 as needed.
- a removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like, is mounted on the drive 610 as needed so that a computer program read therefrom is installed into the storage portion 608 as needed.
- an embodiment of the present disclosure includes a computer program product comprising a computer program tangibly embodied on a machine readable medium, the computer program comprising program code for executing the method illustrated in the flowchart.
- the computer program can be downloaded and installed from the network via communication portion 609, and/or installed from removable media 611.
- the units involved in the embodiments of the present application may be implemented by software or by hardware.
- the described modules may also be provided in the processor.
- a processor includes a billing information generating module, an account state information generating module, and a traffic volume allocating module.
- the names of these modules do not constitute a limitation on the module itself in some cases.
- the account status information generating module may also be described as "a module configured to generate account status information based on charging information.”
- the present application further provides a computer readable storage medium, which may be a computer readable storage medium included in the apparatus described in the foregoing embodiment, or may exist separately, not A computer readable storage medium that is assembled into a terminal.
- the computer readable storage medium stores one or more programs that are used by one or more processors to perform the methods for monitoring network traffic as described herein.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开了一种用于监控网络业务量的方法和装置。所述方法的一具体实施方式包括:实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;基于所述计费信息,生成账户状态信息;根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。该实施方式可以提高网络业务量监控的有效性。
Description
相关申请的交叉引用
本申请要求北京百度网讯科技有限公司于2015年07月28日提交的,发明名称为“用于监控网络业务量的方法和装置”的、中国专利申请号“201510450243.X”的优先权,其全部内容作为整体并入本申请中。
本申请涉及计算机技术领域,具体涉及网络业务量分配技术领域,尤其涉及一种用于监控网络业务量的方法和装置。
随着互联网技术的发展,越来越多的网络业务可以通过量化表征。服务方可以根据对所服务的客户端提供的网络业务量的监测进行服务费用的结算,进而对客户端使用的网络业务量进行控制。现有的监控网络业务量的技术中,往往采用客户端先使用、服务器端后结算的方法,即客户端先使用网络业务量,然后服务器端以一个时间段为单位,例如一小时、一天等,定时查询或统计客户端对网络业务量的使用信息,进而结算服务费用。
现有的监控网络业务量的方法,对客户端使用的网络业务量的监控时间间隔较长,导致服务费用结算延迟,进而导致服务器端不能及时根据客户端消耗的业务量对客户端的业务量分配进行调整或决策。因此,现有的监控网络业务量的方法存在有效性较低的问题。
发明内容
本申请的目的在于提出一种改进的用于监控网络业务量的方法和装置,来解决以上背景技术部分提到的技术问题。
第一方面,本申请提供了一种用于监控网络业务量的方法,所述方法包括:实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;基于所述计费信息,生成账户状态信息;根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。
在一些实施例中,所述基于所述计费信息,生成账户状态信息包括:基于所述计费信息,更新所述账户的余额信息;根据所述余额信息,生成所述账户状态信息。
在一些实施例中,所述基于所述计费信息,更新所述账户的余额信息包括:检测是否接收到所述账户的充值信息;若是,根据所述计费信息和所述充值信息,更新所述账户的余额信息。
在一些实施例中,所述账户状态信息包括上线信息和下线信息,以及,所述基于所述计费信息,生成账户状态信息包括:当所述余额信息包括余额大于零时,生成上线信息;当所述余额信息包括余额小于或等于零时,生成下线信息。
在一些实施例中,所述根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量包括:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配业务量;当所述账户状态信息包括下线信息时,禁止向所述账户对应的客户端分配业务量。
在一些实施例中,所述根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量还包括:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配低于账户余额的业务量,禁止向所述账户对应的客户端分配高于账户余额的业务量。
在一些实施例中,所述方法还包括:根据账户的计费信息,生成所述账户的消费记录。
第二方面,本申请提供了一种用于监控网络业务量的装置,所述装置包括:计费信息生成模块,配置用于实时从业务信息集合中获取
业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;账户状态信息生成模块,配置用于基于所述计费信息,生成账户状态信息;业务量分配模块,配置用于根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。
在一些实施例中,所述账户状态信息生成模块包括:余额信息更新单元,配置用于基于所述计费信息,更新所述账户的余额信息;账户状态信息生成单元,配置用于根据所述余额信息,生成所述账户状态信息。
在一些实施例中,所述余额信息更新单元包括:充值检测子单元,配置用于检测是否接收到所述账户的充值信息;若是,余额信息更新单元还配置用于根据所述计费信息和所述充值信息,更新所述账户的余额信息。
在一些实施例中,所述账户状态信息包括上线信息和下线信息,以及,所述账户状态信息生成单元还配置用于:当所述余额信息包括余额大于零时,生成上线信息;当所述余额信息包括余额小于或等于零时,生成下线信息。
在一些实施例中,所述业务量分配模块进一步配置用于:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配业务量;当所述账户状态信息包括下线信息时,禁止向所述账户对应的客户端分配业务量。
在一些实施例中,所述业务量分配模块进一步配置用于:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配低于账户余额的业务量,禁止向所述账户对应的客户端分配高于账户余额的业务量。
在一些实施例中,所述装置还包括:消费记录生成模块,配置用于根据账户的计费信息,生成所述账户的消费记录。
本申请提供的用于监控网络业务量的方法和装置,通过实时从业
务信息集合中获取业务服务器所服务的客户端的业务信息,生成客户端所对应的账户的计费信息,接着基于计费信息,生成账户状态信息,然后根据账户状态信息,允许或禁止向账户对应的客户端分配业务量。其中,业务信息集合用于存储业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,业务信息包括业务类型、业务名称、业务量、业务计费规则中的至少一项。由于业务服务器可以按照预设时间间隔(如一分钟)将所服务的客户端的业务信息发送至业务信息集合,实时(如以一分钟10万次的频率)从业务信息集合中获取这些业务信息,可以及时更新客户端对应的账户状态信息,进而对客户端的业务量分配情况进行调整,从而可以提高网络业务量监控的有效性。
通过阅读参照以下附图所作的对非限制性实施例的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1示出了可以应用本申请实施例的示例性系统架构;
图2是根据本申请的用于监控网络业务量的方法的一个实施例的流程图;
图3是根据本申请的用于监控网络业务量的方法的一个应用场景示意图;
图4是根据本申请的一种用于监控网络业务量的方法的又一个实施例的流程图;
图5是根据本申请的用于监控网络业务量的装置的一个实施例的结构示意图;
图6是适于用来实现本申请实施例的终端设备或服务器的计算机系统的结构示意图。
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与
有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以应用本申请实施例的示例性系统架构100。
如图1所示,系统架构100至少可以包括终端设备101、网络102和服务器103。网络102用以在终端设备101和服务器103之间提供通信链路的介质。网络102可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
终端设备101可以通过网络102与服务器103交互,以接收或发送消息等。终端设备101上可以安装有各种通讯客户端应用,例如云应用、杀毒类应用、数据流量监控类应用、社交平台应用、包含搜索引擎的应用、邮箱客户端、即时通信工具等。服务器103可以为终端设备101中的至少一个客户端(例如云应用)分配业务量,并监控终端设备101上的客户端的业务量消耗情况。
终端设备101可以包括但不限于智能手机、智能手表、平板电脑、个人数字助理、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。
服务器103可以是提供各种服务的服务器,或者是为终端设备101中的至少一个客户端(例如云应用)分配业务量的业务服务器。例如对终端设备101上的云应用提供支持的后台服务器等。服务器可以对接收到的数据进行存储、生成等处理,并将处理结果反馈给终端设备。
需要说明的是,本申请实施例所提供的用于监控网络业务量的方法可以由服务器103执行全部步骤。此时,该示例型架构100可以不包括图1示出的服务器104。在一些实现中,示例型架构100也可以包括服务器104。服务器104和服务器103可以通过有线连接方式或者无线连接方式连接。上述无线连接方式包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)
连接、以及其他现在已知或将来开发的无线连接方式。此时,本申请实施例所提供的用于监控网络业务量的方法也可以由服务器104执行全部或部分步骤。例如,服务器104可以接收服务器103发送至业务信息集合中的业务信息,生成客户端所对应的账户的计费信息,并基于计费信息,生成账户状态信息,根据该账户状态信息,服务器104向服务器103发出允许或禁止向所述账户对应的客户端分配业务量的指令,或者,服务器104将账户状态信息发送给服务器103,由服务器103根据该账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。其中,业务信息集合可以设在服务器103上,也可以设在服务器104上。
同理,本领域技术人员应当理解,当示例型架构100不包括服务器104时,本申请实施例所提供的用于监控网络业务量的装置可以全部设于服务器103上;当示例型架构100包括服务器104时,本申请实施例所提供的用于监控网络业务量的装置可以全部设于服务器104上,也可以部分地设于服务器104上,其余部分设于服务器103上。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。例如,在一些实现中,服务器103可以包括多个,每个服务器103为多个终端设备分配网络业务量,多个服务器103所服务的承载于终端设备的客户端的网络业务量由服务器104监控。
请参考图2,其示出了用于监控网络业务量的方法的一个实施例的流程200。参考图1所示,本申请的实施例适用于具备示例型架构100中的服务器103(例如可以是业务服务器)或服务器104(例如可以是为业务服务器提供网络业务量监控支持的后台服务器)的功能的电子设备。该用于监控网络业务量的方法,可以包括以下步骤:
步骤201,实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成客户端所对应的账户的计费信息。
在本实施例中,电子设备(例如图1所示的服务器103或服务器104)可以实时地从本地或远程的业务信息集合中获取业务服务器所服务的客户端的业务信息,并实时地生成客户端所对应的账户的计费信
息。具体而言,当上述电子设备就是为客户端分配业务量的业务服务器(例如服务器103)时,其可以直接从本地的业务信息集合获取上述业务信息;而当上述电子设备是对业务服务器提供网络业务量监控支持的后台服务器(例如服务器104)时,其从本地的业务信息集合获取上述业务信息,也可以通过有线连接方式或者无线连接方式从业务服务器的业务信息集合获取上述业务信息。
在本实施例中,业务服务器可以按照预设时间间隔将所服务的客户端的业务信息发送至业务信息集合。在这里,预设时间间隔可以是固定值,该固定值即为发送周期,可以是人为设定的,例如是1分钟;预设时间间隔也可以是根据业务服务器所服务的客户端的业务信息而变化的,例如可以与客户端消耗的业务量成反比。实践中,当预设时间间隔时固定值时,业务服务器可以按照统一的发送周期向业务信息集合发送业务信息,例如,从业务服务器开始向客户端提供服务起,每分钟统计一次所服务的所有客户端的业务信息并发送至业务信息集合;业务服务器也可以分别按照每个客户端独立的发送周期向业务信息集合发送业务信息,例如从业务服务器为单个客户端提供服务开始,每分钟将该单个客户端的业务信息发送至业务信息集合。业务信息集合可以临时或永久地存储这些业务信息。当业务信息集合临时地存储这些业务信息时,其可以设于电子设备的临时存储区(如缓存)中;当业务信息集合永久地存储这些业务信息,其可以设于电子设备的存储器的永久存储区(如内存)中。可选地,业务服务器可以按照预设时间间隔将所服务的客户端的业务信息通过消息队列发送至电子设备。本领域技术人员可以理解,如果业务信息集合设于业务服务器中或业务信息通过消息队列发送,则当电子设备断电时,上述业务信息仍可以在业务信息集合或消息队列中保存。这样,当电子设备得电时,可以继续读取业务信息,而不会造成计费信息缺失。
其中,业务信息可以包括但不限于以下至少一项:业务类型、业务名称、业务量、业务计费规则。在一些实现中,网络业务量可以具有统一的业务计费规则,则电子设备可以预先存储业务计费规则。此时,业务信息可以仅包括业务类型、业务名称或业务量,电子设备可
以根据业务类型、业务名称或业务量计算计费信息。例如,客户端在预设时间间隔内向业务服务器成功请求了一次云杀毒业务(例如杀毒业务的业务计费规则是×元/次),则业务服务器可以仅将业务类型(例如可以是“高级云杀毒”)或业务名称(例如可以是“云杀毒”)发送至业务信息集合,则电子设备可以根据业务类型或业务名称计算客户端请求云杀毒业务的计费信息。再例如,业务服务器向客户端分配网络流量(例如网络流量的业务计费规则是×元/兆字节)时,业务服务器可以仅将客户端消耗的业务量(例如可以是500兆字节的网络流量)发送至业务信息集合,则电子设备可以根据业务量计算客户端消耗的业务量的计费信息。在另一些实现中,每个客户端消耗的网络业务量可以是具有不同的业务计费规则(如不同的客户端根据云存储容量、托管服务器配置参数具有不同的业务计费规则),则业务信息可以包括业务量和业务计费规则。可选地,当业务计费规则为单位时间内的计费金额(如×元/分钟),且业务服务器采用统一的发送周期向业务信息集合发送每个客户端的业务信息时,业务信息可以只包括每个客户端的业务计费规则。本领域技术人员可以理解,实际应用中的情况复杂,业务信息可以包括业务类型、业务名称、业务量、业务计费规则中任一项或任意组合,在此不再一一例举。可选地,业务信息还可以是业务服务器实时生成的计费信息,则电子设备可以实时地获取该计费信息。
这里,计费信息可以包括客户端在一个预设时间间隔内消耗的网络业务量对应的金额。例如,业务信息包括业务量和业务计费规则,业务计费规则为单位业务量对应的计费金额(如0.3元/兆字节),业务量为一个预设时间间隔内消耗的业务量(如500兆字节),则电子设备根据业务信息生成的计费信息可以为业务量与业务计费规则的乘积(例如0.3元/兆字节×500兆字节=150元)。
值得说明的是,电子设备可以实时读取业务信息集合中的业务信息。在一些实现中,电子设备读取业务信息的频率可以与业务服务器发送业务信息的频率相关联。例如,当业务服务器发送业务信息的频率较高(如在100万次/分钟-1000万次/分钟之间)时,则电子设备可
以根据一定的频率(如10万次/秒)读取业务信息集合中的业务信息;当业务服务器发送业务信息的频率较低(如10次/分钟-100次/分钟)时,电子设备可以检测业务信息集合是否被写入数据,当业务信息集合被写入数据时,电子设备读出所写入的数据。这样,可以确保电子设备在客户端消耗业务量后及时获取客户端的业务信息,并计算出客户端在一个预设时间间隔内所消耗的业务量的计费金额,实现对网络业务量的实时监测。
步骤202,基于上述计费信息,生成账户状态信息。
在本实施例中,电子设备接着可以基于步骤201生成的客户端的计费信息,生成客户端所对应账户的账户状态信息。
这里,电子设备可以根据客户端的本次计费信息,对客户端所对应的账户进行实时结算。在一些实现中,电子设备可以从账户余额中扣除本次计费信息所包含的计费金额,从而更新账户的余额信息,完成对客户端在本次预设时间间隔内消耗的网络业务量的结算。可选地,电子设备可以在更新账户的余额信息之前先检测是否接收到账户的充值信息,若是,则扣除本次计费信息所包含的计费金额的同时添加充值金额来更新账户的余额信息。电子设备根据充值金额和计费金额更新余额信息的过程也可以是相互独立的,即电子设备不必检测是否接收到充值信息,当收到充值信息或计费信息时,分别更新账户的余额信息。
接着,电子设备可以根据更新后的余额信息确定账户状态。例如,电子设备可以将更新后的余额信息中包含的余额数值与预设的余额阈值进行对比,根据余额数值与余额阈值的大小关系确定账户状态。这里,余额阈值可以是在上述预设时间间隔内客户端所消耗的业务量的计费金额的最小值(如1元),也可以是人为规定的值(如0.1元或0元)。当上述余额数值大于上述余额阈值时,电子设备可以确定账户状态为有效状态,当上述余额数值等于或小于上述余额阈值时,电子设备可以确定账户状态为无效状态。
然后,电子设备可以根据确定的账户状态生成账户状态信息。这里的账户状态信息可以是一个控制信号(如输出的高、低电平),也可
以是一个状态参数值(如通过0或1表示的参数值),还可以是一个控制语句,也可以是一个描述语句(如对账户余额数值和余额阈值的关系进行描述的语句)。可选地,当上述账户状态从无效状态变为有效状态时,生成允许向账户对应的客户端分配业务量的控制信号、状态参数值或控制语句,当上述账户状态从有效状态变为无效状态时,生成禁止向账户对应的客户端分配业务量的控制信号、状态参数值或控制语句。
步骤203,根据账户状态信息,允许或禁止向账户对应的客户端分配业务量。
在本实施例中,电子设备根据接收到的账户状态信息,调取不同的控制方案,允许或禁止向账户对应的客户端分配业务量,实现对客户端分配业务量的控制。
在这里,如果账户状态信息是控制信号或状态参数值,电子设备可以根据账户状态信息直接控制业务服务器对客户端的业务量分配。具体地,当控制信号或状态参数值时代表有效状态的信号或参数值时,电子设备允许业务服务器对客户端分配业务量,反之,禁止业务服务器对客户端分配业务量。在一些实现中,账户状态信息可以是一个控制语句,该控制语句可以允许或禁止业务服务器向账户对应的客户端分配业务量。可选地,当该控制语句表达允许业务服务器向账户对应的客户端分配业务量的信息时,可以允许业务服务器向账户对应的客户端分配业务量。在另一些实现中,账户状态信息可以是一个描述语句,例如当账户状态为有效状态时,账户状态信息可以是描述账户余额的语句,电子设备根据该语句,判断是否需要禁止向账户对应的客户端分配业务量。
在本实施例的可选实现方式中,电子设备还可以根据步骤201中生成的计费信息,生成每个客户端对应账户的消费记录。可选地,该消费记录可以包括但不限于上述的业务信息、计费金额、计费时间等。电子设备可以根据预设的关键字基于关键字匹配从消费记录中提取部分信息生成账户的账单。可选地,当账户状态为无效状态,或者账户余额与判定账户为无效状态的余额阈值之差在预定范围内时,电子设
备可以向客户端的关联账号(如手机号码或邮箱账号)发送提示信息(如短信或邮件)。
本实施例的应用场景可以为:如图3所示,业务服务器可以是云服务器302,上述电子设备可以是为云服务器302提供网络业务量监控支持的监控服务器303,其中,云服务器301为客户端302提供云服务,并可以向客户端302分配业务量。在图3的应用场景300中,首先,通过步骤3011,客户端301与云服务器302建立连接,并向云服务器302发起分配业务量(如存储资源)的请求;接着,云服务器302接收该分配业务量的请求,判断该请求合法后,通过步骤3021,向客户端301分配业务量(如存储空间);然后,云服务器302可以从与客户端301建立连接开始,通过步骤3022,每隔1分钟向监控服务器303发送云服务器302在这1分钟内向客户端301分配业务量的业务信息;接着,监控服务器303通过步骤3031,实时获取云服务器302发送来的业务信息,并生成客户端301在这1分钟内的计费信息,根据本次的计费信息实时更新客户端301对应的账户余额,一旦该账户余额变为等于零或小于零的额度时,立即生成客户端301的无效状态信息并发送至云服务器302;然后,云服务器302在步骤3023中接收到客户端301的无效状态信息,立即禁止向客户端301分配业务量(如释放存储空间)。可选地,云服务器302还可以中断与客户端301的连接。
结合图3的应用场景,本申请的用于监控网络业务量的方法的实施例可以按照预设时间间隔监测客户端的业务量消耗情况,实时生成前一预设时间间隔内业务服务器向客户端分配的业务量的计费信息,并及时更新客户端对应的账户的余额信息,生成账户状态信息,根据账户状态信息及时对客户端的业务量分配情况进行控制,实现对客户端消耗业务量的实时监控,以便于及时对网络资源合理分配和调整,提高了网络业务量监控的有效性。
如图4所示,其示出了本申请的一种用于监控网络业务量的方法的又一个实施例的流程400。本实施例适用于具备示例型架构100中的服务器103(例如可以是业务服务器)或服务器104(例如可以是为
业务服务器提供网络业务量监控支持的后台服务器)的功能的电子设备中。该流程400包括:
步骤401,实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成客户端所对应的账户的计费信息。
在本实施例中,电子设备(例如图1所示的服务器103或服务器104)可以实时地从本地或远程的业务信息集合中获取业务服务器所服务的客户端的业务信息,并实时地生成客户端所对应的账户的计费信息。
这里,业务服务器可以按照预设时间间隔将所服务的客户端的业务信息发送至业务信息集合,电子设备可以实时读取业务信息集合中的业务信息。业务信息可以包括但不限于以下至少一项:业务类型、业务名称、业务量、业务计费规则。计费信息可以包括客户端在一个预设时间间隔内消耗的网络业务量对应的金额。
步骤402,基于上述计费信息,生成账户的上线信息或下线信息。
在本实施例中,电子设备接着可以基于步骤201生成的客户端的计费信息,实时从客户端所对应的账户中扣除计费信息中包含的计费金额,更新账户余额信息,然后根据更新后的余额信息确定账户状态,例如可以确定账户状态为有效状态或无效状态,并根据账户状态的变化生成上线信息或下线信息。
其中,当上述账户状态从无效状态变为有效状态时,电子设备生成上线信息;当账户状态从有效状态变为无效状态时,电子设备生成下线信息。
步骤403,如果账户状态信息包括上线信息,允许向账户对应的客户端分配低于账户余额的业务量,禁止向账户对应的客户端分配高于账户余额的业务量。
在本实施例中,电子设备接着可以根据生成的账户状态信息,调取不同的控制方案,对向客户端分配的业务量进行调控。如果账户状态信息包括上线信息,电子设备可以将账户余额与业务服务器所能分配的各业务量在上述预设时间间隔内产生的计费金额进行对比,并且,允许向账户对应的客户端分配在上述预设时间间隔内产生的计费金额
低于账户余额的业务量,禁止向账户对应的客户端分配在上述预设时间间隔内产生的计费金额高于账户余额的业务量。举例而言,如果某个账户的账户余额为0.6元,该账户对应的客户端在1分钟内消耗的业务量为网络流量5兆字节,网络流量的业务计费规则为0.08元/兆字节,则该账户本次的计费金额为0.4元,更新账户余额后为0.2元,则电子设备可以生成上线信息。由前述业务计费规则可知,0.2元的账户余额不足以承担客户端在下一个时间间隔内消耗的业务量。此时,根据该上线信息,电子设备可以禁止在下一个时间间隔内向该客户端分配网络流量,也可以仅向该客户端分配0.2元/(0.08元/兆字节)=2.5兆字节的网络流量。
步骤404,如果账户状态信息包括下线信息,禁止向账户对应的客户端分配业务量。
在本实施例中,如果电子设备生成的账户状态信息包括下线信息,则禁止向账户对应的客户端分配业务量。
在本实施例中,上述实现流程中的步骤401、步骤402分别与前述实施例中的步骤201、步骤202基本相同,在此不再赘述。
图4示出的实施例在账户余额不满足无效状态的条件时,能对账户余额进一步进行判断,以预先对账户对应的客户端根据预设的业务量分配策略进行业务量分配的控制,在提高业务量监控的实时性的基础上,更有利于对业务服务器资源的宏观调控及配置。
进一步参考图5,作为对上述各图所示方法的实现,本申请提供了一种用于监控网络业务量的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于电子设备中。
如图5所示,本实施例所述的用于监控网络业务量的装置500包括:计费信息生成模块501、账户状态信息生成模块502和业务量分配模块503。其中,计费信息生成模块501可以配置用于实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成客户端所对应的账户的计费信息,其中,业务信息集合用于存储业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;账户
状态信息生成模块502可以配置用于基于计费信息,生成账户状态信息;业务量分配模块503可以配置用于根据账户状态信息,允许或禁止向账户对应的客户端分配业务量。
在本实施例中,用于监控网络业务量的装置500首先可以通过计费信息生成模块501实时地从本地或远程的业务信息集合中获取业务服务器所服务的客户端的业务信息,并实时地生成客户端所对应的账户的计费信息。这里,业务服务器可以按照预设时间间隔将所服务的客户端的业务信息发送至业务信息集合,电子设备可以实时读取业务信息集合中的业务信息。业务信息可以包括但不限于以下至少一项:业务类型、业务名称、业务量、业务计费规则。计费信息可以包括客户端在一个预设时间间隔内消耗的网络业务量对应的金额。
在本实施例中,账户状态信息生成模块502接着可以从计费信息生成模块501获取客户端对应账户的计费信息,并根据计费信息更新账户余额信息,然后根据账户余额信息确定账户状态,生成账户状态信息。其中,账户状态信息可以是一个控制信号、一个状态参数值、一个控制语句或者一个描述语句,等等。
在本实施例中,业务量分配模块503接着可以根据接收到的账户状态信息,调取不同的控制方案,允许或禁止向账户对应的客户端分配业务量,实现对客户端分配业务量的控制。
本领域技术人员可以理解,用于监控网络业务量的装置500中记载的诸模块与参考图2描述的方法中的各个步骤相对应。由此,上文结合图2所描述的针对用于监控网络业务量的方法描述的操作和特征同样适用于监控网络业务量的装置500及其中包含的模块,在此不再赘述。
下面参考图6,其示出了适于用来实现本申请实施例的终端设备或服务器的计算机系统600的结构示意图。
如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数
据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。
本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括计费信息生成模块、账户状态信息生成模块和业务量分配模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,账户状态信息生成模块还可以被描述为“配置用于基于计费信息,生成账户状态信息的模块”。
作为另一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中所述装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入终端中的计算机可读存储介质。所述计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本申请的用于监控网络业务量的方法。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限
于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
Claims (16)
- 一种用于监控网络业务量的方法,其特征在于,所述方法包括:实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;基于所述计费信息,生成账户状态信息;根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。
- 根据权利要求1所述的方法,其特征在于,所述基于所述计费信息,生成账户状态信息包括:基于所述计费信息,更新所述账户的余额信息;根据所述余额信息,生成所述账户状态信息。
- 根据权利要求2所述的方法,其特征在于,所述基于所述计费信息,更新所述账户的余额信息包括:检测是否接收到所述账户的充值信息;若是,根据所述计费信息和所述充值信息,更新所述账户的余额信息。
- 根据权利要求2或3所述的方法,其特征在于,所述账户状态信息包括上线信息和下线信息,以及所述基于所述计费信息,生成账户状态信息包括:当所述余额信息包括余额大于零时,生成上线信息;当所述余额信息包括余额小于或等于零时,生成下线信息。
- 根据权利要求4所述的方法,其特征在于,所述根据所述账户 状态信息,允许或禁止向所述账户对应的客户端分配业务量包括:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配业务量;当所述账户状态信息包括下线信息时,禁止向所述账户对应的客户端分配业务量。
- 根据权利要求5所述的方法,其特征在于,所述根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量还包括:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配低于账户余额的业务量,禁止向所述账户对应的客户端分配高于账户余额的业务量。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:根据账户的计费信息,生成所述账户的消费记录。
- 一种用于监控网络业务量的装置,其特征在于,所述装置包括:计费信息生成模块,配置用于实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;账户状态信息生成模块,配置用于基于所述计费信息,生成账户状态信息;业务量分配模块,配置用于根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。
- 根据权利要求8所述的装置,其特征在于,所述账户状态信息生成模块包括:余额信息更新单元,配置用于基于所述计费信息,更新所述账户的余额信息;账户状态信息生成单元,配置用于根据所述余额信息,生成所述账户状态信息。
- 根据权利要求9所述的装置,其特征在于,所述余额信息更新单元包括:充值检测子单元,配置用于检测是否接收到所述账户的充值信息;若是,余额信息更新单元还配置用于根据所述计费信息和所述充值信息,更新所述账户的余额信息。
- 根据权利要求9或10所述的装置,其特征在于,所述账户状态信息包括上线信息和下线信息,以及所述账户状态信息生成单元还配置用于:当所述余额信息包括余额大于零时,生成上线信息;当所述余额信息包括余额小于或等于零时,生成下线信息。
- 根据权利要求11所述的装置,其特征在于,所述业务量分配模块进一步配置用于:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配业务量;当所述账户状态信息包括下线信息时,禁止向所述账户对应的客户端分配业务量。
- 根据权利要求12所述的装置,其特征在于,所述业务量分配模块进一步配置用于:当所述账户状态信息包括上线信息时,允许向所述账户对应的客户端分配低于账户余额的业务量,禁止向所述账户对应的客户端分配高于账户余额的业务量。
- 根据权利要求8所述的装置,其特征在于,所述装置还包括:消费记录生成模块,配置用于根据账户的计费信息,生成所述账 户的消费记录。
- 一种设备,包括:处理器;和存储器,所述存储器中存储有能够被所述处理器执行的计算机可读指令,在所述计算机可读指令被执行时,所述处理器:实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;基于所述计费信息,生成账户状态信息;根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。
- 一种非易失性计算机存储介质,所述计算机存储介质存储有能够被处理器执行的计算机可读指令,当所述计算机可读指令被处理器执行时,所述处理器:实时从业务信息集合中获取业务服务器所服务的客户端的业务信息,生成所述客户端所对应的账户的计费信息,其中,所述业务信息集合用于存储所述业务服务器按照预设时间间隔发送的所服务的客户端的业务信息,所述业务信息包括以下至少一项:业务类型、业务名称、业务量、业务计费规则;基于所述计费信息,生成账户状态信息;根据所述账户状态信息,允许或禁止向所述账户对应的客户端分配业务量。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510450243.XA CN105024947A (zh) | 2015-07-28 | 2015-07-28 | 用于监控网络业务量的方法和装置 |
CN201510450243.X | 2015-07-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017016113A1 true WO2017016113A1 (zh) | 2017-02-02 |
Family
ID=54414667
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/095635 WO2017016113A1 (zh) | 2015-07-28 | 2015-11-26 | 用于监控网络业务量的方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105024947A (zh) |
WO (1) | WO2017016113A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114765562A (zh) * | 2020-12-31 | 2022-07-19 | 南京医渡云医学技术有限公司 | 云服务计费方法及系统、存储介质及电子终端 |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105024947A (zh) * | 2015-07-28 | 2015-11-04 | 北京百度网讯科技有限公司 | 用于监控网络业务量的方法和装置 |
CN106856496B (zh) * | 2015-12-09 | 2020-04-14 | 阿里巴巴集团控股有限公司 | 数据处理方法及装置 |
CN106961529B (zh) * | 2016-01-08 | 2021-01-29 | 中国联合网络通信集团有限公司 | 工单处理方法和通信服务设备 |
CN111585828A (zh) * | 2019-02-19 | 2020-08-25 | 福建雷盾信息安全有限公司 | 一种智能化流量监控方法 |
CN110139059B (zh) * | 2019-04-01 | 2021-10-08 | 视联动力信息技术股份有限公司 | 一种视联网资源的分配方法及装置 |
CN112436949A (zh) * | 2019-08-26 | 2021-03-02 | 北京小米移动软件有限公司 | 终端、充值方法和装置 |
CN112187482B (zh) * | 2020-09-04 | 2023-04-25 | 杭州润州光电技术有限公司 | 设备管理方法、系统、电子设备和存储介质 |
CN114612091A (zh) * | 2022-03-17 | 2022-06-10 | 北京市商汤科技开发有限公司 | 自动对账方法及装置、电子设备和存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231668A (zh) * | 2011-06-22 | 2011-11-02 | 中兴通讯股份有限公司 | 一种组播业务的计费方法、装置及系统 |
CN102572768A (zh) * | 2012-03-05 | 2012-07-11 | 华为技术有限公司 | 计费方法、认证方法、计费设备和认证设备 |
CN103974221A (zh) * | 2013-01-25 | 2014-08-06 | 中国移动通信集团广东有限公司 | 分组域实时计费流量配额的分配方法和装置 |
WO2014191027A1 (en) * | 2013-05-28 | 2014-12-04 | Telefonaktiebolaget L M Ericsson (Publ) | Methods and apparatus for allocating service costs in a telecommunications network |
CN105024947A (zh) * | 2015-07-28 | 2015-11-04 | 北京百度网讯科技有限公司 | 用于监控网络业务量的方法和装置 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101257394A (zh) * | 2008-04-14 | 2008-09-03 | 北京首信科技有限公司 | 一种在线实时内容计费的方法 |
CN102347844A (zh) * | 2011-11-01 | 2012-02-08 | 苏州泽佑科技有限公司 | 流量计费3g网络系统缴费控制方法 |
US20140006271A1 (en) * | 2012-06-28 | 2014-01-02 | Globalex Corp. | Cross-network electronic payment processing system and method |
US20140236793A1 (en) * | 2013-02-19 | 2014-08-21 | David J. Matthews | Business And Professional Network System And Method For Identifying Prospective Clients That Are Unlikely To Pay For Professional Services |
CN104022889A (zh) * | 2014-06-23 | 2014-09-03 | 中国联合网络通信集团有限公司 | 上网流量计费方法和装置 |
-
2015
- 2015-07-28 CN CN201510450243.XA patent/CN105024947A/zh active Pending
- 2015-11-26 WO PCT/CN2015/095635 patent/WO2017016113A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231668A (zh) * | 2011-06-22 | 2011-11-02 | 中兴通讯股份有限公司 | 一种组播业务的计费方法、装置及系统 |
CN102572768A (zh) * | 2012-03-05 | 2012-07-11 | 华为技术有限公司 | 计费方法、认证方法、计费设备和认证设备 |
CN103974221A (zh) * | 2013-01-25 | 2014-08-06 | 中国移动通信集团广东有限公司 | 分组域实时计费流量配额的分配方法和装置 |
WO2014191027A1 (en) * | 2013-05-28 | 2014-12-04 | Telefonaktiebolaget L M Ericsson (Publ) | Methods and apparatus for allocating service costs in a telecommunications network |
CN105024947A (zh) * | 2015-07-28 | 2015-11-04 | 北京百度网讯科技有限公司 | 用于监控网络业务量的方法和装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114765562A (zh) * | 2020-12-31 | 2022-07-19 | 南京医渡云医学技术有限公司 | 云服务计费方法及系统、存储介质及电子终端 |
Also Published As
Publication number | Publication date |
---|---|
CN105024947A (zh) | 2015-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017016113A1 (zh) | 用于监控网络业务量的方法和装置 | |
TWI761349B (zh) | 風險識別方法、客戶端設備及風險識別系統 | |
US10783267B2 (en) | Centralized throttling service | |
US11146502B2 (en) | Method and apparatus for allocating resource | |
WO2018133306A1 (zh) | 内容分发网络中的调度方法和设备 | |
US10284487B2 (en) | Software load balancer to maximize utilization | |
US9544195B1 (en) | Bandwidth monitoring for data plans | |
US20150269377A1 (en) | Low latency, high payload, high volume api gateway | |
CN107241380B (zh) | 用于基于时间调整的负载均衡的方法和设备 | |
US20200380984A1 (en) | Synchronization of remote context data | |
WO2017167121A1 (zh) | 确定及运用应用程序之间的关系关联的方法及装置 | |
WO2018214793A1 (zh) | 用于提供无线接入点分享反馈或激励信息的方法与设备 | |
TW201519674A (zh) | 資料頻寬管理系統及方法 | |
US10212194B2 (en) | Server controlled throttling of client to server requests | |
US20200019560A1 (en) | Systems and methods for providing predictions to applications executing on a computing device | |
WO2017075967A1 (zh) | 在线媒体服务的带宽分配方法及系统 | |
US20070265976A1 (en) | License distribution in a packet data network | |
CN109428926B (zh) | 一种调度任务节点的方法和装置 | |
CN105991407B (zh) | 一种消息处理方法、装置及处理服务器 | |
CN110401731B (zh) | 用于分配内容分发节点的方法和装置 | |
CN114175602A (zh) | 云资源的权限管理 | |
CN109861922B (zh) | 用于控制流量的方法和装置 | |
WO2019109922A1 (zh) | 资源处理方法及系统、存储介质、电子设备 | |
CN111897659B (zh) | 业务处理频率的控制方法、系统、装置、电子设备 | |
US10547497B1 (en) | Methods and systems for providing predictive rating using a buffer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15899465 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15899465 Country of ref document: EP Kind code of ref document: A1 |