CN111641513A - Method for measuring time of elastic public network IP - Google Patents
Method for measuring time of elastic public network IP Download PDFInfo
- Publication number
- CN111641513A CN111641513A CN202010393395.1A CN202010393395A CN111641513A CN 111641513 A CN111641513 A CN 111641513A CN 202010393395 A CN202010393395 A CN 202010393395A CN 111641513 A CN111641513 A CN 111641513A
- Authority
- CN
- China
- Prior art keywords
- time
- state
- timing
- metering
- product
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000012217 deletion Methods 0.000 claims description 11
- 230000037430 deletion Effects 0.000 claims description 11
- 238000005259 measurement Methods 0.000 claims description 9
- 239000000725 suspension Substances 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
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
- H04L12/1403—Architecture for metering, charging or billing
-
- 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/1432—Metric aspects
- H04L12/1439—Metric aspects time-based
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a method for measuring an elastic public network IP according to time, which comprises the following steps: s1, creating a product use time amount recording table for recording the specification, the starting timing time, the ending timing time and the current running state of each product instance; s2, configuring a starting timing function, storing product information into a product use time amount recording table, recording the current time, recording the end timing as null, and recording the running state as running; s3, configuring a finishing timing function, modifying a product use time quantum recording list, and dividing the finishing timing into finishing timing after the resource is deleted and finishing timing after the resource is suspended; and S4, configuring a metering information inquiry function, and inquiring according to the specification and the metering period of each product instance recorded by the product use time amount recording list. The method for metering the IP of the elastic public network according to the time records the time usage of each instance of the EIP product, can be used for inquiring the usage of any time period, and has higher flexibility.
Description
Technical Field
The invention belongs to the field of public network IP metering, and particularly relates to a method for metering an elastic public network IP according to time.
Background
An Elastic IP Address (EIP) is a public IP Address resource that can be purchased and held independently. The EIP also divides the EIP into different line types according to different supported operators, wherein the EIP supporting a single operator is called single-line EIP, the EIP supporting multiple operators is called BGP multi-line EIP, and for EIP products, a public cloud operator establishes a plurality of charging modes, wherein the charging modes comprise charging according to the using time of a user, so that the counting of the using time of the EIP is the basis of the charging modes.
Disclosure of Invention
In view of this, the present invention is directed to a method for measuring time by using an elastic public network IP, and aims to enable a public cloud operator to conveniently obtain the time usage of each user EIP and to charge according to the time.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method for measuring an IP (Internet protocol) of an elastic public network according to time comprises the following steps:
s1, creating a product use time amount recording table for recording the specification, the starting timing time, the ending timing time and the current running state of each product instance;
s2, configuring a starting timing function, storing product information into a product use time amount recording table, recording the current time, recording the end timing as null, and recording the running state as running;
s3, configuring a finishing timing function, modifying a product use time quantum recording list, and dividing the finishing timing into finishing timing after the resource is deleted and finishing timing after the resource is suspended;
and S4, configuring a metering information inquiry function, and inquiring according to the specification and the metering period of each product instance recorded by the product use time amount recording list.
Further, the method for ending due to the resource suspension operation in step S3 is as follows: and according to the returned resources needing to be timed out, modifying the time for finishing timing into the current time, and recording the running state as suspended.
Further, the timing method for ending due to the resource deletion operation in step S3 is as follows: and modifying the product state of the resource into a deletion state, and recording the running state as suspended.
Further, if the current status of the resource Id requiring timing ending returned in step S3 is running status, the ending timing time is modified to be the current time, and the running status is recorded as suspended.
A metering step of a method for metering an IP of an elastic public network according to time comprises the following steps:
a1, creating an elastic public network IP, and timing by applying the starting timing function configured in the step S2;
a2, if the running state of the elastic public network IP is suspended or deleted, executing the end timing configured in the step S3;
if the running state of the elastic public network IP is restarted in a pause state, executing timing operation;
and if the IP bandwidth of the elastic public network is modified, ending the timing operation and starting the timing operation.
A3, using the inquiry time measurement function to inquire the IP time usage of the elastic public network in a measurement period;
further, the query time measurement function in step a3 includes different state resource measurement modules and a time interval measurement module;
the different-state resource metering module inquires the specific time usage amount in each state according to different resource states of the product;
and the time interval metering module calculates the usage amount according to the metering cycle time and the actual state existence time.
Further, in the time interval metering module, if the metering time interval contains or is equal to the state time interval, the time usage amount between the state time intervals is calculated;
if the measuring time intervals are contained in the state time intervals, calculating the time usage between the measuring time intervals;
if the metering time interval and the state time interval are crossed, calculating the time usage between the state starting time and the metering ending time;
and if the metering time interval and the state time interval intersect, calculating the time usage between the metering start time and the state end time.
Further, in the resource metering module with different states, a product use time amount record table is inquired according to the product Id, the product type and the resource state of the product, and records of the running state, the deletion state and the pause state are obtained.
Compared with the prior art, the method for metering the IP of the elastic public network according to the time has the following advantages:
(1) the method for metering the IP of the elastic public network according to the time records the time usage of each instance of an EIP product, can be used for inquiring the usage of any time period, and has more flexibility;
(2) the method for metering the elastic public network IP according to the time simplifies the storage amount of the product time usage amount data in the database table.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic diagram of a timing start step according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an ending timing step according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating query metering steps according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1 to 3, a method for metering an elastic public network IP by time includes the following steps:
s1, creating a product use time amount recording table for recording the specification, the starting timing time, the ending timing time and the current running state of each product instance;
s2, configuring a starting timing function, storing product information into a product use time amount recording table, recording the current time, recording the end timing as null, and recording the running state as running;
s3, configuring a finishing timing function, modifying a product use time quantum recording list, and dividing the finishing timing into finishing timing after the resource is deleted and finishing timing after the resource is suspended;
and S4, configuring a metering information inquiry function, and inquiring according to the specification and the metering period of each product instance recorded by the product use time amount recording list.
The method for ending due to the resource suspension operation in step S3 is as follows: and according to the returned resources needing to be timed out, modifying the time for finishing timing into the current time, and recording the running state as suspended.
The timing method for ending due to the resource deletion operation in step S3 is as follows: and modifying the product state of the resource into a deletion state, and recording the running state as suspended.
If the current status of the resource Id required to finish timing returned in step S3 is running status, the ending timing time is modified to be the current time, and the running status is recorded as suspended.
A metering step of a method for metering an IP of an elastic public network according to time comprises the following steps:
a1, creating an elastic public network IP, and timing by applying the starting timing function configured in the step S2;
a2, if the running state of the elastic public network IP is suspended or deleted, executing the end timing configured in the step S3;
if the running state of the elastic public network IP is restarted in a pause state, executing timing operation;
and if the IP bandwidth of the elastic public network is modified, ending the timing operation and starting the timing operation.
A3, using the inquiry time measurement function to inquire the IP time usage of the elastic public network in a measurement period;
the inquiry time measuring function in the step A3 comprises different state resource measuring modules and a time interval measuring module;
the different-state resource metering module inquires the specific time usage amount in each state according to different resource states of the product;
and the time interval metering module calculates the usage amount according to the metering cycle time and the actual state existence time.
In the time interval metering module, if the metering time interval contains or is equal to the state time interval, calculating the time usage between the state time intervals;
if the measuring time intervals are contained in the state time intervals, calculating the time usage between the measuring time intervals;
if the metering time interval and the state time interval are crossed, calculating the time usage between the state starting time and the metering ending time;
and if the metering time interval and the state time interval intersect, calculating the time usage between the metering start time and the state end time.
In the resource metering module with different states, a product use time amount record table is inquired according to the product Id, the product type and the resource state of the product, and records of the running state, the deletion state and the pause state are obtained.
In the course of the specific implementation,
1. the product usage time recording table is designed to record the specification, start and end timing time and status, etc. of each product instance as shown in the following table:
2. starting a timing function, storing product information into a tbl _ products _ time _ volume _ record table, wherein the static _ start _ time records the current time, the static _ end _ time is set to be empty, the action _ type is set to be 0, and the product is in a running state;
3. the timing ending function modifies the tbl _ products _ time _ volume _ record table, the timing ending comprises two conditions, the timing ending after the resource is deleted and the timing ending after the resource is suspended, if the operation timing ending is suspended, according to the transmitted resource Id needing to be timed, the static _ end _ time is modified to be the current time, the action _ type is changed to be 1, and the product state is suspended; if the current state is the suspended state, the product state of the resource is only required to be modified to be the deleted state, the action _ type is set to be 2, the timing ending time is not required to be changed, if the current state is the running state, the timing ending _ time is modified to be the current time, and the action _ type is set to be 2, which indicates that the product state is deleted;
4. inquiring the metering information, namely inquiring according to the product Id, the type, the metering type and the metering period, wherein the method comprises the following conditions:
(1) if the resource status action _ type is in a deleted status, one instance has only one record, there must be no running status, there may be a suspended status (there may be multiple records), and there is time before the deleted status;
(2) if the resource status action _ type is running, an instance has only one record, there must not be a deleted status, there may be a suspended status (possibly multiple records), and there is time before the running status;
(3) if the resource status action _ type is suspended, an instance may have multiple records; the amount of time used within the metering period is counted, as described above.
The specific implementation steps are as follows:
1. when the EIP is created, starting timing, namely starting timing function mentioned in the above method description;
2. if the EIP is suspended or deleted, ending the timing operation, namely ending the timing function mentioned in the above method description;
3. if the EIP in the pause state is restarted, executing the timing operation;
4. if the EIP bandwidth is modified, timing ending operation and timing starting operation are carried out;
5. the EIP time usage amount of one metering period is inquired, and an inquiry time metering function is needed, and the function is divided into two modules:
the different-state resource metering module is used for inquiring the specific time usage amount in each state according to different resource states of the product;
the time interval metering module calculates the usage amount according to the metering cycle time and the actual state existing time;
6. the time interval metering module comprises four steps:
(1) the metering time interval comprises or is equal to the state time intervals, and the time usage between the state time intervals is calculated;
(2) the measuring time intervals are contained in the state time intervals, and the time usage between the measuring time intervals is calculated;
(3) the metering time interval is crossed with the state time interval, and the time usage between the state starting time and the metering ending time is calculated;
(4) the metering time interval and the state time interval are crossed, and the time usage between the metering start time and the state end time is calculated;
7) resource metering modules in different states are divided into five steps:
(1) resource status query based on product Id, product type, and product
tbl _ products _ time _ volume _ record table, acquiring records of running state, deleting state and pause state;
(2) if the record of the pause state is not empty, possibly having a plurality of records, namely a plurality of time intervals of the pause state, calling the time interval metering module in the step 6, and calculating all time usage under the state;
(3) if the record of the deletion state is not empty, only one record is available, namely a time interval of the deletion state is available, the time interval metering module in the step 6 is called, and the time usage amount in the state is calculated;
(4) if the record of the running state is not empty, only one record is available, namely a time interval of the running state exists, the time interval metering module in the step 6 is called, the current time is taken as the end time of the running state, and the time usage amount in the state is calculated;
(5) the time usage for all the different states in the metering time interval is aggregated.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (8)
1. A method for measuring the IP of an elastic public network according to time is characterized by comprising the following steps:
s1, creating a product use time amount recording table for recording the specification, the starting timing time, the ending timing time and the current running state of each product instance;
s2, configuring a starting timing function, storing product information into a product use time amount recording table, recording the current time, recording the end timing as null, and recording the running state as running;
s3, configuring a finishing timing function, modifying a product use time quantum recording list, and dividing the finishing timing into finishing timing after the resource is deleted and finishing timing after the resource is suspended;
and S4, configuring a metering information inquiry function, and inquiring according to the specification and the metering period of each product instance recorded by the product use time amount recording list.
2. The method of claim 1, wherein the method comprises: the method for ending due to the resource suspension operation in step S3 is as follows: and according to the returned resources needing to be timed out, modifying the time for finishing timing into the current time, and recording the running state as suspended.
3. The method of claim 1, wherein the method comprises: the timing method for ending due to the resource deletion operation in step S3 is as follows: and modifying the product state of the resource into a deletion state, and recording the running state as suspended.
4. The method of claim 1, wherein the method comprises: if the current status of the resource Id required to finish timing returned in step S3 is running status, the ending timing time is modified to be the current time, and the running status is recorded as suspended.
5. The metering step of the method for metering the IP of the elastic public network according to the time according to claim 1 comprises the following steps:
a1, creating an elastic public network IP, and timing by applying the starting timing function configured in the step S2;
a2, if the running state of the elastic public network IP is suspended or deleted, executing the end timing configured in the step S3;
if the running state of the elastic public network IP is restarted in a pause state, executing timing operation;
and if the IP bandwidth of the elastic public network is modified, ending the timing operation and starting the timing operation.
A3, using the inquiry time measurement function to inquire the IP time usage of the elastic public network in a measurement period.
6. The method of claim 5, wherein the method comprises: the inquiry time measuring function in the step A3 comprises different state resource measuring modules and a time interval measuring module;
the different-state resource metering module inquires the specific time usage amount in each state according to different resource states of the product;
and the time interval metering module calculates the usage amount according to the metering cycle time and the actual state existence time.
7. The method of claim 6, wherein the method comprises: in the time interval metering module, if the metering time interval contains or is equal to the state time interval, calculating the time usage between the state time intervals;
if the measuring time intervals are contained in the state time intervals, calculating the time usage between the measuring time intervals;
if the metering time interval and the state time interval are crossed, calculating the time usage between the state starting time and the metering ending time;
and if the metering time interval and the state time interval intersect, calculating the time usage between the metering start time and the state end time.
8. The method of claim 6, wherein the method comprises: in the resource metering module with different states, a product use time amount record table is inquired according to the product Id, the product type and the resource state of the product, and records of the running state, the deletion state and the pause state are obtained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010393395.1A CN111641513A (en) | 2020-05-11 | 2020-05-11 | Method for measuring time of elastic public network IP |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010393395.1A CN111641513A (en) | 2020-05-11 | 2020-05-11 | Method for measuring time of elastic public network IP |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111641513A true CN111641513A (en) | 2020-09-08 |
Family
ID=72332712
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010393395.1A Pending CN111641513A (en) | 2020-05-11 | 2020-05-11 | Method for measuring time of elastic public network IP |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111641513A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112968802A (en) * | 2021-02-25 | 2021-06-15 | 紫光云技术有限公司 | Universal method for managing IP state and relation of elastic public network |
CN113037815A (en) * | 2021-02-25 | 2021-06-25 | 紫光云技术有限公司 | Method for operating EIP (extended Access Point) under BWS (broadband remote Access Server) service interruption or EIP service interruption scene |
CN113806367A (en) * | 2021-09-08 | 2021-12-17 | 紫光云(南京)数字技术有限公司 | Method for measuring elastic public network IP according to pause time |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101964966A (en) * | 2009-07-24 | 2011-02-02 | 中兴通讯股份有限公司 | Business flow timeout statistical method and business flow timeout statistical system |
CN102217227A (en) * | 2008-11-19 | 2011-10-12 | 诺基亚西门子通信公司 | Methods, apparatuses, system and related computer program product for charging of always-on connections |
CN103166989A (en) * | 2011-12-13 | 2013-06-19 | 中国电信股份有限公司 | Resource use metering method and resource use metering system for cloud computing |
CN107919968A (en) * | 2016-10-08 | 2018-04-17 | 中兴通讯股份有限公司 | A kind of charging method and device |
-
2020
- 2020-05-11 CN CN202010393395.1A patent/CN111641513A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102217227A (en) * | 2008-11-19 | 2011-10-12 | 诺基亚西门子通信公司 | Methods, apparatuses, system and related computer program product for charging of always-on connections |
CN101964966A (en) * | 2009-07-24 | 2011-02-02 | 中兴通讯股份有限公司 | Business flow timeout statistical method and business flow timeout statistical system |
CN103166989A (en) * | 2011-12-13 | 2013-06-19 | 中国电信股份有限公司 | Resource use metering method and resource use metering system for cloud computing |
CN107919968A (en) * | 2016-10-08 | 2018-04-17 | 中兴通讯股份有限公司 | A kind of charging method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112968802A (en) * | 2021-02-25 | 2021-06-15 | 紫光云技术有限公司 | Universal method for managing IP state and relation of elastic public network |
CN113037815A (en) * | 2021-02-25 | 2021-06-25 | 紫光云技术有限公司 | Method for operating EIP (extended Access Point) under BWS (broadband remote Access Server) service interruption or EIP service interruption scene |
CN112968802B (en) * | 2021-02-25 | 2023-04-18 | 紫光云技术有限公司 | Universal method for managing IP state and relation of elastic public network |
CN113806367A (en) * | 2021-09-08 | 2021-12-17 | 紫光云(南京)数字技术有限公司 | Method for measuring elastic public network IP according to pause time |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111641513A (en) | Method for measuring time of elastic public network IP | |
CN103235820B (en) | Date storage method and device in a kind of group system | |
CN105338297B (en) | A kind of storage of video data and playback system, device and method | |
CN104780210B (en) | Load-balancing method and device | |
CN109117275B (en) | Account checking method and device based on data slicing, computer equipment and storage medium | |
CN106776823B (en) | A kind of time series data management method, equipment and device | |
CN108509326A (en) | A kind of service state statistical method and system based on nginx daily records | |
CN106771880B (en) | A kind of distribution network electricity anti-stealing system | |
CN109299157A (en) | A kind of data export method and device of distributed big single table | |
CN107181821A (en) | A kind of information push method and device based on SSE specifications | |
CN105468619B (en) | Resource allocation methods and device for database connection pool | |
JP2003198599A (en) | Method for metering network usage | |
CN109901798A (en) | Date storage method and device | |
CN106326280B (en) | Data processing method, device and system | |
CN110324403A (en) | Dynamic divides library method for routing, device, server and storage medium | |
CN107819632A (en) | A kind of dynamic load leveling group system based on performance monitoring system and Docker Swarm | |
CN112671597A (en) | Method for carrying out sectional statistics on internal and external flows of elastic public network IP in shared bandwidth | |
CN111901385A (en) | Cloud hard disk speed limiting method, system and device and computer readable storage medium | |
CN108495075A (en) | Video communication method and device | |
CN106447242B (en) | Electricity consumption service handling time limit management method and device | |
CN111625541A (en) | Method for measuring IP (Internet protocol) of elastic public network according to flow | |
CN111935310A (en) | Data reporting system and data reporting method applied to terminal of Internet of things | |
CN104822140B (en) | A kind of method and network communicating system of data query | |
CN105893150A (en) | Interface calling frequency control and interface calling request processing method and device | |
CN107515864A (en) | The method and apparatus of control work flows |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200908 |
|
RJ01 | Rejection of invention patent application after publication |