A processing method and apparatus for identifying abnormal billing statuses.

By configuring event lists and billing anomaly status inspection interfaces for compute nodes, billing anomalies were identified and corrected, resolving billing anomaly issues on the scientific computing platform, improving user experience, and reducing economic losses.

CN119766582BActive Publication Date: 2026-01-30BEIJING DP TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411887322.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2026-01-30
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

On scientific computing platforms, billing anomalies lead to additional financial losses for users and reduce user experience, mainly because computing nodes continue to run time even when paused or terminated, resulting in continuous cost increases.

Method used

Configure a node event list for each compute node to record start, pause, resume, and end events in real time, and identify abnormal states through a billing anomaly check interface to correct charges.

Benefits of technology

This eliminates the financial losses to users caused by billing anomalies, and improves user experience and user stickiness on the platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766582B_ABST
    Figure CN119766582B_ABST
Patent Text Reader

Abstract

This invention relates to a method and apparatus for identifying billing anomalies. The method includes: assigning a billing account and creating computing nodes when a new computing task is created, configuring timers, billing accounts, timer rates, and event lists for each node, and establishing a user-task-node binding relationship; performing a corresponding operation on the timer's timing action when each node is subjected to a certain type of operation (start, pause, resume, or end computing operation), and adding a corresponding record to the event list; periodically updating the billing account during the start-up-end process of each node, and updating it again at the end; synchronously updating the billing account of its parent task when any node's billing account is updated; and identifying billing anomalies for all tasks / nodes bound to the user specified in the request when the billing anomaly check interface receives a check request. This invention can enhance platform user stickiness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a processing method and apparatus for identifying abnormal billing status. Background Technology

[0002] Scientific computing platforms typically involve two types of billing objects: computing tasks and computing nodes. A computing task consists of one or more computing nodes. The real-time cost of each computing node = node time-based unit price × runtime. The real-time cost of each computing task is the sum of the real-time costs of all corresponding computing nodes. In practical applications, we have found that during the billing process of scientific computing platforms, due to factors such as the complexity of the platform's asynchronous architecture and program runtime anomalies, a billing anomaly may occur: even when a computing node's computation process has been paused or terminated, its runtime continues to be timed, causing the real-time cost of the current node and the real-time cost of the upstream computing tasks to continuously increase. This billing anomaly can cause additional economic losses for platform users and also reduce the user experience of the platform.

[0003] To address this issue, we propose the following platform improvement solution: 1) Configure an additional node event list for each computing node, and add a node event record with event type "start / pause / resume / end" to this list in real time whenever a computing node is started / paused / resume / ends computing operations; 2) Add an additional billing anomaly status check interface and configure a corresponding billing anomaly status identification and processing mechanism for this interface. The processing of this billing anomaly status identification and processing mechanism is roughly as follows: First, estimate the actual runtime of each computing node under a specified user based on the node event list, and calculate the estimated cost of another node. Then, confirm whether each computing node has experienced a billing anomaly by comparing the estimated cost with the real-time cost, and obtain a corresponding abnormal node report. Next, obtain the estimated cost of each computing task under the current specified user by accumulating the estimated costs of the nodes, and confirm whether each computing task has experienced a billing anomaly by comparing the estimated cost with the real-time cost, and obtain a corresponding abnormal task report. Finally, the abnormal node report and the abnormal task report together form the final identification report, which is then returned. After adding the aforementioned platform improvement functions to the scientific computing platform, the platform's user account management component can obtain the billing anomaly status and corresponding normal billing fees for each user's computing tasks / nodes by calling the aforementioned billing anomaly status check interface during or after each user's computing task execution. This allows for proactive correction of anomaly charges for tasks / nodes, thereby eliminating additional economic losses for users and improving their user experience. The specific technical solution of this platform improvement scheme is the technical problem that this invention aims to solve. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a method, apparatus, electronic device, and computer-readable storage medium for identifying billing anomalies. When creating a new computing task for any user, this invention assigns a corresponding task identifier and a task billing account to the current computing task and binds the current user to the current computing task. Based on the current user's computing node setting as the current computing task, it creates one or more corresponding computing nodes, binds each newly created computing node to the current computing task, and assigns a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list to each computing node. When a computing node is started, paused, resumed, or terminated, the corresponding node timer is started, paused, resumed, or terminated, and a new node event record with the corresponding event type (start, pause, resume, or terminated) and the event time being the current time is added to the corresponding node event list. The invention also records the computing time from start to finish on each computing node. During the process, the node billing account is updated periodically based on the node timer duration multiplied by the node timer unit price. This update is also performed when each computing node finishes its computation. Furthermore, when a billing account for any computing task experiences a fee update, the account fees for all node billing accounts corresponding to the current computing task are summed, and the task billing account for the current computing task is updated based on the summed calculation result. An interface request is received on the billing anomaly check interface, and the user specified in each received first check request is designated as the first user. The billing anomaly status of all computing tasks and nodes bound to the first user is identified, and a corresponding first identification report is generated and sent back to the first request address specified in the current request. This invention can eliminate additional economic losses caused to users by billing anomalies, improve the user experience, and enhance user stickiness.

[0005] To achieve the above objectives, a first aspect of the present invention provides a method for identifying abnormal billing states, the method comprising:

[0006] When creating a new computing task for any user, a corresponding task identifier and task billing account are assigned to the current computing task; a binding relationship is established between the current user and the current computing task; and based on the current user's computing node settings, one or more corresponding computing nodes are created for the current computing task; a binding relationship is established between each newly created computing node and the current computing task; and a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list are assigned to each computing node; and the task billing account, each node timer, and each node billing account are set to zero; the node event list is empty when created, and when the node event list is not empty, it consists of one or more node event records; the node event record includes event type and event time; the event type includes start, pause, resume, and end.

[0007] When each of the computing nodes is started, paused, resumed, or terminated, the timing operation of the node timer is started, paused, resumed, or terminated accordingly; and a new node event record with the event type corresponding to start, pause, resume, or terminate and the event time being the current time is added to the corresponding node event list.

[0008] During the computation process of each computing node from start to finish, the billing account of the node is updated once every first preset time interval based on the product of the corresponding node timer and the node timer unit price; and when each computing node finishes computation, the billing account of the node is updated once based on the product of the corresponding node timer and the node timer unit price.

[0009] When a fee update occurs in any of the node billing accounts corresponding to each of the computing tasks, the account fees of all the node billing accounts corresponding to the current computing task are summed and the fee of the task billing account corresponding to the current computing task is updated based on the summed calculation result.

[0010] The interface request is received on the preset billing anomaly status check interface, and each time a first check request is received, the first check request received in this instance is taken as the corresponding current request; the user corresponding to the first user identifier of the current request is taken as the first user; the billing anomaly status of all computing tasks and all computing nodes that are bound to the first user is identified to obtain the corresponding first identification report; and the first identification report is sent back to the first request address of the current request; the first check request includes at least the first request address and the first user identifier.

[0011] Preferably, the step of identifying the billing anomaly status of all computing tasks and all computing nodes that are bound to the first user to obtain the corresponding first identification report specifically includes:

[0012] Step 21: All computing tasks that are bound to the first user are grouped into a corresponding computing task set; and all computing nodes corresponding to the computing task set are grouped into a corresponding computing node set.

[0013] Step 22: Identify whether the set of computing nodes is empty; if yes, set the corresponding abnormal node report to empty and proceed to step 24; if no, proceed to step 23.

[0014] Step 23: Perform a traversal of all computing nodes in the computing node set; during this traversal, designate the currently traversed computing node as the current node; estimate the node cost based on the node time-based unit price and the node event list corresponding to the current node to obtain the corresponding first estimated cost; and use the account cost of the node billing account corresponding to the current node as the corresponding first billing cost; calculate the corresponding first difference ratio = |first estimated cost - first billing cost| / first estimated cost based on the first estimated cost and the first billing cost; and when the first difference ratio exceeds a preset first difference ratio threshold, the current node... The node identifier is used as the corresponding abnormal node identifier, and the task identifier of the computing task corresponding to the current node is used as the corresponding belonging task identifier. The first billing fee and the first estimated fee are used as the corresponding abnormal node fee and normal node fee. The abnormal node identifier, the belonging task identifier, the abnormal node fee, and the normal node fee obtained in this round are used to form a corresponding abnormal node record. At the end of this round of traversal, it is checked whether the total number of the obtained abnormal node records is zero. If it is, the corresponding abnormal node report is set to empty. Otherwise, the corresponding abnormal node report is composed of all the obtained abnormal node records.

[0015] Wherein, when the abnormal node report is not empty, it consists of one or more abnormal node records; the abnormal node record includes the abnormal node identifier, the task identifier to which it belongs, the abnormal node cost, and the normal node cost;

[0016] Step 24: Identify whether the set of computing tasks is empty; if yes, set the corresponding abnormal task report to empty and proceed to step 26; if no, proceed to step 25.

[0017] Step 25: Perform a traversal of all computing tasks in the computing task set; during this traversal, the currently traversed computing task is taken as the corresponding current task; the first estimated cost of all computing nodes of the current task is summed and the result is taken as the corresponding second estimated cost; the account cost of the task billing account corresponding to the current task is taken as the corresponding second billing cost; and the corresponding second difference ratio is calculated based on the second estimated cost and the second billing cost = |second estimated cost - second billing cost| / second estimated cost; when the second difference ratio exceeds a preset second difference ratio threshold, the task identifier of the current task is taken as the corresponding abnormal task identifier, and the second billing cost and the second estimated cost are taken as the corresponding abnormal task cost and normal task cost, and the abnormal task identifier, the abnormal task cost and the normal task cost obtained this time are combined to form a corresponding abnormal task record; at the end of this traversal, it is identified whether the total number of the obtained abnormal task records is zero. If it is, the corresponding abnormal task report is set to empty; otherwise, all the obtained abnormal task records are combined to form the corresponding abnormal task report.

[0018] When the abnormal task report is not empty, it consists of one or more abnormal task records; the abnormal task record includes the abnormal task identifier, the abnormal task cost, and the normal task cost;

[0019] Step 26: The obtained abnormal node report and abnormal task report form the corresponding first identification report.

[0020] Furthermore, the step of estimating the node cost based on the node timer unit price corresponding to the current node and the node event list to obtain the corresponding first estimated cost specifically includes:

[0021] Step 31: Take the event time of the node event record with the event type "started" in the node event list as the corresponding start time; and identify whether there is a node event record with the event type "end" in the node event list; if it exists, take the event time of the node event record with the event type "end" as the corresponding end time; if it does not exist, take the current time as the corresponding end time.

[0022] Step 32: Check whether the total number of node event records with the event type "pause" in the node event list is zero; if yes, set the corresponding total pause duration to 0 and proceed to step 34; if no, proceed to step 33.

[0023] Step 33: Perform a traversal of all node event records with the event type "pause" in the node event list; during this traversal, the currently traversed node event record is designated as the corresponding current pause record; and the node event records with the event type "resume" in the node event list are designated as the corresponding resume records; the total number of resume records whose event time is after the event time of the current pause record is counted to obtain the corresponding total number of records; the total number of records is identified; if the total number of records is greater than zero, the resume record whose event time is after the event time of the current pause record and is closest to the event time of the current pause record is designated as the corresponding next resume record, and the time difference between the two event times of the current pause record and the next resume record is designated as the corresponding first pause duration; if the total number of records is equal to zero, the time difference between the end time and the event time of the current pause record is designated as the corresponding first pause duration; and at the end of this traversal, the sum of all the obtained first pause durations is calculated, and the calculation result is designated as the corresponding total pause duration;

[0024] Step 34: The time difference between the start time and the end time is taken as the corresponding first total duration; the difference between the first total duration and the pause duration is taken as the corresponding first running duration; and the product of the node timing unit price and the first running duration is taken as the corresponding first estimated cost.

[0025] A second aspect of the present invention provides an apparatus for implementing the processing method for identifying billing anomalies as described in the first aspect above. The apparatus includes: a task and node creation module, a timer and event recording processing module, a node cost update module, a task cost update module, and a billing anomaly detection module.

[0026] The computing task and node creation module is used to assign a corresponding task identifier and task billing account to the current computing task when creating a new computing task for any user; establish a binding relationship between the current user and the current computing task; create one or more corresponding computing nodes for the current computing task based on the current user's computing node settings; establish a binding relationship between each newly created computing node and the current computing task; assign a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list to each computing node; and set the task billing account, each node timer, and each node billing account to zero; the node event list is empty when created, and when the node event list is not empty, it consists of one or more node event records; the node event record includes event type and event time; the event type includes start, pause, resume, and end.

[0027] The timer and event recording processing module is used to start, pause, resume, or end the timing operation of the node timer when the computing node is started, paused, resumed, or ended; and to add a node event record to the corresponding node event list with the event type being the corresponding start, pause, resume, or end and the event time being the current time.

[0028] The node cost update module is used to update the cost of the node billing account once every first preset time interval during the computing process of each computing node from start to finish, based on the product of the corresponding node timer and the node timer unit price; and to update the cost of the node billing account once when each computing node finishes computing, based on the product of the corresponding node timer and the node timer unit price.

[0029] The task cost update module is used to perform a summation calculation on the account costs of all the node billing accounts corresponding to the current computing task when a cost update occurs in any of the node billing accounts corresponding to each computing task, and to update the cost of the task billing account corresponding to the current computing task based on the summation calculation result.

[0030] The billing anomaly status inspection module is used to receive interface requests on a preset billing anomaly status inspection interface, and when a first inspection request is received, it takes the first inspection request received at that time as the corresponding current request; and takes the user corresponding to the first user identifier of the current request as the first user; and identifies the billing anomaly status of all computing tasks and all computing nodes that are bound to the first user to obtain the corresponding first identification report; and sends the first identification report back to the first request address of the current request; the first inspection request includes at least the first request address and the first user identifier.

[0031] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;

[0032] The processor is used to couple with the memory, read and execute instructions in the memory to implement the steps of the method described in the first aspect above;

[0033] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

[0034] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the instructions described in the first aspect.

[0035] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for identifying billing anomalies. As described above, when creating a new computing task for any user, this invention assigns a corresponding task identifier and a task billing account to the current computing task and binds the current user to the current computing task. Based on the current user's computing node setting, one or more corresponding computing nodes are created for the current computing task, and each newly created computing node is bound to the current computing task. Each computing node is assigned a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list. When a computing node is started, paused, resumed, or terminated, the corresponding node timer is started, paused, resumed, or terminated, and a new node event record with the corresponding start, pause, resume, or terminate event type and the current time is added to the corresponding node event list. Furthermore, from startup to termination, the node timer is updated accordingly. During the computation process, the node billing account is periodically updated based on the node timer duration multiplied by the node timer unit price. This update is also performed when each computation node finishes its computation. Furthermore, when a billing account for any computation task experiences a fee update, the account fees for all node billing accounts corresponding to the current computation task are summed, and the task billing account for the current computation task is updated based on the summed result. An interface request is received on the billing anomaly check interface. The user specified in each received first check request is designated as the first user. The billing anomaly status of all computation tasks and nodes bound to the first user is identified, and a corresponding first identification report is generated and sent back to the first request address specified in the current request. This invention eliminates additional economic losses caused to users by billing anomalies, improves the user experience, and enhances user stickiness. Attached Figure Description

[0036] Figure 1 This is a schematic diagram of a method for identifying abnormal billing status provided in Embodiment 1 of the present invention;

[0037] Figure 2 This is a module structure diagram of a processing device for identifying billing anomalies according to Embodiment 2 of the present invention;

[0038] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0040] Embodiment 1 of the present invention provides a processing method for identifying abnormal billing states, such as... Figure 1 The diagram illustrates a method for identifying billing anomalies according to Embodiment 1 of the present invention. This method mainly includes the following steps:

[0041] Step 1: When creating a new computing task for any user, assign a corresponding task identifier and task billing account to the current computing task; establish a binding relationship between the current user and the current computing task; create one or more corresponding computing nodes for the current computing task based on the current user's computing node settings; establish a binding relationship between each newly created computing node and the current computing task; assign a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list to each computing node; and set the task billing account, each node timer, and each node billing account to zero.

[0042] Here, the task identifier, task billing account, node identifier, node timer, node billing account, and node timer unit price are all standard configurations of a conventional scientific computing platform; the node event list is an additional configuration in this embodiment of the invention. It should be noted that the node event list in this embodiment of the invention is an empty table when created; when the node event list is not empty, it should consist of one or more node event records; each node event record includes at least two data items: event type and event time; wherein, the event type includes start, pause, resume, and end.

[0043] Step 2: When each computing node is started, paused, resumed, or terminated, the corresponding node timer is started, paused, resumed, or terminated; and a new node event record with the corresponding start, pause, resume, or terminate event type and the current time is added to the corresponding node event list.

[0044] Step 3: During the computation process of each computing node from start to finish, the node billing account is updated once every first preset time interval based on the product of the corresponding node timer and the node timer unit price; and when each computing node finishes computation, the node billing account is updated once based on the product of the corresponding node timer and the node timer unit price.

[0045] Here, the first preset duration is a pre-set time length parameter; the product of the node timer and the node timer unit price is actually the product of the node timer's duration and the node timer unit price. It should be noted that when each computing node finishes its calculation, the time difference between the current end time and the last cost update time may be less than the first preset duration. Therefore, the computing costs incurred during this period are not included in the node billing account. Thus, a cost update must be performed on the node billing account again when each computing node finishes its calculation, based on the product of the node timer's duration and the node timer unit price.

[0046] Step 4: When a cost update occurs in any node billing account corresponding to each computing task, perform a summation calculation on the account costs of all node billing accounts corresponding to the current computing task, and update the cost of the task billing account corresponding to the current computing task based on the summation calculation result.

[0047] As mentioned earlier, the cost of each computing task is actually the sum of the costs of all its computing nodes. Therefore, whenever a cost update occurs in any node billing account under a computing task, the cost of the current computing task's billing account must be updated again based on the sum of the costs of all node billing accounts under the current computing task.

[0048] Step 5: Receive interface requests on the preset billing anomaly status check interface, and when each first check request is received, treat the received first check request as the corresponding current request; treat the user corresponding to the first user identifier of the current request as the first user; identify the billing anomaly status of all computing tasks and all computing nodes that are bound to the first user to obtain the corresponding first identification report; and send the first identification report back to the first request address of the current request.

[0049] Specifically, it includes: Step 51, receiving interface requests on the preset billing anomaly status check interface, and taking the first check request received at that time as the corresponding current request when each first check request is received.

[0050] The first inspection request includes at least a first request address and a first user identifier;

[0051] Here, the billing anomaly check interface is a new processing interface added in this embodiment of the invention, in addition to the set of conventional internal / external processing interfaces of a conventional scientific computing platform; the interface request of this interface, i.e. the request data of the first check request, should include at least two data items: the first request address and the first user identifier;

[0052] Step 52, and take the user corresponding to the first user identifier of the current request as the first user;

[0053] Step 53, and identify the billing anomaly status of all computing tasks and all computing nodes that are bound to the first user to obtain the corresponding first identification report;

[0054] The first identification report includes an abnormal node report and an abnormal task report. When the abnormal node report is not empty, it consists of one or more abnormal node records. Each abnormal node record includes at least an abnormal node identifier, the identifier of the task to which it belongs, the abnormal node cost, and the normal node cost. When the abnormal task report is not empty, it consists of one or more abnormal task records. Each abnormal task record includes at least an abnormal task identifier, an abnormal task cost, and the normal task cost.

[0055] Specifically, this includes: step 531, forming a corresponding set of computing tasks from all computing tasks that are bound to the first user; and forming a corresponding set of computing nodes from all computing task sets.

[0056] Step 532: Identify whether the set of computing nodes is empty; if yes, set the corresponding abnormal node report to empty and proceed to step 534; if no, proceed to step 533.

[0057] Step 533: Perform a traversal of all computing nodes in the computing node set; during this traversal, the currently traversed computing node is taken as the current node; the node cost is estimated based on the node timer unit price and node event list corresponding to the current node to obtain the corresponding first estimated cost; the account cost of the node billing account corresponding to the current node is taken as the corresponding first billing cost; the corresponding first difference ratio is calculated based on the first estimated cost and the first billing cost = |first estimated cost - first billing cost| / first estimated cost; when the first difference ratio exceeds the preset first difference ratio threshold, the node identifier of the current node is taken as the corresponding abnormal node identifier, the task identifier of the computing task corresponding to the current node is taken as the corresponding belonging task identifier, and the first billing cost and the first estimated cost are taken as the corresponding abnormal node cost and normal node cost, and the abnormal node identifier, belonging task identifier, abnormal node cost and normal node cost obtained in this round are combined to form a corresponding abnormal node record; at the end of this traversal, it is checked whether the total number of abnormal node records obtained is zero. If it is, the corresponding abnormal node report is set to empty; otherwise, all the abnormal node records obtained are combined to form the corresponding abnormal node report.

[0058] Here, the first difference ratio threshold is a pre-set ratio parameter;

[0059] It should be noted that the specific processing steps for estimating the node cost based on the node timer unit price and node event list corresponding to the current node in step 533 consist of the following steps A1-A4:

[0060] Step A1: Take the event time of the node event record with event type "start" in the node event list as the corresponding start time; and identify whether there is a node event record with event type "end" in the node event list; if it exists, take the event time of the node event record with event type "end" as the corresponding end time; if it does not exist, take the current time as the corresponding end time.

[0061] Step A2: Check if the total number of node event records with the event type "pause" in the node event list is zero; if yes, set the corresponding total pause duration to 0 and proceed to step A4; if no, proceed to step A3.

[0062] Step A3: Perform a traversal of all node event records with the event type "paused" in the node event list. During this traversal, the currently traversed node event record is designated as the current paused record. Node event records with the event type "resumed" are designated as the corresponding resumed records. The total number of resumed records whose event times are after the event time of the current paused record is counted to obtain the corresponding total number of records. The total number of records is then identified. If the total number of records is greater than zero, the resumed record whose event time is after and closest to the event time of the current paused record is designated as the next resumed record, and the time difference between the two event times is taken as the first pause duration. If the total number of records is zero, the time difference between the end time and the event time of the current paused record is taken as the first pause duration. At the end of this traversal, the sum of all obtained first pause durations is calculated, and the result is taken as the corresponding total pause duration.

[0063] Step A4: The time difference between the start time and the end time is taken as the corresponding first total duration; the difference between the first total duration and the pause duration is taken as the corresponding first running duration; and the product of the node timing unit price and the first running duration is taken as the corresponding first estimated cost.

[0064] Step 534: Identify whether the set of computing tasks is empty; if yes, set the corresponding abnormal task report to empty and proceed to step 536; if no, proceed to step 535.

[0065] Step 535: Perform a traversal of all computation tasks in the computation task set; during this traversal, the currently traversed computation task is taken as the corresponding current task; the first estimated cost of all computation nodes of the current task is summed and the result is taken as the corresponding second estimated cost; the account cost of the task billing account corresponding to the current task is taken as the corresponding second billing cost; the corresponding second difference ratio is calculated based on the second estimated cost and the second billing cost = |second estimated cost - second billing cost| / second estimated cost; when the second difference ratio exceeds the preset second difference ratio threshold, the task identifier of the current task is taken as the corresponding abnormal task identifier, and the second billing cost and the second estimated cost are taken as the corresponding abnormal task cost and normal task cost, and the abnormal task identifier, abnormal task cost and normal task cost obtained in this step are combined to form a corresponding abnormal task record; at the end of this traversal, it is checked whether the total number of abnormal task records obtained is zero. If it is, the corresponding abnormal task report is set to empty; otherwise, all abnormal task records obtained are combined to form the corresponding abnormal task report.

[0066] Here, the second difference ratio threshold is a pre-set ratio parameter;

[0067] Step 536: The obtained abnormal node reports and abnormal task reports form the corresponding first identification report;

[0068] Step 54, and send the first identification report back to the first request address of the current request.

[0069] Figure 2 This is a module structure diagram of a processing device for identifying billing anomalies according to Embodiment 2 of the present invention. This device can be a terminal device or server implementing the aforementioned method embodiment, or it can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiment. For example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 2 As shown, the device includes: a task and node creation module 201, a timer and event recording processing module 202, a node cost update module 203, a task cost update module 204, and a billing anomaly status check module 205.

[0070] The task and node creation module 201 is used to assign a corresponding task identifier and task billing account to the current computing task when creating a new computing task for any user; establish a binding relationship between the current user and the current computing task; create one or more corresponding computing nodes for the current computing task based on the current user's computing node settings; establish a binding relationship between each newly created computing node and the current computing task; assign a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list to each computing node; and set the task billing account, each node timer, and each node billing account to zero; the node event list is empty when created, and consists of one or more node event records when the node event list is not empty; the node event record includes the event type and event time; the event types include start, pause, resume, and end.

[0071] The timer and event logging processing module 202 is used to start, pause, resume, or end the timing operation of the node timer when the computing node is started, paused, resumed, or ended; and to add a node event record with the event type corresponding to the start, pause, resume, or end operation and the event time being the current time to the corresponding node event list.

[0072] The node fee update module 203 is used to update the node billing account once every first preset time interval during the computing process of each computing node from start to finish, based on the product of the corresponding node timer and the node timer unit price; and to update the node billing account once when each computing node finishes computing, based on the product of the corresponding node timer and the node timer unit price.

[0073] The task cost update module 204 is used to perform a summation calculation on the account costs of all node billing accounts corresponding to the current computing task when a cost update occurs in any node billing account corresponding to each computing task, and to perform a cost update on the task billing account corresponding to the current computing task based on the summation calculation result.

[0074] The billing anomaly status inspection module 205 is used to receive interface requests on the preset billing anomaly status inspection interface, and when a first inspection request is received, it takes the first inspection request received at that time as the corresponding current request; takes the user corresponding to the first user identifier of the current request as the first user; identifies the billing anomaly status of all computing tasks and all computing nodes that are bound to the first user to obtain the corresponding first identification report; and sends the first identification report back to the first request address of the current request; the first inspection request includes at least the first request address and the first user identifier.

[0075] The present invention provides a processing device for identifying abnormal billing status, which can execute the method steps in the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0076] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented in software via processing element calls, while others are implemented in hardware. For example, the billing anomaly check module can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and called and executed by a processing element of the device. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0077] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-on-a-Chip (SOC).

[0078] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the foregoing method embodiments are generated. The computer described above can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).

[0079] Figure 3 This is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention. This electronic device can be a terminal device or server implementing the methods of the aforementioned embodiments, or it can be a terminal device or server connected to the aforementioned terminal device or server implementing the methods of the aforementioned embodiments. Figure 3 As shown, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for performing various processing functions and implementing the processing steps described in the foregoing embodiments. Preferably, the electronic device according to the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.

[0080] exist Figure 3The system bus 305 mentioned can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.

[0081] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0082] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to perform the methods and processes provided in the above embodiments.

[0083] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for identifying billing anomalies. As described above, when creating a new computing task for any user, this invention assigns a corresponding task identifier and a task billing account to the current computing task and binds the current user to the current computing task. Based on the current user's computing node setting, one or more corresponding computing nodes are created for the current computing task, and each newly created computing node is bound to the current computing task. Each computing node is assigned a corresponding node identifier, node timer, node billing account, node timer unit price, and node event list. When a computing node is started, paused, resumed, or terminated, the corresponding node timer is started, paused, resumed, or terminated, and a new node event record with the corresponding start, pause, resume, or terminate event type and the current time is added to the corresponding node event list. Furthermore, from startup to termination, the node timer is updated accordingly. During the computation process, the node billing account is periodically updated based on the node timer duration multiplied by the node timer unit price. This update is also performed when each computation node finishes its computation. Furthermore, when a billing account for any computation task experiences a fee update, the account fees for all node billing accounts corresponding to the current computation task are summed, and the task billing account for the current computation task is updated based on the summed result. An interface request is received on the billing anomaly check interface. The user specified in each received first check request is designated as the first user. The billing anomaly status of all computation tasks and nodes bound to the first user is identified, and a corresponding first identification report is generated and sent back to the first request address specified in the current request. This invention eliminates additional economic losses caused to users by billing anomalies, improves the user experience, and enhances user stickiness.

[0084] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0085] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A processing method for identifying a billing abnormal state, characterized by, The method comprises: When a new computing task is created for any user, a corresponding task identifier and a task billing account are allocated to the current computing task, a binding relationship is established between the current user and the current computing task, one or more corresponding computing nodes are created for the current computing task based on the computing nodes of the current user, a binding relationship is established between each newly created computing node and the current computing task, a corresponding node identifier, a node timer, a node billing account, a node billing unit price and a node event list are allocated to each computing node, the task billing account, each node timer and each node billing account are reset to zero, the node event list is an empty table when created, and the node event list is composed of one or more node event records when not empty, the node event record includes an event type and an event time, and the event type includes start, pause, resume and end; When each computing node is executed to start, pause, resume or end the computing operation, the timing operation of the node timer is started, paused, resumed or ended correspondingly, and a node event record with the event type of corresponding start, pause, resume or end and the event time of the current time is added to the corresponding node event list; During the computing process of each computing node from start to end, the node billing account is updated once every first preset time interval based on the product of the corresponding node timer and the node billing unit price, and the node billing account is updated once based on the product of the corresponding node timer and the node billing unit price when each computing node ends the computing; When any node billing account corresponding to each computing task is updated, the account fees of all node billing accounts corresponding to the current computing task are summed up, and the task billing account corresponding to the current computing task is updated based on the sum result; An interface request is received at a preset billing exception state checking interface, and each time a first checking request is received, the received first checking request is taken as a corresponding current request, a user corresponding to the first user identifier of the current request is taken as a first user, the billing exception states of all computing tasks and all computing nodes having a binding relationship with the first user are identified to obtain a corresponding first identification report, and the first identification report is sent back to the first request address of the current request; The first checking request at least includes the first request address and the first user identifier.

2. The processing method for identifying a billing exception state according to claim 1, characterized in that, The billing exception states of all computing tasks and all computing nodes having a binding relationship with the first user are identified to obtain a corresponding first identification report, which specifically comprises: Step 21, all computing tasks having a binding relationship with the first user are grouped into a corresponding computing task set, and all computing nodes corresponding to the computing task set are grouped into a corresponding computing node set. Step 22, identify whether the set of computing nodes is empty; if yes, set the corresponding abnormal node report as empty, and go to step 24; if no, go to step 23; Step 23, perform a round of traversal on all the computing nodes in the set of computing nodes; during the round of traversal, take the currently traversed computing node as the corresponding current node; perform node cost estimation according to the node billing account and the node event list corresponding to the current node to obtain the corresponding first estimated cost; take the account cost of the node billing account corresponding to the current node as the corresponding first billing cost; calculate the corresponding first difference ratio = |first estimated cost-first billing cost| / first estimated cost according to the first estimated cost and the first billing cost; when the first difference ratio exceeds a preset first difference ratio threshold, take the node identifier of the current node as the corresponding abnormal node identifier, take the task identifier of the computing task corresponding to the current node as the corresponding belonging task identifier, take the first billing cost and the first estimated cost as the corresponding abnormal node cost and normal node cost, and take the abnormal node identifier, the belonging task identifier, the abnormal node cost and the normal node cost obtained at this time as one corresponding abnormal node record; when the round of traversal ends, identify whether the total number of the abnormal node records obtained is zero; if yes, set the corresponding abnormal node report as empty; if no, take all the abnormal node records obtained as the corresponding abnormal node report; When the abnormal node report is not empty, it is composed of one or more abnormal node records; the abnormal node record includes the abnormal node identifier, the belonging task identifier, the abnormal node cost and the normal node cost; Step 24, identify whether the set of computing tasks is empty; if yes, set the corresponding abnormal task report as empty, and go to step 26; if no, go to step 25; Step 25, a round of traversal is performed on all the computing tasks of the computing task set; during the round of traversal, the computing task being currently traversed is taken as a corresponding current task; the first estimated cost of all the computing nodes of the current task is summed up and the result of the summation is taken as a corresponding second estimated cost; the account cost of the task billing account corresponding to the current task is taken as a corresponding second billing cost; a second difference ratio = |second estimated cost-second billing cost| / second estimated cost is calculated according to the second estimated cost and the second billing cost; when the second difference ratio exceeds a preset second difference ratio threshold, the task identifier of the current task is taken as a corresponding abnormal task identifier, the second billing cost and the second estimated cost are taken as a corresponding abnormal task cost and a normal task cost, and the abnormal task identifier, the abnormal task cost and the normal task cost obtained at this time are taken to form a corresponding abnormal task record; when the round of traversal ends, it is identified whether the total number of the abnormal task records obtained is zero; if yes, the corresponding abnormal task report is set to be empty; if no, all the abnormal task records obtained are taken to form the corresponding abnormal task report; The abnormal task report is composed of one or more abnormal task records when the abnormal task report is not empty; the abnormal task record includes the abnormal task identifier, the abnormal task cost and the normal task cost; Step 26, the first identification report is formed by the abnormal node report and the abnormal task report obtained.

3. The processing method for identifying a billing exception state according to claim 2, characterized in that, The first estimated cost is obtained by performing node cost estimation according to the node timing unit price corresponding to the current node and the node event list, and specifically includes: Step 31, the event time of the node event record with the event type of start in the node event list is taken as a corresponding start time; it is identified whether the node event record with the event type of end exists in the node event list; if yes, the event time of the node event record with the event type of end is taken as a corresponding end time; if no, the current time is taken as the end time; Step 32, it is identified whether the total number of the node event records with the event type of pause in the node event list is zero; if yes, the total pause duration is set to be 0, and step 34 is performed; if no, step 33 is performed; Step 33, a round of traversal is performed on all the node event records with the event type of pause in the node event list; during the round of traversal, the node event record being currently traversed is taken as a corresponding current pause record; the node event record with the event type of resume in the node event list is taken as a corresponding resume record; the total number of the resume records with the event time after the event time of the current pause record is counted to obtain a corresponding statistical record total number; the statistical record total number is identified; if the statistical record total number is greater than zero, the resume record with the event time after the event time of the current pause record and closest to the event time of the current pause record is taken as a corresponding next-step resume record, and the time difference between the two event times of the current pause record and the next-step resume record is taken as a corresponding first pause duration; if the statistical record total number is equal to zero, the time difference between the end time and the event time of the current pause record is taken as the corresponding first pause duration; when the round of traversal ends, the sum of all the first pause durations obtained is calculated and the calculation result is taken as a corresponding pause total duration; Step 34, the time difference between the start time and the end time is taken as a corresponding first total duration; the difference between the first total duration and the pause total duration is taken as a corresponding first running duration; and the product of the node timer unit price and the first running duration is taken as a corresponding first estimated fee.

4. An apparatus for performing the processing method of identifying a charging exception state according to any one of claims 1 to 3, characterized by The device comprises a computing task and node creation module, a timer and event record processing module, a node fee updating module, a task fee updating module and a billing exception state checking module; The computing task and node creation module is configured to, when a computing task is newly created for any user, assign a corresponding task identifier and task billing account to the current computing task; establish a binding relationship between the current user and the current computing task; create one or more corresponding computing nodes for the current computing task based on the computing nodes of the current user; establish a binding relationship between each newly created computing node and the current computing task; assign a corresponding node identifier, node timer, node billing account, node timer unit price and node event list to each computing node; and zero the task billing account, each node timer and each node billing account. The node event list is empty when created, and the node event list is composed of one or more node event records when not empty. The node event record comprises an event type and an event time. The event type comprises start, pause, resume and end. The timer and event record processing module is configured to start, pause, resume or end the node timer when each of the computing nodes is executed to start, pause, resume or end the computing operation, and add a node event record with the event type of the corresponding start, pause, resume or end and the event time of the current time to the corresponding node event list; The node fee updating module is configured to update the node billing account based on the product of the corresponding node timer and the node timing unit price every first preset time interval during the computing process of each of the computing nodes from the start to the end, and update the node billing account based on the product of the corresponding node timer and the node timing unit price when each of the computing nodes ends the computing. The task fee updating module is configured to perform a summation calculation on the account fees of all the node billing accounts corresponding to the current computing task when a fee update occurs on any of the node billing accounts corresponding to each of the computing tasks, and perform a fee update on the task billing account corresponding to the current computing task based on the summation calculation result. The billing exception state checking module is configured to receive an interface request on a preset billing exception state checking interface, and identify the billing exception states of all the computing tasks and all the computing nodes having a binding relationship with the first user to obtain a corresponding first identification report when receiving a first checking request, and send the first identification report to a first request address of the current request; the first checking request at least includes the first request address and the first user identifier.

5. An electronic device, comprising: Comprise: Memory, processor and transceiver; The processor is used for coupling with the memory, reading and executing the instructions in the memory, so as to realize the method of any one of claims 1-3; The transceiver is coupled with the processor, and the transceiver is controlled by the processor to perform message transceiving.

6. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, when the computer instructions are executed by the computer, the computer executes the method of any one of claims 1-3.

Citation Information

Patent Citations

  • Payment method, payment client, and charging device and control method and system thereof

    CN106033569A

  • Charging exception identification method and device

    CN109658082A