CN110933241B - Method, device, equipment and medium for sending online charging request - Google Patents

Method, device, equipment and medium for sending online charging request Download PDF

Info

Publication number
CN110933241B
CN110933241B CN201811096355.XA CN201811096355A CN110933241B CN 110933241 B CN110933241 B CN 110933241B CN 201811096355 A CN201811096355 A CN 201811096355A CN 110933241 B CN110933241 B CN 110933241B
Authority
CN
China
Prior art keywords
online charging
period
sending
charging request
client
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.)
Active
Application number
CN201811096355.XA
Other languages
Chinese (zh)
Other versions
CN110933241A (en
Inventor
范典华
白国涛
李裕虹
代蕊
张晓京
孙翠锋
杨奇民
郑伟光
刘虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811096355.XA priority Critical patent/CN110933241B/en
Publication of CN110933241A publication Critical patent/CN110933241A/en
Application granted granted Critical
Publication of CN110933241B publication Critical patent/CN110933241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/64On-line charging system [OCS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/67Transmitting arrangements for sending billing related information

Abstract

The invention discloses a method, a device, equipment and a medium for sending an online charging request, which are applied to the technical field of communication and used for solving the problem of online charging failure caused by centralized reporting of the online charging request. The method specifically comprises the following steps: the online charging system receives an online charging request; acquiring the time period of the online charging request as the sending period of the next online charging request sent by the client and carrying the sending period in the online charging response to return to the client, wherein the time periods of at least two online charging requests in the plurality of online charging requests received in the set time range are different; and the client sends the online charging request according to the sending period carried by the online charging response. When the time period of the online charging request is obtained, the time periods of at least two online charging requests in the plurality of online charging requests received in the set time range are different, so that discretization processing of the sending period is realized, and the problem of online charging failure caused by centralized reporting is avoided.

Description

Method, device, equipment and medium for sending online charging request
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a medium for sending an online charging request.
Background
The online charging is a charging mode of instant charging in the process of using a service by a user, specifically, when receiving a service use request initiated by the user for a certain service, a client sends the service charging request to an online charging system through a core network control node and an online charging message forwarding node in sequence, after receiving the service charging request, the online charging system allocates an available quota for the service according to the service information of the service, package information used by the user, the service quantity used by the user and other data information, carries the allocated available quota in an online charging response, returns to the client through the online charging message forwarding node and the core network control node in sequence, after receiving the online charging response, the client controls the use of the service by the user according to the available quota carried in the online charging response, and when determining that the available quota of the service is used completely, and sending the service charging request to the online charging system again to acquire a new available quota, so that online charging of the service is realized.
At present, in order to improve the accuracy of online charging, an online charging system also carries a sending period for sending a service charging request and an available quota together in an online charging response and returns the service to a client, so that after the client receives the online charging response, the client also periodically sends the online charging request to the online charging system according to the sending period carried in the online charging response in the process of controlling the service used by a user according to the available quota carried in the online charging response.
In addition, because different geographic locations and charging modes corresponding to mobile data are different, in order to further improve the accuracy of online charging, the online charging system configures not only a sending period of a service charging request, but also some triggering conditions for sending the service charging request, for example, the triggering conditions may be that the location where a user is located changes or mobile data used by the user is switched, so that after the triggering conditions are carried in an online charging response together with the sending period and an available quota and returned to a client, in the process that the client controls the use of the service by the user according to the available quota carried in the online charging response, in addition to periodically sending the online charging request to the online charging system according to the sending period carried in the online charging response, when the triggering conditions are determined to be satisfied, and sending the online charging request to an online charging system.
However, in practical applications, a user usually uses multiple services, when a location of the user changes or mobile data used by the user is switched, a client sends online charging requests to an online charging system at the same time for each service currently used by the user, after the online charging system receives the online charging requests initiated by the client for each service currently used by the user, corresponding online charging responses are returned for each online charging request at the same time, since sending periods of the online charging requests carried in each online charging response are the same, when a sending period is reached, a situation that online charging requests are reported intensively may occur, and the online charging system may consume a certain time when processing the online charging requests, which may possibly cause a part of online charging request processing to be overtime, thereby causing the failure of the corresponding service online charging.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for sending an online charging request, so as to solve a problem in the prior art that an online charging failure may occur due to centralized reporting of online charging requests in a sending method of an online charging request.
The embodiment of the invention provides the following specific technical scheme:
a method for configuring the sending period of an online charging request comprises the following steps:
receiving an online charging request sent by a client;
acquiring available quota information of the user service based on the service charging information of the user service carried in the online charging request;
acquiring a time period corresponding to the online charging request as a sending period for sending the online charging request next time by the client, wherein the time periods corresponding to at least two online charging requests in the plurality of online charging requests received in the set time range are different;
and carrying the available quota information and the sending period in the online charging response and returning the response to the client, so that the client controls the use of the user service based on the available quota information and sends an online charging request according to the sending period.
In a possible implementation manner, if time periods corresponding to a plurality of online charging requests received within a set time range are different from each other, acquiring the time period corresponding to the online charging request as a sending period for the client to send the online charging request next time, includes:
and selecting a time period from a period data table recorded with a plurality of time periods with different values as a sending period for sending the online charging request next time by the client.
In a possible implementation manner, after selecting one time period from a period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, the method further includes:
the selected time period is deleted from the period data table.
In a possible implementation manner, before selecting a time period from a period data table in which a plurality of time periods with different values are recorded as a sending period for sending an online charging request next time by a client, the method further includes:
and inquiring the number of the time periods recorded in the period data table, and determining that the number of the time periods recorded in the period data table is greater than a first set threshold value.
In one possible implementation, if it is determined that the number of time periods recorded in the period data table is not greater than the first set threshold, the following operations are performed in a loop until the number of time periods recorded in the period data table reaches the second set threshold:
randomly generating an initial period within a set value range;
judging whether a time period with the same value as the initial period exists in the period data table or not;
if the time period does not exist, recording the initial period as the time period into a period data table;
and if so, determining that the initial period generated by the current cycle is invalid, and entering the next cycle process.
In one possible embodiment, the plurality of time periods recorded in the period data table are arranged in order of magnitude of the values.
In a possible implementation manner, selecting one time period from a period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time includes:
if the plurality of time periods recorded in the periodic data table are arranged in the order of the numerical values from small to large, selecting the first time period recorded in the periodic data table as the sending period for the client to send the online charging request next time;
and if the plurality of time periods recorded in the periodic data table are arranged according to the numerical value from large to small, selecting the last time period recorded in the periodic data table as the sending period for sending the online charging request next time by the client.
In a possible implementation manner, the method for configuring a sending period of an online charging request provided in the embodiment of the present invention further includes:
acquiring a trigger condition for a client to send an online charging request;
and carrying the trigger condition in the online charging response and returning the trigger condition to the client so that the client sends an online charging request according to the trigger condition in the process of controlling the use of the user service.
A method for sending an online charging request comprises the following steps:
receiving a service use request;
acquiring service charging information of a user service corresponding to the service use request, carrying the service charging information in the online charging request, and sending the service charging information to an online charging system;
receiving an online charging response returned by the online charging system, wherein the online charging response is returned after the online charging system obtains available quota information of user service based on service charging information and obtains a time period corresponding to an online charging request as a sending period for sending the online charging request next time, and the time periods corresponding to at least two online charging requests in a plurality of online charging requests received within a set time range are different;
and controlling the use of the user service based on the available quota information carried in the online charging response, and sending an online charging request to an online charging system according to the sending period carried in the online charging response in the process of controlling the use of the user service.
In a possible implementation manner, if the online charging response further carries a trigger condition for sending the online charging request, the process of controlling the use of the user service further includes:
and sending an online charging request to an online charging system according to the triggering condition.
An apparatus for configuring an online charging request transmission period, comprising:
the receiving unit is used for receiving an online charging request sent by a client;
a first obtaining unit, configured to obtain available quota information of the user service based on service charging information of the user service carried in the online charging request received by the receiving unit;
a second obtaining unit, configured to obtain a time period corresponding to the online charging request as a sending period for sending the online charging request next time by the client, where the time periods corresponding to at least two online charging requests in the multiple online charging requests received within the set time range are different;
and the returning unit is used for returning the available quota information obtained by the first obtaining unit and the sending period obtained by the second obtaining unit to the client by carrying the available quota information and the sending period in the online charging response, so that the client controls the use of the user service based on the available quota information and sends the online charging request according to the sending period.
In a possible implementation manner, if time periods corresponding to a plurality of online charging requests received within a set time range are different from each other, when the time period corresponding to the online charging request is acquired as a sending period for the client to send the online charging request next time, the second acquiring unit is configured to:
and selecting a time period from a period data table recorded with a plurality of time periods with different values as a sending period for sending the online charging request next time by the client.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: a deletion unit in which, among others,
and the deleting unit is used for deleting the selected time period from the periodic data table after the second acquiring unit selects one time period from the periodic data table in which a plurality of time periods with different values are recorded as the sending period for the client to send the online charging request next time.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: a query unit for, among other things,
and the query unit is used for querying the number of the time periods recorded in the periodic data table before the second acquisition unit selects one time period from the periodic data table in which a plurality of time periods with different values are recorded as the sending period for the client to send the online charging request next time, and determining that the number of the time periods recorded in the periodic data table is greater than the first set threshold.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: a maintenance unit, wherein,
the maintenance unit is used for circularly executing the following operations until the number of the time periods recorded in the periodic data table reaches a second set threshold value if the inquiry unit determines that the number of the time periods recorded in the periodic data table is not larger than the first set threshold value:
randomly generating an initial period within a set value range;
judging whether a time period with the same value as the initial period exists in the period data table or not;
if the time period does not exist, recording the initial period as the time period into a period data table;
and if so, determining that the initial period generated by the current cycle is invalid, and entering the next cycle process.
In a possible implementation, the plurality of time periods recorded in the periodic data table used by the second obtaining unit are arranged according to the magnitude order of the values.
In a possible implementation manner, when one time period is selected from the period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, the second obtaining unit is configured to:
if the plurality of time periods recorded in the periodic data table are arranged in the order of the numerical values from small to large, selecting the first time period recorded in the periodic data table as the sending period for the client to send the online charging request next time;
and if the plurality of time periods recorded in the periodic data table are arranged according to the numerical value from large to small, selecting the last time period recorded in the periodic data table as the sending period for sending the online charging request next time by the client.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: a third obtaining unit, wherein,
a third obtaining unit, configured to obtain a trigger condition for the client to send the online charging request;
and the returning unit is also used for returning the triggering condition obtained by the third obtaining unit to the client terminal by carrying the triggering condition in the online charging response, so that the client terminal sends the online charging request according to the triggering condition in the process of controlling the use of the user service.
A transmission apparatus of an online charging request, comprising:
a first receiving unit, configured to receive a service usage request;
the acquiring unit is used for acquiring service charging information of the user service corresponding to the service use request received by the first receiving unit;
the first sending unit is used for carrying the service charging information obtained by the obtaining unit in the online charging request and sending the service charging information to the online charging system;
the second receiving unit is used for receiving an online charging response returned by the online charging system, wherein the online charging response is returned after the online charging system acquires available quota information of the user service based on the service charging information and selects a time period as a sending period for sending the online charging request next time from a period data table in which a plurality of time periods with different values are recorded;
the control unit is used for controlling the use of the user service based on the available quota information carried in the online charging response received by the second receiving unit;
and the second sending unit is used for sending the online charging request to the online charging system according to the sending period carried in the online charging response received by the second receiving unit in the process that the control unit controls the use of the user service.
In a possible implementation manner, if the online charging response received by the second receiving unit further carries a trigger condition for sending the online charging request, the second sending unit is further configured to:
and in the process of controlling the use of the user service by the control unit, sending an online charging request to an online charging system according to the triggering condition.
A communication device, comprising: the system comprises a memory, a processor and a computer program stored on the memory, wherein the processor realizes the steps of the configuration method of the online charging request sending period provided by the embodiment of the invention when executing the computer program; or, the steps of the method for sending the online charging request provided by the embodiment of the present invention are implemented.
A computer storage medium storing an executable program, the executable program being executed by a processor to implement the steps of the method for configuring the online charging request transmission period provided by the embodiment of the present invention; or, the steps of the method for sending the online charging request provided by the embodiment of the present invention are implemented.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, when the time period corresponding to the received online charging request is obtained, the discretization processing of the sending period is realized by enabling the time periods of receiving at least two online charging requests in a plurality of online charging requests in the set time range to be different, even if a plurality of online service requests initiated aiming at a plurality of user services simultaneously are received, at least two sending periods carried by a plurality of online charging responses returned to the client by the online charging system are different, so that the non-fixed period sending of the online charging request is realized, and the problem of online charging failure caused by centralized reporting of the online charging requests is avoided as much as possible.
Drawings
Fig. 1A is a system architecture diagram formed by communication nodes involved in an online charging process according to an embodiment of the present invention;
fig. 1B is a flowchart illustrating an online charging method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an online charging method in a specific application scenario according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a periodic data table maintenance method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for sending an online charging request according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a method for sending an online charging request according to an embodiment of the present invention;
fig. 6 is a functional structure diagram of a configuration apparatus for an online charging request sending period provided in an embodiment of the present invention;
fig. 7 is a functional structure diagram of a sending apparatus of an online charging request provided in an embodiment of the present invention;
fig. 8 is a schematic hardware configuration diagram of a communication device provided in the embodiment of the present invention.
Detailed Description
Referring to fig. 1A, a system architecture diagram formed by communication nodes involved in an online charging process, at present, online charging is mainly performed on a user service based on the system architecture, specifically, referring to fig. 1B, a flow of an online charging method is as follows:
step 101: when receiving a service use request initiated by a user, a client establishes link connection with a core network control node (such as GGSN).
Step 102: after the client determines that the link connection is successfully established, the client initiates an online charging request to a core network control node.
Step 103: and after receiving the online charging request, the core network control node judges whether the user corresponding to the online charging request belongs to the online charging user.
Step 104: if the core network control node determines that the user corresponding to the online charging request belongs to the online charging user, the online charging request is forwarded to the online charging system through an online charging message forwarding node (such as a tandem proxy node).
Step 105: and after receiving the online charging request, the online charging system authenticates the user corresponding to the online charging request.
Step 106: if the online charging system determines that the user authentication corresponding to the online charging request passes, the online charging system obtains the available quota information based on the service charging information (such as the service type, the account balance, the signed package, the used service volume and the like) carried in the online charging request, and determines the sending period and the triggering condition of the online charging request (such as the change of the position of the user, the switching of the mobile data used by the user and the like).
Step 107: the online charging system carries the available quota information, the sending period and the triggering condition in the online charging response, and returns the online charging response to the client through the online charging message forwarding node and the core network control node.
Step 108: and after receiving the online charging response, the client controls the use of the user service according to the available quota information carried in the online charging response.
Step 109: and in the process of controlling the use of the user service, the client sends an online charging request to an online charging system according to the sending period and the triggering condition carried in the online charging response so as to acquire new available quota information.
The present online charging method is further described in detail with reference to specific application scenarios, and as shown in fig. 2, the specific flow of the online charging method is as follows:
step 201: the client receives a service use request 1 initiated by a user for the user service 1 at time T01, and sends the service use request 1 to the core network control node.
Step 202: after receiving the service usage request 1, the core network control node sends an online charging request 1-1 of the user service 1 corresponding to the service usage request 1 to an online charging system through an online charging message forwarding node (e.g., a tandem proxy node).
Step 203: after receiving the online charging request 1-1, the online charging system acquires the available quota information of the user service 1 based on the service charging information of the user service 1 carried in the online charging request 1-1, and determines the sending period and the triggering condition of the online charging request.
Step 204: the online charging system carries the sending period, the triggering condition and the available quota information of the user service 1 in the online charging response 1-1 through the online charging message forwarding node and the core network control node and returns the information to the client.
Step 205: and after receiving the online charging response 1-1, the client controls the user to use the user service 1 according to the available quota information of the user service 1 carried by the online charging response 1-1.
Step 206: the client receives a service use request 2 initiated by the user for the user service 2 at time T02, and sends the service use request 2 to the core network control node.
Step 207: after receiving the service use request 2, the core network control node sends an online charging request 2-1 of the user service 2 corresponding to the service use request 2 to an online charging system through an online charging message forwarding node.
Step 208: after receiving the online charging request 2-1, the online charging system acquires the available quota information of the user service 2 based on the service charging information of the user service 2 carried in the online charging request 2-1, and determines the sending period and the triggering condition of the online charging request.
Step 209: the online charging system carries the sending period, the triggering condition and the available quota information of the user service 2 in the online charging response 2-1 through the online charging message forwarding node and the core network control node and returns the information to the client.
Step 210: and after receiving the online charging response 2-1, the client controls the user to use the user service 2 according to the available quota information of the user service 2 carried by the online charging response 2-1.
Step 211: the client receives a service usage request 3 initiated by the user for the user service 3 at time T03, and sends the service usage request 3 to the core network control node.
Step 212: after receiving the service use request 3, the core network control node sends an online charging request 3-1 of the user service 3 corresponding to the service use request 3 to an online charging system through an online charging message forwarding node.
Step 213: after receiving the online charging request 3-1, the online charging system acquires the available quota information of the user service 3 based on the service charging information of the user service 3 carried in the online charging request 2-1, and determines the sending period and the triggering condition of the online charging request.
Step 214: the online charging system carries the sending period, the triggering condition and the available quota information of the user service 3 in the online charging response 3-1 through the online charging message forwarding node and the core network control node and returns the information to the client.
Step 215: and after receiving the online charging response 3-1, the client controls the user to use the user service 3 according to the available quota information of the user service 3 carried by the online charging response 3-1.
Step 216: the client determines that the position of the user is changed or mobile data used by the user is switched at the time of T11, and sends an online charging request 1-2 of the user service 1, an online charging request 2-2 of the user service 2 and an online charging request 3-2 of the user service 3 to the online charging system through the core network control node and the online charging message forwarding node.
Step 217: after receiving the online charging request 1-2, the online charging request 2-2 and the online charging request 3-2, the online charging system acquires available quota information of the user service 1, available quota information of the user service 2 and available quota information of the user service 3, and determines a sending period and a triggering condition of the user service 1, the user service 2 and the user service 3, wherein the sending period and the triggering condition of the user service 1, the user service 2 and the user service 3 are the same.
Step 218: the online charging system returns online charging response 1-2 of user service 1, online charging response 2-2 of user service 2 and online charging response 3-2 of user service 3 to the client through the online charging message forwarding node and the core network control node.
Step 219: after receiving the online charging response 1-2, the online charging response 2-2 and the online charging response 3-2, the client controls the use of the corresponding user service according to the available quota information of the user service 1 carried by the online charging response 1-2, the available quota information of the user service 2 carried by the online charging response 2-2 and the available quota information of the user service 3 carried by the online charging response 3-2.
Step 220: when the client determines that the sending period is reached at the time of T21, the client sends an online charging request 1-3 of the user service 1, an online charging request 2-3 of the user service 2 and an online charging request 3-3 of the user service 3 to an online charging system through a core network control node and an online charging message forwarding node.
Step 221, after the online charging system receives the online charging request 1-3, the online charging request 2-3 and the online charging request 3-3, the online charging request 1-3 and the online charging request 2-3 are successfully processed, and the online charging request 3-3 fails to be charged due to the overtime of the waiting process.
Step 222: the online charging system sends online charging response 1-3 of user service 1, online charging response 2-3 of user service 2 and online charging response 3-3 of user service 3 (charging failure) to the online charging system through the online charging message forwarding node and the core network control node.
Obviously, in the present online charging method, if a user uses a plurality of user services currently, after the location of the user changes or mobile data used by the user is switched, it is likely that a situation that online charging requests are centrally reported when a transmission period is reached due to the same transmission period carried in online charging responses returned by the online charging system for each user service occurs subsequently, so that the online charging system cannot timely process the centrally reported online charging requests, and thus a part of online charging requests are overtime, and further, online charging failure of the corresponding user services is caused.
Therefore, the inventor of the present invention thinks that, after an online charging system receives an online charging request sent by a client, and obtains available quota information of a user service based on service charging information of the user service carried in the online charging request, a time period can be selected from a period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, and the available quota information and the sending period are carried in an online charging response and returned to the client, so that, since the values of the time periods recorded in the period data table are different, the value of the sending period selected from the period data table at each time is also different, even if a plurality of online service requests initiated simultaneously for a plurality of user services are received, the sending periods carried in a plurality of online charging responses returned to the client are also different, therefore, the discretization processing of the sending period of the online charging request is realized, the non-fixed period sending of the online charging request is further realized, and the problem of online charging failure caused by centralized reporting of the online charging request is avoided as much as possible.
After briefly introducing the virtual content display method and the application scenario of the virtual content display method provided in the embodiment of the present invention, the following clearly and completely describes the technical solution in the embodiment of the present invention with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of embodiments of the present invention, and is not a whole embodiment. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to facilitate understanding of the present invention, a description will be given first of all to some technical terms involved in the embodiments of the present invention.
1. The client side is communication equipment which can provide a visual display interface and interact with a user for supporting various user services. For example, a computer, a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), an in-vehicle device, or other communication devices capable of implementing the above functions.
2. The online charging system is a communication system which can process the online charging request sent by the client and can perform online charging on the user service.
3. The service charging information of the user service is information parameters used by the online charging system in the online charging process of the user service, such as service type, account balance, subscription package, used service volume, and the like.
4. The available quota information of the user service is the available quota calculated by the online charging system for the user service according to the service charging information of the user service, such as the available mobile data volume, the available call duration, the available short credit and the like.
5. The sending period of the online charging request, and the time period configured for the online charging system to trigger the client to send the online charging request, for example, 20 minutes, 30 minutes, and the like.
6. The trigger condition for sending the online charging request, the condition configured for the online charging system for triggering the client to send the online charging request, for example, the location of the user changes, the mobile data used by the user is switched, and the like.
7. And the periodic data table is maintained for the online charging system and records a plurality of time periods with different values.
8. The plurality of online charging requests received within the set time range may be online charging requests simultaneously sent by the client for a plurality of currently used user services when the client determines that the location of the user is changed or mobile data used by the user is switched, or a plurality of online charging requests sent by the client according to a sending period carried in a corresponding online charging response in the process of controlling the use of a plurality of currently used user services after the client receives an online charging response returned by the server for a plurality of simultaneously sent online charging requests.
Referring to fig. 3, the online charging system may maintain the periodic data table in, but is not limited to, the following manner:
step 301: setting the value range of the sending period, initializing the period data table List, and setting the maximum number of time periods which can be recorded by the period data table List. For example, the value range is set to [ T-100, T ], and the maximum number is set to N.
Step 302: an initial period Tn within a value range [ T-100, T ] is randomly generated.
Step 303: judging whether a time period with the same value as the initial period Tn exists in the period data table List or not; if yes, go to step 304; if not, go to step 305.
Step 304: it is determined that the initial period Tn is invalid and the process returns to step 302.
Step 305: the initial period Tn is recorded as a time period into the period data table List.
Step 306: judging whether the number of the time periods recorded in the period data table List reaches a maximum number N; if yes, go to step 307; if not, return to step 302.
Step 307: and sorting the N time periods recorded in the period data table List according to the numerical value sequence of the time periods.
Step 308: and storing the sorted periodic data table in a specified storage area so as to search and call the periodic data table in the specified storage area in the following.
Next, a method for sending an online charging request according to an embodiment of the present invention is described in detail, and specifically, referring to fig. 4, a flow of the method for sending an online charging request according to an exemplary embodiment of the present invention is as follows:
step 401: the client receives a service usage request.
Step 402: and the client acquires the service charging information of the user service corresponding to the service use request.
Step 403: the client carries the service charging information in the online charging request and sends the service charging information to the online charging system.
Step 404: and the online charging system receives an online charging request sent by the client.
Step 405: and the online charging system acquires the available quota information of the user service based on the service charging information of the user service carried in the online charging request.
Step 406: and the online charging system acquires a time period corresponding to the online charging request as a sending period for sending the online charging request next time by the client, wherein the time periods corresponding to at least two online charging requests in the plurality of online charging requests received in the set time range are different.
In order to avoid the problem of centralized reporting of online charging requests as much as possible, in the embodiment of the present invention, it is an optimal embodiment that time periods corresponding to a plurality of online charging requests received within a set time range are different from each other, specifically, if the time periods corresponding to a plurality of online charging requests received within the set time range are different from each other, when step 406 is executed, the online charging system may adopt, but is not limited to, the following manners: and selecting a time period from a period data table recorded with a plurality of time periods with different values as a sending period for sending the online charging request next time by the client.
Further, in order to avoid the problem that the online charging system allocates the same sending period to different online charging requests, thereby causing the centralized reporting of the online charging requests, in the embodiment of the present invention, after the online charging system selects a time period from a periodic data table in which a plurality of time periods with different values are recorded as the sending period for the client to send the online charging request next time, the selected time period may be deleted from the periodic data table, so that the values of the plurality of time periods recorded in the periodic data table are always different.
In the embodiment of the present invention, since the online charging system selects a time period from the periodic data table in which a plurality of time periods with different values are recorded as the transmission period for the client to transmit the online charging request next time, the selected time period is deleted from the periodic data table, so that the number of the time periods recorded in the periodic data table is reduced, and in order to avoid the problem that the online charging system cannot process the online charging request in time due to the insufficient number of the time periods recorded in the periodic data table, in the embodiment of the present invention, the online charging system may further search the periodic data table from the specified storage area, determine whether the number of the time periods recorded in the periodic data table is greater than the first set threshold after determining the number of the time periods recorded in the periodic data table, when determining that the number of the time periods recorded in the periodic data table is greater than the first set threshold, and selecting a time period from a period data table recorded with a plurality of time periods with different values as a sending period for sending the online charging request next time by the client. Wherein the first set threshold may be a positive integer not less than 0.
It is worth mentioning that, when it is determined that the number of the time periods recorded in the periodic data table is not greater than the first set threshold, the periodic data table may be updated by using the periodic data table maintenance method provided in the embodiment of the present invention, specifically, if the first set threshold is equal to 0, the online charging system needs to update the periodic data table first, and then select a time period from the updated periodic data table as a sending period for the client to send the online charging request next time, and if the first set threshold is greater than 0, the update process of the periodic data table and the selection process of the time period may be performed without a sequential execution order or simultaneously, which is not specifically limited herein.
Further, in order to avoid the problem that the online charging requests are reported in a centralized manner due to the fact that the online charging requests processed first obtain a sending period with an increased value and the online charging requests processed later obtain a sending period with a smaller value, in the embodiment of the invention, if a plurality of time periods recorded in the periodic data table are arranged in the order of the values from small to large, the online charging system can select a first time period from the periodic data table as a sending period for the client to send the online charging requests next time; if the plurality of time periods recorded in the period data table are arranged in the order of the numerical values from large to small, the online charging system may select the last time period from the period data table as the sending period for the client to send the online charging request next time. Therefore, the first-processed online charging request can always obtain a sending period with a smaller numerical value, and the second-processed online charging request can always obtain a sending period with a larger numerical value, so that the problem of centralized reporting of the online charging requests is further avoided.
Step 407: and the online charging system returns the available quota information and the sending period carried in the online charging response to the client.
In specific implementation, the online charging system may further obtain a trigger condition for the client to send the online charging request, for example, a location where the user is located changes, mobile data used by the user is switched, and the obtained trigger condition, the available quota information, and the sending period are carried in the online charging response and returned to the client.
Step 408: and the client receives an online charging response returned by the online charging system.
Step 409: and the client controls the use of the user service based on the available quota information carried in the online charging response.
Step 410: and the client sends an online charging request to an online charging system according to the sending period carried in the online charging response in the process of controlling the use of the user service.
Correspondingly, if the received online charging response also carries a trigger condition for sending the online charging request, the client needs to send the online charging request to the online charging system according to the trigger condition in the process of controlling the use of the user service.
In this way, the values of the time periods recorded by the periodic data table are different, so that the values of the sending periods selected from the periodic data table at each time are also different, even if a plurality of online service requests initiated aiming at a plurality of user services simultaneously are received, the sending periods carried by a plurality of online charging responses returned to the client are also different, thereby realizing the discretization processing of the sending periods of the online charging requests, further realizing the non-fixed period sending of the online charging requests, and avoiding the problem of online charging failure caused by the concentrated reporting of the online charging requests as much as possible.
Referring to fig. 5, the method for sending an online charging request according to the exemplary embodiment of the present invention is described in further detail below with reference to specific application scenarios, and a specific flow of the method for sending an online charging request according to the exemplary embodiment of the present invention is as follows:
step 501: the client receives a video service using request initiated by a user through video software.
For example: the method comprises the steps that a user executes click operation on a certain video displayed on video software, and when the client monitors that the user executes click operation on the certain video displayed on the video software, the client determines that the user initiates a video service using request aiming at the video.
Step 502: and the client acquires the service charging information of the video service corresponding to the video service use request.
Step 503: the client establishes a link connection with a core network control node (e.g., GGSN, etc.).
Step 504: and after the client determines that the link connection is successfully established, carrying the obtained service charging information of the video service in an online charging request and sending the online charging request to the core network control node.
Step 505: and after receiving the online charging request, the core network control node judges whether the user corresponding to the online charging request belongs to the online charging user.
Step 506: if the core network control node determines that the user corresponding to the online charging request belongs to the online charging user, the core network control node forwards the online charging request to an online charging system through a message forwarding node (such as a tandem proxy node).
For example: and the core network control node can determine that the user corresponding to the online charging request belongs to the online charging user if determining that the user corresponding to the online charging request currently uses the mobile data according to the network configuration information carried in the online charging request, and at the moment, the online charging request can be forwarded to an online charging system through the message forwarding node.
Of course, if the core network control node determines that the user corresponding to the online charging request does not belong to the online charging user, the online charging process may be ended. For example: and if the core network control node determines that the user corresponding to the online charging request currently uses mobile data according to the network configuration information carried in the online charging request, the core network control node can determine that the user corresponding to the online charging request does not belong to the online charging user, and at the moment, the online charging process can be ended.
Step 507: and the online charging system receives the online charging request and authenticates the user corresponding to the online charging request.
Step 508: and if the online charging system determines that the user authentication corresponding to the online charging request passes, acquiring available quota information of the video service based on the service charging information of the video service carried in the online charging request.
Step 509: the online charging system searches the periodic data table from the designated storage area and acquires the number of the time periods recorded in the searched periodic data table.
Step 510: the online charging system determines whether the number of time periods recorded in the period data table is greater than 0 (i.e. a first set threshold), if not, step 511 is executed; if yes, go to step 517.
Step 511: the online charging system randomly generates an initial period within a range of [ T-100, T ] (i.e. a set value range).
Step 512: the online charging system judges whether a time period with the same numerical value as the initial period exists in the period data table; if yes, go to step 513; if not, go to step 514.
Step 513: the online charging system determines that the initial period generated by this cycle is invalid and returns to step 511.
Step 514: and the online charging system records the initial period generated by the cycle as a time period into a period data table.
Step 515: the online charging system judges whether the number of the time periods recorded in the period data table reaches N (namely a second set threshold value); if yes, go to step 516; if not, return to step 511.
Step 516: and the online charging system sorts the N time periods recorded in the periodic data table according to the sequence of the numerical values of the time periods from small to large, and stores the sorted periodic data table in a specified storage area.
517: the online charging system selects a first time period from the period data table as a sending period for sending the online charging request next time by the client.
Step 518: the online charging system acquires a trigger condition for the client to send the online charging request, wherein the trigger condition may be that the location of the user changes or mobile data used by the user is switched.
Step 519: the online charging system carries available quota information, sending period and triggering conditions of the video service in online charging response, and returns the online charging response to the client through the online charging message forwarding node and the core network control node.
Step 520: and the client receives the online charging response and controls the use of the video service according to the available quota information carried in the online charging response.
Step 521: and in the process of controlling the use of the video service, the client sends an online charging request to an online charging system according to the sending period and the triggering condition carried in the online charging response so as to acquire new available quota information and the sending period.
Based on the foregoing embodiments, an embodiment of the present invention provides a device for configuring an online charging request sending period, and referring to fig. 6, a device 600 for configuring an online charging request sending period according to an exemplary embodiment of the present invention at least includes:
a receiving unit 601, configured to receive an online charging request sent by a client;
a first obtaining unit 602, configured to obtain available quota information of a user service based on service charging information of the user service carried in the online charging request received by the receiving unit 601;
a second obtaining unit 603, configured to obtain a time period corresponding to the online charging request as a sending period for sending the online charging request next time by the client, where the time periods corresponding to at least two online charging requests in the multiple online charging requests received within the set time range are different;
a returning unit 604, configured to carry the available quota information obtained by the first obtaining unit 602 and the sending period obtained by the second obtaining unit 603 in an online charging response, and return the online charging response to the client, so that the client controls the use of the user service based on the available quota information, and sends an online charging request according to the sending period.
In a possible implementation manner, if time periods corresponding to a plurality of online charging requests received within a set time range are different from each other, when the time period corresponding to the online charging request is acquired as a sending period for the client to send the online charging request next time, the second acquiring unit 603 is configured to:
and selecting a time period from a period data table recorded with a plurality of time periods with different values as a sending period for sending the online charging request next time by the client.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: a deletion unit 605 for deleting, among others,
a deleting unit 605, configured to delete the selected time period from the periodic data table after the second obtaining unit 603 selects one time period from the periodic data table in which multiple time periods with different values are recorded, where the time period is used as a sending period for the client to send the online charging request next time.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: the query unit 606, where,
the querying unit 606 is configured to query, before the second obtaining unit 603 selects one time period from the periodic data table in which multiple time periods with different values are recorded, the number of the time periods recorded in the periodic data table before the client sends the online charging request next time, and determine that the number of the time periods recorded in the periodic data table is greater than a first set threshold.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: the maintenance unit 607, in which,
a maintaining unit 607, configured to, if the querying unit 606 determines that the number of time periods recorded in the periodic data table is not greater than the first set threshold, cyclically perform the following operations until the number of time periods recorded in the periodic data table reaches the second set threshold:
randomly generating an initial period within a set value range;
judging whether a time period with the same value as the initial period exists in the period data table or not;
if the time period does not exist, recording the initial period as the time period into a period data table;
and if so, determining that the initial period generated by the current cycle is invalid, and entering the next cycle process.
In a possible implementation, the plurality of time periods recorded in the periodic data table used by the second obtaining unit 603 are arranged according to the magnitude order of the values.
In a possible implementation manner, when selecting one time period from the period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, the second obtaining unit 603 is configured to:
if the plurality of time periods recorded in the periodic data table are arranged in the order of the numerical values from small to large, selecting the first time period recorded in the periodic data table as the sending period for the client to send the online charging request next time;
and if the plurality of time periods recorded in the periodic data table are arranged according to the numerical value from large to small, selecting the last time period recorded in the periodic data table as the sending period for sending the online charging request next time by the client.
In a possible implementation manner, the apparatus for configuring a sending period of an online charging request provided in an embodiment of the present invention further includes: a third acquisition unit 608, wherein,
a third obtaining unit 608, configured to obtain a trigger condition for the client to send the online charging request;
the returning unit 604 is further configured to carry the trigger condition obtained by the third obtaining unit 608 in the online charging response and return the online charging response to the client, so that the client sends the online charging request according to the trigger condition in the process of controlling the use of the user service.
In addition, an embodiment of the present invention further provides a device for sending an online charging request, and referring to fig. 7, a device 700 for sending an online charging request according to an exemplary embodiment of the present invention at least includes:
a first receiving unit 701, configured to receive a service usage request;
an obtaining unit 702, configured to obtain service charging information of a user service corresponding to the service usage request received by the first receiving unit 701;
a first sending unit 703, configured to send the service charging information obtained by the obtaining unit 702 to the online charging system by carrying the service charging information in the online charging request;
a second receiving unit 704, configured to receive an online charging response returned by the online charging system, where the online charging response is returned after the online charging system obtains available quota information of a user service based on service charging information, and selects a time period from a period data table in which multiple time periods with different values are recorded as a sending period for sending an online charging request next time, where the time periods corresponding to at least two online charging requests in the multiple online charging requests received within a set time range are different;
a control unit 705, configured to control use of a user service based on available quota information carried in the online charging response received by the second receiving unit 704;
a second sending unit 706, configured to send an online charging request to the online charging system according to a sending period carried in the online charging response received by the second receiving unit 704 in a process in which the control unit 705 controls the use of the user service.
In a possible implementation manner, if the online charging response received by the second receiving unit 706 further carries a trigger condition for sending the online charging request, the second sending unit 706 is further configured to:
in the process that the control unit 705 controls the use of the user service, an online charging request is sent to the online charging system according to the trigger condition.
It should be noted that, because the principle of solving the technical problem of the two apparatuses according to the exemplary embodiments of the present invention is similar to that of the method for sending the online charging request according to the exemplary embodiments of the present invention, the implementation of the two apparatuses may refer to the implementation of the method for sending the online charging request, and repeated details are not repeated.
Having described the method and related apparatus for sending an online charging request according to exemplary embodiments of the present invention, a brief description will be given of a communication device according to exemplary embodiments of the present invention.
Referring to fig. 8, a communication device 800 according to an exemplary embodiment of the present invention may include a processor 81, a memory 82, and a computer program stored on the memory 82, and when the processor 81 executes the computer program, the steps in the method of transmitting an online charging request according to an exemplary embodiment of the present invention are implemented.
It should be noted that the communication device 800 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present invention.
The communication device 800 of the exemplary embodiment of the present invention may also include a bus 83 that connects the various components, including the processor 81 and the memory 82. Bus 83 represents one or more of any of several types of bus structures, including a memory bus, a peripheral bus, a local bus, and so forth.
The Memory 82 may include readable media in the form of volatile Memory, such as Random Access Memory (RAM) 821 and/or cache Memory 822, and may further include Read Only Memory (ROM) 823.
The memory 82 may also include a program tool 825 having a set (at least one) of program modules 824, the program modules 824 including, but not limited to: an operating subsystem, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The communication device 800 may also communicate with one or more external devices 84 (e.g., a keyboard, a remote control, etc.), with one or more devices that enable a user to interact with the communication device 800, and/or with any devices (e.g., a router, a modem, etc.) that enable the communication device 800 to communicate with one or more other communication devices 800. Such communication may be through an Input/Output (I/O) interface 85. Further, the communication device 800 may also communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 86. As shown in fig. 8, the network adapter 86 communicates with the other modules of the communication device 800 via the bus 83. It should be understood that although not shown in fig. 8, other hardware and/or software modules may be used in conjunction with the communication device 800, including but not limited to: microcode, device drivers, Redundant processors, external disk drive Arrays, disk array (RAID) subsystems, tape drives, and data backup storage subsystems, to name a few.
The following describes a non-volatile computer-readable storage medium that is an exemplary embodiment of the present invention. An embodiment of the present invention provides a non-volatile computer-readable storage medium, where computer-executable instructions are stored in the non-volatile computer-readable storage medium, and the executable program is executed by a processor to implement the steps of the method for sending an online charging request according to the exemplary embodiment of the present invention. Specifically, the executable program may be built in the communication device 800, so that the communication device 800 may implement the steps of the method of transmitting an online charging request according to the exemplary embodiment of the present invention by executing the built-in executable program.
Furthermore, the method of transmitting an online charging request according to an exemplary embodiment of the present invention may also be implemented as a program product including program code for causing the communication device 800 to perform the steps of the method of transmitting an online charging request according to an exemplary embodiment of the present invention when the program product is run on the communication device 800.
The program product provided by the embodiment of the present invention may adopt any combination of one or more readable media, wherein the readable media may be readable signal media or readable storage media, and the readable storage media may be but not limited to systems, apparatuses or devices of electric, magnetic, optical, electromagnetic, infrared or semiconductor, or any combination thereof, and specifically, more specific examples (non-exhaustive list) of the readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a RAM, a ROM, an Erasable Programmable Read-Only Memory (EPROM), an optical fiber, a portable Compact disk Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product provided by the embodiment of the invention can adopt a CD-ROM and comprises program codes, and can run on a computing device. However, the program product provided by the embodiments of the present invention is not limited thereto, and in the embodiments of the present invention, the readable storage medium may be any tangible medium that can contain or store the program, which can be used by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device over any kind of network, such as over a LAN or WAN; alternatively, an external computing device may be connected (e.g., through the Internet using an Internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (22)

1. A method for configuring the sending period of an online charging request is characterized by comprising the following steps:
receiving an online charging request sent by a client;
acquiring available quota information of the user service based on service charging information of the user service carried in the online charging request;
acquiring a time period corresponding to the online charging request as a sending period for sending the online charging request by the client at the next time, wherein the time periods corresponding to at least two online charging requests in the plurality of online charging requests received in a set time range are different;
and carrying the available quota information and the sending period in an online charging response and returning the response to the client, so that the client controls the use of the user service based on the available quota information and sends an online charging request according to the sending period.
2. The method of claim 1, wherein the obtaining a time period corresponding to the online charging request as a sending period for the client to send the online charging request next time comprises:
if the time periods corresponding to the plurality of online charging requests received in the set time range are different, selecting one time period from a period data table in which a plurality of time periods with different values are recorded as the sending period for the client to send the online charging request next time.
3. The method as claimed in claim 2, wherein after selecting a time period from a period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, the method further comprises:
deleting the selected time period from the period data table.
4. The method as claimed in claim 2, wherein before selecting a time period from the period data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, the method further comprises:
and inquiring the number of the time periods recorded in the period data table, and determining that the number of the time periods recorded in the period data table is greater than a first set threshold value.
5. The method of claim 4, wherein if it is determined that the number of time periods recorded in the periodic data table is not greater than the first set threshold, then looping through the following until the number of time periods recorded in the periodic data table reaches a second set threshold:
randomly generating an initial period within a set value range;
judging whether a time period with the same value as the initial period exists in the period data table or not;
if the initial period does not exist, recording the initial period as a time period into the period data table;
and if so, determining that the initial period generated by the current cycle is invalid, and entering the next cycle process.
6. The method according to any one of claims 2 to 5, wherein the plurality of time periods recorded in the periodic data table are arranged in order of magnitude of the numerical value.
7. The method as claimed in claim 6, wherein selecting a time period from a period data table recorded with a plurality of time periods with different values as a sending period for the client to send the online charging request next time comprises:
if the plurality of time periods recorded in the periodic data table are arranged in the order of the numerical values from small to large, selecting the first time period recorded in the periodic data table as a sending period for sending the online charging request next time by the client;
and if the plurality of time periods recorded in the periodic data table are arranged according to the numerical value from large to small, selecting the last time period recorded in the periodic data table as the sending period for sending the online charging request next time by the client.
8. The method of claim 1, further comprising:
acquiring a trigger condition for the client to send the online charging request;
and returning the triggering condition carried in an online charging response to the client so that the client sends an online charging request according to the triggering condition in the process of controlling the use of the user service.
9. A method for sending an online charging request is characterized by comprising the following steps:
receiving a service use request;
acquiring service charging information of a user service corresponding to the service use request, carrying the service charging information in an online charging request, and sending the service charging information to an online charging system;
receiving an online charging response returned by the online charging system, wherein the online charging response is returned after the online charging system obtains available quota information of the user service based on the service charging information and obtains a time period corresponding to the online charging request as a sending period for sending the online charging request next time, and the time periods corresponding to at least two online charging requests in a plurality of online charging requests received within a set time range are different;
and controlling the use of the user service based on the available quota information carried in the online charging response, and sending an online charging request to the online charging system according to the sending period carried in the online charging response in the process of controlling the use of the user service.
10. The method of claim 9, wherein if the online charging response further carries a trigger condition for sending the online charging request, the method further comprises, in the process of controlling the use of the user service:
and sending an online charging request to the online charging system according to the triggering condition.
11. An apparatus for configuring a transmission period of an online charging request, comprising:
the receiving unit is used for receiving an online charging request sent by a client;
a first obtaining unit, configured to obtain available quota information of the user service based on service charging information of the user service carried in the online charging request received by the receiving unit;
a second obtaining unit, configured to obtain a time period corresponding to the online charging request as a sending period for sending the online charging request next time by the client, where the time periods corresponding to at least two online charging requests in the multiple online charging requests received within the set time range are different;
and a returning unit, configured to return the available quota information obtained by the first obtaining unit and the sending period obtained by the second obtaining unit to the client in an online charging response, so that the client controls the use of the user service based on the available quota information, and sends an online charging request according to the sending period.
12. The apparatus of claim 11, wherein the second obtaining unit is to:
if the time periods corresponding to the plurality of online charging requests received in the set time range are different, selecting one time period from a period data table in which a plurality of time periods with different values are recorded as the sending period for the client to send the online charging request next time.
13. The apparatus of claim 12, further comprising: a deletion unit in which, among others,
the deleting unit is configured to delete the selected time period from the periodic data table after the second obtaining unit selects one time period from the periodic data table in which the plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time.
14. The apparatus of claim 12, further comprising: a query unit for, among other things,
the query unit is configured to query the number of time periods recorded in the periodic data table before the second obtaining unit selects one time period from the periodic data table in which a plurality of time periods with different values are recorded as a sending period for the client to send the online charging request next time, and determine that the number of time periods recorded in the periodic data table is greater than a first set threshold.
15. The apparatus of claim 14, further comprising: a maintenance unit, wherein,
the maintenance unit is configured to, if the query unit determines that the number of time periods recorded in the periodic data table is not greater than the first set threshold, cyclically execute the following operations until the number of time periods recorded in the periodic data table reaches a second set threshold:
randomly generating an initial period within a set value range;
judging whether a time period with the same value as the initial period exists in the period data table or not;
if the initial period does not exist, recording the initial period as a time period into the period data table;
and if so, determining that the initial period generated by the current cycle is invalid, and entering the next cycle process.
16. The apparatus according to any one of claims 12 to 15, wherein the plurality of time periods recorded in the periodic data table used by the second obtaining unit are arranged in order of magnitude of the numerical value.
17. The apparatus as claimed in claim 16, wherein when a time period is selected from a period data table in which a plurality of time periods with different values are recorded as the sending period for the client to send the online charging request next time, the second obtaining unit is configured to:
if the plurality of time periods recorded in the periodic data table are arranged in the order of the numerical values from small to large, selecting the first time period recorded in the periodic data table as a sending period for sending the online charging request next time by the client;
and if the plurality of time periods recorded in the periodic data table are arranged according to the numerical value from large to small, selecting the last time period recorded in the periodic data table as the sending period for sending the online charging request next time by the client.
18. The apparatus of claim 11, further comprising: a third obtaining unit, wherein,
the third obtaining unit is configured to obtain a trigger condition for the client to send the online charging request;
the returning unit is further configured to return the triggering condition obtained by the third obtaining unit to the client in an online charging response, so that the client sends an online charging request according to the triggering condition in a process of controlling the use of the user service.
19. An apparatus for transmitting an online charging request, comprising:
a first receiving unit, configured to receive a service usage request;
an obtaining unit, configured to obtain service charging information of a user service corresponding to the service usage request received by the first receiving unit;
the first sending unit is used for carrying the service charging information obtained by the obtaining unit in an online charging request and sending the service charging information to an online charging system;
a second receiving unit, configured to receive an online charging response returned by the online charging system, where the online charging response is returned after the online charging system obtains available quota information of the user service based on the service charging information and obtains a time period corresponding to the online charging request as a sending period for sending an online charging request next time, where time periods corresponding to at least two online charging requests in a plurality of online charging requests received within a set time range are different;
a control unit, configured to control use of the user service based on the available quota information carried in the online charging response received by the second receiving unit;
and a second sending unit, configured to send an online charging request to the online charging system according to the sending period carried in the online charging response received by the second receiving unit in a process in which the control unit controls the use of the user service.
20. The apparatus of claim 19, wherein if the online charging response received by the second receiving unit further carries a trigger condition for sending the online charging request, the second sending unit is further configured to:
and in the process that the control unit controls the use of the user service, sending an online charging request to the online charging system according to the trigger condition.
21. A communication device, comprising: a memory, a processor and a computer program stored on the memory, the processor implementing the steps of the method for configuring a period for sending an online charging request according to any one of claims 1 to 8 when executing the computer program; or implementing the steps of the method of sending an online charging request according to any of claims 9-10.
22. A computer storage medium, characterized in that the computer storage medium stores an executable program, which is executed by a processor to implement the steps of the method for configuring an online charging request transmission period according to any one of claims 1 to 8; or implementing the steps of the method of sending an online charging request according to any of claims 9-10.
CN201811096355.XA 2018-09-19 2018-09-19 Method, device, equipment and medium for sending online charging request Active CN110933241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811096355.XA CN110933241B (en) 2018-09-19 2018-09-19 Method, device, equipment and medium for sending online charging request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811096355.XA CN110933241B (en) 2018-09-19 2018-09-19 Method, device, equipment and medium for sending online charging request

Publications (2)

Publication Number Publication Date
CN110933241A CN110933241A (en) 2020-03-27
CN110933241B true CN110933241B (en) 2021-03-23

Family

ID=69855255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811096355.XA Active CN110933241B (en) 2018-09-19 2018-09-19 Method, device, equipment and medium for sending online charging request

Country Status (1)

Country Link
CN (1) CN110933241B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773920A (en) * 2004-11-08 2006-05-17 华为技术有限公司 On-line charge processing method
CN101075887A (en) * 2007-07-19 2007-11-21 中国电信股份有限公司 Charge future mechanism
CN101277202A (en) * 2007-03-29 2008-10-01 华为技术有限公司 Charging method and system
CN101547140A (en) * 2008-03-28 2009-09-30 华为技术有限公司 Method and system for reporting data service volume and media processing and controlling device
CN101730046A (en) * 2009-02-18 2010-06-09 中兴通讯股份有限公司 Service policy control method and system
CN105515795A (en) * 2014-10-20 2016-04-20 中国电信股份有限公司 Method and system for controlling service capability of offline charging user
CN106612238A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Flow control method, device and system
WO2018004944A1 (en) * 2016-06-30 2018-01-04 Intel Corporation System to monitor and control data in a network
CN107809551A (en) * 2016-09-09 2018-03-16 华为技术有限公司 The processing duty control method and relevant apparatus and system of telecommunication service

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7734025B2 (en) * 2003-02-28 2010-06-08 Grape Technology Group, Inc. Methods and systems for providing on-line bills for use in communications services
CN101296513B (en) * 2008-04-22 2013-05-08 中兴通讯股份有限公司 Method for randomizing physical ascending control channel interference

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773920A (en) * 2004-11-08 2006-05-17 华为技术有限公司 On-line charge processing method
CN101277202A (en) * 2007-03-29 2008-10-01 华为技术有限公司 Charging method and system
CN101075887A (en) * 2007-07-19 2007-11-21 中国电信股份有限公司 Charge future mechanism
CN101547140A (en) * 2008-03-28 2009-09-30 华为技术有限公司 Method and system for reporting data service volume and media processing and controlling device
CN101730046A (en) * 2009-02-18 2010-06-09 中兴通讯股份有限公司 Service policy control method and system
CN105515795A (en) * 2014-10-20 2016-04-20 中国电信股份有限公司 Method and system for controlling service capability of offline charging user
CN106612238A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Flow control method, device and system
WO2018004944A1 (en) * 2016-06-30 2018-01-04 Intel Corporation System to monitor and control data in a network
CN107809551A (en) * 2016-09-09 2018-03-16 华为技术有限公司 The processing duty control method and relevant apparatus and system of telecommunication service

Also Published As

Publication number Publication date
CN110933241A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN113568884B (en) File management method and device, electronic equipment and storage medium
CN108023953B (en) High-availability implementation method and device for FTP service
CN107241380B (en) Method and apparatus for time-based adjusted load balancing
CN110233861B (en) CDN node scheduling method and device, storage medium and electronic equipment
KR102565857B1 (en) Service request processing method and related device
US20200327001A1 (en) Message processing method and system, storage medium and electronic device
CN105144109A (en) Distributed data center technology
CN113821721A (en) User portrait based multi-channel message method and device and computer equipment
CN102163197A (en) Skin changing method, system and device
CN104639646A (en) Method and equipment for processing user request
CN107342929B (en) Method, device and system for sending new message notification
CN106254443A (en) Information push method and device
CN108833588B (en) Session processing method and device
CN104580095A (en) API resource acquisition method and device
CN110933241B (en) Method, device, equipment and medium for sending online charging request
CN108900314A (en) A kind of the number of request charging method and device of network acceleration service
CN112169312A (en) Queuing scheduling method, device, equipment and storage medium for cloud game service
CN111770165A (en) Method and device for uploading files, electronic equipment and readable storage medium
CN113254191A (en) Method, electronic device and computer program product for running applications
CN106550002B (en) paas cloud hosting system and method
CN108616576B (en) Method and device for scheduling application server
CN103379015A (en) Website server and IM client data transmission method, apparatus and system
CN113965563B (en) Service processing method and device based on model and server
CN110798496A (en) CDN scheduling system, method and device
CN111555894B (en) Data processing method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant