Call record processing method, device, electronic device and readable storage medium
By introducing a multi-level distribution node architecture into the billing system and adopting a target task node allocation algorithm, the problems of resource occupation and network complexity in the call record processing method are solved, and the network structure is simplified and resources are efficiently utilized.
Patent Information
- Application Number
- CN202111212238.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-18
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-10-18
AI Technical Summary
Existing call record processing methods occupy a lot of computing resources and have a complex network structure, resulting in resource waste and excessive network burden.
The billing system introduces an architecture consisting of X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes. Through the collaborative work of the first-level and second-level distribution nodes, the number of other nodes that each node needs to connect to is reduced. The target task node allocation algorithm is used to determine the call record processing node.
The network structure of the billing system is simplified, the computing resources and bandwidth usage of each node are reduced, and resource utilization is optimized.
Smart Images

Figure CN115994756B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a bill processing method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] In a telecommunication industry billing system, a distribution node is configured to distribute bills to bill processing nodes, and a bill processing node receiving a bill can perform billing operations on the bill.
[0003] Currently, the distribution node mainly uses a consistent hashing algorithm to take a user identity document (ID) of a bill as a calculation parameter, to calculate a bill processing node corresponding to the bill, and to send the bill to the bill processing node of the bill.
[0004] However, the bill processing method of the above billing system has problems of occupying more computing resources and complex network structure. SUMMARY
[0005] The present application provides a bill processing method, device, electronic equipment and readable storage medium, to solve the problems of occupying more computing resources and complex network structure existing in the existing bill processing method.
[0006] In a first aspect, the present application provides a bill processing method, a billing system including X primary distribution nodes, Y secondary distribution nodes and Z bill processing nodes, each primary distribution node being connected with each secondary distribution node, each secondary distribution node being connected with part of bill processing nodes, X, Y and Z being positive integers, and X and Z being greater than Y; the method comprising:
[0007] A primary distribution node A in the X primary distribution nodes acquires a bill of a user;
[0008] The primary distribution node A calls a target task node distribution algorithm according to a user identity to which the bill belongs, to determine an identity of a bill processing node B to be used to perform billing operations on the bill from the Z bill processing nodes;
[0009] The primary distribution node A determines a secondary distribution node C connected with the bill processing node B from the Y secondary distribution nodes according to the identity of the bill processing node B, and distributes the bill to the secondary distribution node C;
[0010] The secondary distribution node C receives the bill and distributes the bill to the bill processing node B;
[0011] The bill processing node B performs billing operations on the bill.
[0012] Optionally, after receiving the call record, the secondary distribution node C distributes the call record to the call record processing node B, including:
[0013] The secondary distribution node C calls the target task node allocation algorithm according to the user identifier of the call record, and determines the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes;
[0014] The secondary distribution node C distributes the call record to the call record processing node B.
[0015] Optionally, the first-level distribution node A calls a target task node allocation algorithm according to a user identifier to which the call record belongs, and determines a call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, including:
[0016] The first-level distribution node A calls the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node, and determines the call record processing node B to perform billing operations on the call record from the Z call record processing nodes; wherein the first parameter value is used to represent the number of call records that the call record processing node can currently process.
[0017] Optionally, the secondary distribution node C calls the target task node allocation algorithm according to the user identifier to which the call record belongs, and determines the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, including:
[0018] The secondary distribution node C calls the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node, and determines the call record processing node B to perform billing operations on the call record from the Z call record processing nodes.
[0019] Optionally, the target task node allocation algorithm is a consistent hashing algorithm.
[0020] Optionally, the first-level distribution node A distributes the call record to the second-level distribution node C, including:
[0021] The first-level distribution node A distributes the call record and the identifier of the call record processing node B to the second-level distribution node C;
[0022] After receiving the call record, the secondary distribution node C distributes the call record to the call record processing node B, including:
[0023] After receiving the call record and the identifier of the call record processing node B, the secondary distribution node C distributes the call record to the call record processing node B according to the identifier of the call record processing node B.
[0024] Optionally, the method further includes:
[0025] The first-level distribution node A determines a call record processing node connected to each second-level distribution node among the Z call record processing nodes;
[0026] The first-level distribution node A builds a mapping relationship between each second-level distribution node and the corresponding call record processing node according to the call record processing node connected to each second-level distribution node;
[0027] The first-level distribution node A sends the corresponding mapping relationship to each second-level distribution node;
[0028] The secondary distribution node stores the corresponding mapping relationship.
[0029] Optionally, the method further includes:
[0030] The first-level distribution node A sends a mapping relationship between each second-level distribution node and the corresponding call record processing node to the remaining first-level distribution nodes D among the X first-level distribution nodes;
[0031] The first-level distribution node D stores the mapping relationship between each second-level distribution node and the corresponding call record processing node.
[0032] In a second aspect, the present application provides a call record processing method, wherein the billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; the method is applied to a first-level distribution node A among the X first-level distribution nodes, and the method includes:
[0033] Get the user's call log;
[0034] According to the user identifier of the call record, calling the target task node allocation algorithm, determining the identifier of the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes;
[0035] Determine, according to the identifier of the call record processing node B, a secondary distribution node C connected to the call record processing node B from the Y secondary distribution nodes;
[0036] The call record is distributed to the secondary distribution node C, so that after the secondary distribution node C receives the call record, it distributes the call record to the call record processing node B, so that the call record processing node B performs a billing operation on the call record.
[0037] Optionally, calling a target task node allocation algorithm based on the user identifier to which the call record belongs, and determining the identifier of a call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, includes:
[0038] According to the user identifier to which the call record belongs and the first parameter value of each call record processing node, the target task node allocation algorithm is called to determine the call record processing node B to perform billing operations on the call record from the Z call record processing nodes; wherein the first parameter value is used to characterize the number of call records that the call record processing node can currently process.
[0039] Optionally, the target task node allocation algorithm is a consistent hashing algorithm.
[0040] Optionally, distributing the call record to the secondary distribution node C includes:
[0041] The call record and the identifier of the call record processing node B are distributed to the secondary distribution node C.
[0042] Optionally, the method further includes:
[0043] Determine a call record processing node connected to each secondary distribution node among the Z call record processing nodes;
[0044] According to the call processing node connected to each secondary distribution node, a mapping relationship between each secondary distribution node and the corresponding call processing node is established;
[0045] Send the corresponding mapping relationship to each secondary distribution node.
[0046] Optionally, the method further includes:
[0047] The mapping relationship between each secondary distribution node and the corresponding call record processing node is sent to the remaining primary distribution nodes among the X primary distribution nodes.
[0048] In a third aspect, the present application provides a call record processing method, wherein the billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; the method is applied to the second-level distribution node C among the Y second-level distribution nodes, and the method includes:
[0049] Receiving a user's call record obtained from a first-level distribution node A among the X first-level distribution nodes;
[0050] The call record is distributed to the call record processing node B so that the call record processing node B performs billing operations on the call record; the call record processing node B is the first-level distribution node A, which calls the target task node allocation algorithm according to the user identifier to which the call record belongs, and determines the call record processing node to perform billing operations on the call record from the Z call record processing nodes.
[0051] Optionally, distributing the call record to the call record processing node B includes:
[0052] According to the user identifier of the call record, calling the target task node allocation algorithm, determining the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes;
[0053] Distribute the call record to the call record processing node B.
[0054] Optionally, the call record processing node B is a call record processing node determined from the Z call record processing nodes by calling the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node; wherein the first parameter value is used to represent the number of call records that can currently be processed by the call record processing node;
[0055] The step of calling the target task node allocation algorithm according to the user identifier to which the call record belongs, and determining the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, includes:
[0056] According to the user identifier to which the call record belongs and the first parameter value of each call record processing node, the target task node allocation algorithm is called to determine the call record processing node B to perform billing operations on the call record from the Z call record processing nodes.
[0057] Optionally, the target task node allocation algorithm is a consistent hashing algorithm.
[0058] Optionally, the receiving a call record of a user of the first-level distribution node A among the X first-level distribution nodes includes:
[0059] Receiving the call record and the identifier of the call record processing node B from the first-level distribution node A;
[0060] The distributing the call record to the call record processing node B includes:
[0061] The call record is distributed to the call record processing node B according to the identifier of the call record processing node B.
[0062] Optionally, the method further includes:
[0063] receiving a mapping relationship between the second-level distribution node C and the corresponding call record processing node from the first-level distribution node A among the X first-level distribution nodes;
[0064] The mapping relationship between the secondary distribution node C and the corresponding call record processing node is saved.
[0065] In a fourth aspect, the present application provides a billing system, comprising X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, wherein each first-level distribution node is connected to each second-level distribution node, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y.
[0066] A first-level distribution node A among the X first-level distribution nodes is used to obtain the user's call records;
[0067] The first-level distribution node A is further configured to call a target task node allocation algorithm based on the user identifier of the call record, and determine the identifier of the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes;
[0068] The first-level distribution node A is further configured to determine, according to the identifier of the call record processing node B, a second-level distribution node C connected to the call record processing node B from the Y second-level distribution nodes, and distribute the call record to the second-level distribution node C;
[0069] The secondary distribution node C is used to distribute the call record to the call record processing node B after receiving the call record;
[0070] The call record processing node B is used to perform billing operations on the call record.
[0071] In a fifth aspect, the present application provides a call record processing device, wherein the billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; the device is applied to a first-level distribution node A among the X first-level distribution nodes, and the device includes:
[0072] The acquisition module is used to obtain the user's call records;
[0073] A first determining module is configured to call a target task node allocation algorithm based on a user identifier of the call record, and determine an identifier of a call record processing node B to perform a billing operation on the call record from among the Z call record processing nodes;
[0074] A second determining module is configured to determine, according to the identifier of the call record processing node B, a secondary distribution node C connected to the call record processing node B from the Y secondary distribution nodes;
[0075] The distribution module is used to distribute the call record to the secondary distribution node C, so that after the secondary distribution node C receives the call record, it distributes the call record to the call record processing node B, so that the call record processing node B performs billing operations on the call record.
[0076] In a sixth aspect, the present application provides a call record processing device, wherein the billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; the device is applied to the second-level distribution node C among the Y second-level distribution nodes, and the device includes:
[0077] A receiving module, configured to receive a user's call record obtained from the first-level distribution node A among the X first-level distribution nodes;
[0078] A distribution module is used to distribute the call record to the call record processing node B so that the call record processing node B performs billing operations on the call record; the call record processing node B is the first-level distribution node A, which calls the target task node allocation algorithm according to the user identifier to which the call record belongs, and determines the call record processing node to be used to perform billing operations on the call record from the Z call record processing nodes.
[0079] In a seventh aspect, the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the processor;
[0080] The memory stores computer-executable instructions;
[0081] The at least one processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the second aspects.
[0082] In an eighth aspect, the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the processor;
[0083] The memory stores computer-executable instructions;
[0084] The at least one processor executes the computer-executed instructions stored in the memory to implement the method according to any one of the third aspect.
[0085] In a ninth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executed instructions, and the computer-executed instructions are executed by a processor to implement the method according to any one of the second aspect.
[0086] In a tenth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executed instructions, and the computer-executed instructions are executed by a processor to implement the method according to any one of the third aspect.
[0087] The call processing method, device, electronic device and readable storage medium provided by the present application increase a plurality of secondary distribution nodes with a number less than the plurality of primary distribution nodes and the plurality of call processing nodes between the plurality of primary distribution nodes and the plurality of call processing nodes in the billing system, thereby reducing the number of nodes that each primary distribution node needs to connect and the number of nodes that each call processing node needs to connect, and simplifying the network structure of the billing system. In addition, the number of nodes that each node in the billing system needs to connect is reduced, and the number of resources such as bandwidth occupied by each node is also reduced. BRIEF DESCRIPTION OF DRAWINGS
[0088] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0089] Figure 1 is a schematic diagram of the architecture of a billing system to which a call processing method provided by the prior art is applied;
[0090] Figure 2 is a schematic diagram of the architecture of a billing system to which a call processing method provided by an embodiment of the present application is applied;
[0091] Figure 3 is a schematic diagram of the flow of a call processing method provided by an embodiment of the present application;
[0092] Figure 4 is a schematic diagram of an algorithm for determining a call processing node provided by an embodiment of the present application;
[0093] Figure 5 is a schematic diagram of the structure of a call processing device provided by an embodiment of the present application;
[0094] Figure 6 is a schematic diagram of the structure of another call processing device provided by an embodiment of the present application;
[0095] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0096] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0097] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0098] First, let’s explain the terms involved in this application:
[0099] Call record: also known as detailed record, refers to the user's original communication record message.
[0100] Taking landline telephones as an example, call records mainly include call records, and their contents may include: serial number, user ID, calling number, called number, start time, end time, call duration, call nature (whether it is a roaming call), rate, discount, etc.
[0101] Taking mobile phones as an example, in addition to call records similar to those mentioned above, call records typically also include Short Message Service (SMS) usage records, Wireless Application Protocol (WAP) usage records, General Packet Radio Service (GPRS) usage records, etc. The content of the aforementioned records is similar to that of call records. For example, taking GPRS usage records as an example, its content may include: serial number, user ID, start time, end time, GPRS usage duration, GPRS nature (whether it is non-package data), rate, discount, etc.
[0102] Figure 1 This is a schematic diagram of the architecture of a billing system using a call bill processing method provided by the prior art. Figure 1 , the existing technology of call record processing method is introduced. Figure 1As shown, the billing system includes M distribution nodes and N call record processing nodes. The distribution nodes use a consistent hashing algorithm, using the user ID of the call record as a calculation parameter, to determine the corresponding call record processing node and send the call record to the corresponding call record processing node. The call record processing node performs billing operations on the call record. Billing operations refer to operations such as fee calculation and fee deduction based on the communication record information in the call record.
[0103] Reference Figure 1 After receiving a call record, a distribution node may distribute the call record to any call record processing node, so each distribution node needs to establish a connection with all call record processing nodes, and correspondingly, each call record processing node needs to establish a connection with all distribution nodes. Due to the large number of call records to be billed, the billing system usually sets up a large number of distribution nodes and call record processing nodes to prevent the time for the distribution and processing of the call records to be billed, or the time for the billing processing process from being too long. Therefore, in the billing system in the prior art, a distribution node or a call record processing node needs to connect to a large number of nodes, thus forming a system such as Figure 1 In addition, due to the need to connect a large number of nodes, the bandwidth and other resources of the distribution nodes and call record processing nodes in the billing system will be excessively occupied.
[0104] In view of the above problems, the present application provides a call record processing method, which can reduce the number of other nodes that each node in the billing system needs to connect to, thereby simplifying the network structure of the billing system and reducing the computing resources occupied by each node in the billing system.
[0105] The call record processing method provided in this application can be applied to Figure 2 The billing system architecture diagram is shown in Figure 1. Figure 2 As shown, the billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes. Each first-level distribution node is connected to each second-level distribution node, and each second-level distribution node is connected to some call record processing nodes. X, Y, and Z are all positive integers, and both X and Z are greater than Y.
[0106] The first-level distribution node receives call records and, after determining the corresponding call record processing node, distributes the call record to the second-level distribution node connected to the call record processing node. The second-level distribution node distributes the received call records to the corresponding call record processing node. The call record processing node performs billing operations on the received call records.
[0107] Exemplarily, each node in the above-mentioned billing system can be a physical node or a virtual node. When each node in the billing system is a virtual node, multiple virtual nodes can be deployed on the same physical device or on different physical devices. When each node in the billing system is a physical node, the first-level distribution node, the second-level distribution node, and the call record processing node can be devices belonging to three clusters. That is, X first-level distribution nodes can be devices belonging to one cluster, Y second-level distribution nodes can be devices belonging to another cluster, and Z call record processing nodes can be devices belonging to yet another cluster.
[0108] Exemplarily, the electronic device may be any device with processing capabilities, such as a server.
[0109] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0110] Figure 3 This is a flow chart of a method for processing call records provided by an embodiment of the present application. Figure 3 As shown, the method of the present application may include:
[0111] S101: A first-level distribution node A among X first-level distribution nodes obtains a user's call record.
[0112] For example, the first-level distribution node A may obtain the call record of the user's communication behavior after the user completes the communication behavior through the terminal. Alternatively, the first-level distribution node A may also obtain the user's call record based on a preset period.
[0113] S102, the first-level distribution node A calls the target task node allocation algorithm according to the user ID of the call record, and determines the ID of the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes.
[0114] For example, first-level distribution node A can parse the acquired call record to obtain the user identifier of the call record. Alternatively, if the call record itself contains the user identifier, first-level distribution node A can directly obtain the user identifier of the call record. The user identifier can be, for example, a user ID or other data that uniquely identifies a user. For example, user A's user ID can be 00001, and user B's user ID can be 00002.
[0115] Exemplarily, the target task node allocation algorithm called by the first-level distribution node A can be any algorithm that can allocate the call billing processing task to the call bill processing node, such as the consistent hashing algorithm, the source address hashing algorithm, etc.
[0116] Taking the consistent hashing algorithm as an example of the target task node allocation algorithm, the first-level distribution node A can determine the call record processing node B that is to perform the billing operation on the call record from the Z call record processing nodes through the following formula (1).
[0117] P=f1(x1,...,x z ,y1,...,y z ,u)(1)
[0118] Where P represents the identifier of the call processing node B on which the billing operation is to be performed. f1 represents the consistent hashing algorithm. x represents the identifier of each call processing node. y represents the first parameter value of each call processing node. u represents the identifier of the user to whom the call record belongs.
[0119] The first parameter value is used to represent the number of call records that a call record processing node can currently process. For example, the more call records a call record processing node can currently process, the greater the likelihood that the call records will be distributed to that call record processing node for billing operations. For example, the first parameter value can be the memory usage of the call record processing node. For example, the lower the memory usage of the call record processing node, the more call records that the call record processing node can currently process.
[0120] For example, first-level distribution node A can first calculate the hash value of each call record processing node and map it to a hash ring with 2^32 values based on the hash value. It can then calculate the hash value of the call record data and map it to the hash ring. Then, first-level distribution node A can search clockwise from the location of the call record data on the hash ring. The first call record processing node found is call record processing node B.
[0121] Figure 4 This is a schematic diagram of an algorithm for determining a call record processing node provided by an embodiment of the present application. Figure 4 The bill processing node for executing billing operations on dialogue records 1, 2, 3, and 4 is bill processing node I; the bill processing node for executing billing operations on dialogue records 5, 6, 7, and 8 is bill processing node II; the bill processing node for executing billing operations on dialogue records 9, 10, 11, and 12 is bill processing node III; the bill processing node for executing billing operations on dialogue records 13, 14, 15, and 16 is bill processing node IV.
[0122] S103 , the first-level distribution node A determines the second-level distribution node C connected to the call record processing node B from the Y second-level distribution nodes according to the identifier of the call record processing node B, and distributes the call record to the second-level distribution node C.
[0123] As a possible implementation manner, the primary distribution node A may determine the secondary distribution node C connected to the call record processing node B from Y secondary distribution nodes based on a preset secondary distribution node determination algorithm.
[0124] In this implementation, the secondary distribution node determination algorithm may be, for example, an average algorithm, a random algorithm, or the like, which can be used to determine the secondary distribution node.
[0125] Taking the average algorithm as an example, the primary distribution node A can determine the secondary distribution node C connected to the call record processing node B from Y secondary distribution nodes according to the following formula (2).
[0126] Z=f2(z1,…,z Y , P)(2)
[0127] Where Z represents the identifier of the secondary distribution node C connected to the call record processing node B. f2 represents the averaging algorithm. z represents the identifier of each secondary distribution node.
[0128] As another possible implementation, primary distribution node A can also determine secondary distribution node C connected to call record processing node B based on the mapping relationship between each secondary distribution node and the corresponding call record processing node. It should be understood that when a secondary distribution node has a mapping relationship with a certain call record processing node, it indicates that the secondary distribution node is connected to the call record processing node. In other words, the mapping relationship described here is used to represent the call record processing node to which the secondary distribution node is connected.
[0129] In this implementation, the manner in which the primary distribution node A determines the secondary distribution node C may include the following situations.
[0130] Case 1: The first-level distribution node A can independently determine the mapping relationship between each second-level distribution node and the corresponding call record processing node, and then determine the second-level distribution node C connected to the call record processing node B based on the mapping relationship.
[0131] In this case, the first-level distribution node A can first determine the call record processing node among the Z call record processing nodes that is connected to each second-level distribution node, and then construct a mapping relationship between each second-level distribution node and the corresponding call record processing node based on the call record processing node connected to each second-level distribution node.
[0132] Exemplarily, the first-level distribution node A can distribute Z call record processing nodes evenly to Y second-level distribution nodes based on the number of call record processing nodes and the number of second-level distribution nodes, that is, each second-level distribution node is connected to Z divided by Y call record processing nodes.
[0133] After constructing the mapping relationship between each secondary distribution node and the corresponding call record processing node, the primary distribution node A can send the corresponding mapping relationship to each secondary distribution node, and the secondary distribution node that receives the mapping relationship saves the corresponding mapping relationship.
[0134] Exemplarily, the first-level distribution node A can also send the mapping relationship between each second-level distribution node and the corresponding call record processing node to the remaining first-level distribution nodes D among the X first-level distribution nodes. The first-level distribution node D that receives the mapping relationship only needs to save the mapping relationship between each second-level distribution node and the corresponding call record processing node, and does not need to calculate the mapping relationship by itself, thereby reducing the number of times the mapping relationship is calculated and saving the time required to calculate the mapping relationship. At the same time, it also ensures the consistency of the mapping relationship saved by each first-level distribution node.
[0135] Alternatively, the remaining first-level distribution nodes D among the X first-level distribution nodes may also independently determine the mapping relationship between each second-level distribution node and the corresponding call record processing node, and then send the determined mapping relationship to the corresponding call record processing node.
[0136] For example, when a certain call record processing node receives multiple different results of the mapping relationship, the call record processing node may save the result of the mapping relationship that it receives first.
[0137] Case 2: After other nodes in the billing system determine the mapping relationship between each secondary distribution node and the corresponding call record processing node, they send the mapping relationship to the first-level distribution node A. The first-level distribution node A determines the second-level distribution node C connected to the call record processing node B based on the received mapping relationship.
[0138] In this case, the other nodes in the above-mentioned billing system may be, for example, other first-level distribution nodes except the first-level distribution node A among the first-level distribution nodes, or may be any second-level distribution node.
[0139] Case 3: The mapping relationship between each secondary distribution node and the corresponding call record processing node is input by the user into the primary distribution node A. The primary distribution node A determines the secondary distribution node C connected to the call record processing node B based on the mapping relationship.
[0140] After determining the secondary distribution node C, illustratively, the primary distribution node A may distribute the call record to the secondary distribution node C.
[0141] Alternatively, the first-level distribution node A may distribute the call record and the determined identifier of the call record processing node B to the second-level distribution node C.
[0142] S104, after receiving the call record, the secondary distribution node C distributes the call record to the call record processing node B.
[0143] As a possible implementation method, when the first-level distribution node A only distributes the call record to the second-level distribution node C, the second-level distribution node C can call the target task node allocation algorithm based on the user identifier to which the call record belongs, determine the call record processing node B to perform billing operations on the call record from the Z call record processing nodes, and then distribute the call record to the call record processing node B.
[0144] The target task node allocation algorithm called by the secondary distribution node C is consistent with the target task node allocation algorithm called by the primary distribution node A in step S102. For example, when the target task node allocation algorithm called by the primary distribution node A in step S102 is a consistent hashing algorithm, the target task node allocation algorithm called by the secondary distribution node C is also a consistent hashing algorithm. The specific calculation process can be referred to the aforementioned embodiment and will not be repeated here.
[0145] As another possible implementation method, when the first-level distribution node A can distribute the call record and the determined identifier of the call record processing node B to the second-level distribution node C, the second-level distribution node C can directly distribute the call record to the call record processing node B based on the obtained identifier of the call record processing node B.
[0146] S105 , the call record processing node B performs a charging operation on the call record.
[0147] The call record processing method provided in this application reduces the number of nodes that each first-level distribution node needs to connect to, as well as the number of nodes that each call record processing node needs to connect to, by adding multiple second-level distribution nodes (a smaller number than the number of first-level distribution nodes and call record processing nodes) between multiple first-level distribution nodes and multiple call record processing nodes in the billing system. This reduces the number of nodes that each first-level distribution node needs to connect to, and the number of nodes that each call record processing node needs to connect to, thereby simplifying the network structure of the billing system. Furthermore, by reducing the number of nodes that each node in the billing system needs to connect to, the amount of resources such as bandwidth occupied by each node is also reduced.
[0148] The present application also provides a billing system, which includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each first-level distribution node is connected to each second-level distribution node, and each second-level distribution node is connected to some call record processing nodes, X, Y, and Z are all positive integers, and X and Z are both greater than Y;
[0149] Level 1 distribution node A among the X level 1 distribution nodes is used to obtain the user's call records;
[0150] The first-level distribution node A is also used to call the target task node allocation algorithm based on the user ID of the call record, and determine the ID of the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes;
[0151] The first-level distribution node A is further configured to determine, based on the identifier of the call record processing node B, a second-level distribution node C connected to the call record processing node B from among the Y second-level distribution nodes, and distribute the call record to the second-level distribution node C;
[0152] Secondary distribution node C is used to distribute the call records to call record processing node B after receiving them;
[0153] The call record processing node B is used to perform billing operations on the call record.
[0154] The implementation principle and technical effects of the billing system provided in this application are similar to those of the aforementioned call record processing method embodiment, and will not be described in detail.
[0155] Figure 5 This is a structural diagram of a call bill processing device provided in an embodiment of the present application. Figure 5 As shown, the device includes: an acquisition module 31, a first determination module 32, a second determination module 33 and a distribution module 34. Exemplarily, the call bill processing device may further include: a construction module 35. Among them:
[0156] Acquisition module 31, used to obtain the user's call records;
[0157] The first determining module 32 is configured to call a target task node allocation algorithm based on the user identifier of the call record, and determine the identifier of the call record processing node B on which the billing operation is to be performed from among the Z call record processing nodes;
[0158] A second determining module 33 is configured to determine, according to the identifier of the call record processing node B, the secondary distribution node C connected to the call record processing node B from the Y secondary distribution nodes;
[0159] The distribution module 34 is used to distribute the call record to the secondary distribution node C, so that after the secondary distribution node C receives the call record, it distributes the call record to the call record processing node B, so that the call record processing node B performs billing operations on the call record.
[0160] Exemplarily, the first determination module 32 is specifically used to call the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node, and determine the call record processing node B to perform billing operations on the call record from Z call record processing nodes; wherein the first parameter value is used to represent the number of call records that the call record processing node can currently process.
[0161] Optionally, the target task node allocation algorithm is a consistent hashing algorithm.
[0162] Optionally, the distribution module 34 is specifically configured to distribute the call record and the identifier of the call record processing node B to the secondary distribution node C.
[0163] As a possible implementation, the second determination module 33 is further configured to determine the call record processing node connected to each secondary distribution node among the Z call record processing nodes. The construction module 35 is configured to construct a mapping relationship between each secondary distribution node and the corresponding call record processing node based on the call record processing node connected to each secondary distribution node.
[0164] In this implementation, the distribution module 34 is further configured to send the corresponding mapping relationship to each secondary distribution node, and is further configured to send the mapping relationship between each secondary distribution node and the corresponding call record processing node to the remaining primary distribution nodes among the X primary distribution nodes.
[0165] The call record processing device provided in this application is used to execute the method executed by the first-level distribution node A in the above-mentioned call record processing method embodiment. Its implementation principle and technical effect are similar and will not be described in detail.
[0166] Figure 6 This is a structural diagram of another call record processing device provided by an embodiment of the present application. Figure 6 As shown, the device includes: a receiving module 41 and a distribution module 42.
[0167] Receiving module 41, configured to receive a user's call record obtained from first-level distribution node A among X first-level distribution nodes;
[0168] The distribution module 42 is used to distribute the call record to the call record processing node B so that the call record processing node B performs billing operations on the call record; the call record processing node B is the first-level distribution node A, which calls the target task node allocation algorithm according to the user identifier to which the call record belongs, and determines the call record processing node to perform billing operations on the call record from the Z call record processing nodes.
[0169] Optionally, the distribution module 42 is specifically configured to determine the call record processing node B to be executed by the call record for the billing operation from the Z call record processing nodes according to the user identifier to which the call record belongs, and distribute the call record to the call record processing node B.
[0170] The call record processing node B is determined from the Z call record processing nodes by the target task node allocation algorithm called by the first distribution node A according to the user identifier to which the call record belongs and the first parameter value of each call record processing node; and the first parameter value is used to represent the number of call records that can be processed by the call record processing node at present.
[0171] Exemplarily, the first distribution node A can determine the call record processing node B to be executed by the call record for the billing operation from the Z call record processing nodes according to the user identifier to which the call record belongs and the first parameter value of each call record processing node.
[0172] Optionally, the target task node allocation algorithm is a consistent hash algorithm.
[0173] As a possible implementation manner, the receiving module 41 is specifically configured to receive the call record from the first distribution node A and the identifier of the call record processing node B. The distribution module 42 is specifically configured to distribute the call record to the call record processing node B according to the identifier of the call record processing node B.
[0174] The call record processing apparatus provided in the present application is used to execute the method executed by the second distribution node C in the foregoing call record processing method embodiments, and has similar implementation principles and technical effects, which will not be described herein.
[0175] Figure 7 FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device 400 can include at least one processor 401 and a memory 402. Figure 7
[0176] The memory 402 is used to store a program. Specifically, the program can include program code, and the program code includes computer operation instructions.
[0177] The memory 402 can include a high-speed random access memory (RAM) and can also include a non-volatile memory such as at least one disk memory.
[0178] The processor 401 is configured to execute the computer-executable instructions stored in the memory 402 to implement the message processing method described in the foregoing method embodiments. The processor 401 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0179] Optionally, the electronic device 400 can further include a communication interface 403. In a specific implementation, if the communication interface 403, the memory 402, and the processor 401 are implemented independently, the communication interface 403, the memory 402, and the processor 401 can be connected to each other through a bus and complete communication therebetween. The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0180] Optionally, in a specific implementation, if the communication interface 403, the memory 402, and the processor 401 are integrated on a chip, the communication interface 403, the memory 402, and the processor 401 can complete communication through an internal interface.
[0181] The present application also provides a computer readable storage medium, which can include a U disk, a mobile hard disk, a read-only memory (ROM), a RAM memory, a magnetic disk or an optical disk, and various media that can store program codes. Specifically, the computer readable storage medium stores program instructions, and the program instructions are used for the method in the foregoing embodiments.
[0182] The present application also provides a program product, which includes execution instructions stored in a readable storage medium. At least one processor of an electronic device can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions to make the electronic device implement the message processing method provided by the various embodiments.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing call records, characterized in that: The billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; and the method includes: The first-level distribution node A among the X first-level distribution nodes obtains the user's call record; The first-level distribution node A calls the target task node allocation algorithm according to the user identifier of the call record, and determines the identifier of the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes; The first-level distribution node A determines, according to the identifier of the call record processing node B, a second-level distribution node C connected to the call record processing node B from the Y second-level distribution nodes, and distributes the call record to the second-level distribution node C; After receiving the call record, the secondary distribution node C distributes the call record to the call record processing node B; The call record processing node B performs a billing operation on the call record.
2. The method according to claim 1, characterized in that After receiving the call record, the secondary distribution node C distributes the call record to the call record processing node B, including: The secondary distribution node C calls the target task node allocation algorithm according to the user identifier of the call record, and determines the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes; The secondary distribution node C distributes the call record to the call record processing node B.
3. The method according to claim 2, characterized in that The first-level distribution node A calls a target task node allocation algorithm according to a user identifier to which the call record belongs, and determines a call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, including: The first-level distribution node A calls the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node, and determines the call record processing node B to perform billing operations on the call record from the Z call record processing nodes; wherein the first parameter value is used to represent the number of call records that the call record processing node can currently process.
4. The method according to claim 3, characterized in that The secondary distribution node C calls the target task node allocation algorithm according to the user identifier of the call record, and determines the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, including: The secondary distribution node C calls the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node, and determines the call record processing node B to perform billing operations on the call record from the Z call record processing nodes.
5. The method according to any one of claims 1 to 4, characterized in that The target task node allocation algorithm is a consistent hashing algorithm.
6. The method according to claim 1 or 3, characterized in that The first-level distribution node A distributes the call record to the second-level distribution node C, including: The first-level distribution node A distributes the call record and the identifier of the call record processing node B to the second-level distribution node C; After receiving the call record, the secondary distribution node C distributes the call record to the call record processing node B, including: After receiving the call record and the identifier of the call record processing node B, the secondary distribution node C distributes the call record to the call record processing node B according to the identifier of the call record processing node B.
7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: The first-level distribution node A determines a call record processing node connected to each second-level distribution node among the Z call record processing nodes; The first-level distribution node A builds a mapping relationship between each second-level distribution node and the corresponding call record processing node according to the call record processing node connected to each second-level distribution node; The first-level distribution node A sends the corresponding mapping relationship to each second-level distribution node; The secondary distribution node stores the corresponding mapping relationship.
8. The method according to claim 7, characterized in that The method further comprises: The first-level distribution node A sends a mapping relationship between each second-level distribution node and the corresponding call record processing node to the remaining first-level distribution nodes D among the X first-level distribution nodes; The first-level distribution node D stores the mapping relationship between each second-level distribution node and the corresponding call record processing node.
9. A method for processing call records, characterized in that: The billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some of the call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; The method is applied to a first-level distribution node A among the X first-level distribution nodes, and the method includes: Get the user's call log; According to the user identifier of the call record, calling the target task node allocation algorithm, determining the identifier of the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes; Determine, according to the identifier of the call record processing node B, a secondary distribution node C connected to the call record processing node B from the Y secondary distribution nodes; The call record is distributed to the secondary distribution node C, so that after the secondary distribution node C receives the call record, it distributes the call record to the call record processing node B, so that the call record processing node B performs a billing operation on the call record.
10. The method according to claim 9, characterized in that The step of calling a target task node allocation algorithm based on the user identifier of the call record to determine the identifier of the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes includes: According to the user identifier to which the call record belongs and the first parameter value of each call record processing node, the target task node allocation algorithm is called to determine the call record processing node B to perform billing operations on the call record from the Z call record processing nodes; wherein the first parameter value is used to characterize the number of call records that the call record processing node can currently process.
11. The method according to claim 9 or 10, characterized in that The target task node allocation algorithm is a consistent hashing algorithm.
12. The method according to claim 9 or 10, characterized in that The distributing the call record to the secondary distribution node C includes: The call record and the identifier of the call record processing node B are distributed to the secondary distribution node C.
13. The method according to claim 9 or 10, characterized in that The method further comprises: Determine a call record processing node connected to each secondary distribution node among the Z call record processing nodes; According to the call processing node connected to each secondary distribution node, a mapping relationship between each secondary distribution node and the corresponding call processing node is established; Send the corresponding mapping relationship to each secondary distribution node.
14. The method according to claim 13, wherein: The method further comprises: The mapping relationship between each secondary distribution node and the corresponding call record processing node is sent to the remaining primary distribution nodes among the X primary distribution nodes.
15. A method for processing a call record, characterized in that: The billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some of the call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; The method is applied to the secondary distribution node C among the Y secondary distribution nodes, and the method includes: Receiving a user's call record obtained from a first-level distribution node A among the X first-level distribution nodes; The call record is distributed to the call record processing node B so that the call record processing node B performs billing operations on the call record; the call record processing node B is the first-level distribution node A, which calls the target task node allocation algorithm according to the user identifier to which the call record belongs, and determines the call record processing node to perform billing operations on the call record from the Z call record processing nodes.
16. The method according to claim 15, characterized in that The distributing the call record to the call record processing node B includes: According to the user identifier of the call record, calling the target task node allocation algorithm, determining the call record processing node B to perform the billing operation on the call record from the Z call record processing nodes; Distribute the call record to the call record processing node B.
17. The method according to claim 16, characterized in that The call record processing node B is a call record processing node determined by the first-level distribution node A from the Z call record processing nodes by calling the target task node allocation algorithm based on the user identifier to which the call record belongs and the first parameter value of each call record processing node; wherein the first parameter value is used to represent the number of call records that the call record processing node can currently process; The step of calling the target task node allocation algorithm according to the user identifier to which the call record belongs, and determining the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes, includes: According to the user identifier to which the call record belongs and the first parameter value of each call record processing node, the target task node allocation algorithm is called to determine the call record processing node B to perform billing operations on the call record from the Z call record processing nodes.
18. The method according to any one of claims 15 to 17, characterized in that: The target task node allocation algorithm is a consistent hashing algorithm.
19. The method according to claim 15, characterized in that The receiving a call record of a user of the first-level distribution node A among the X first-level distribution nodes includes: Receiving the call record and the identifier of the call record processing node B from the first-level distribution node A; The distributing the call record to the call record processing node B includes: The call record is distributed to the call record processing node B according to the identifier of the call record processing node B.
20. The method according to any one of claims 15 to 17, characterized in that: The method further comprises: receiving a mapping relationship between the second-level distribution node C and the corresponding call record processing node from the first-level distribution node A among the X first-level distribution nodes; The mapping relationship between the secondary distribution node C and the corresponding call record processing node is saved.
21. A billing system, characterized in that: The billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; A first-level distribution node A among the X first-level distribution nodes is used to obtain the user's call records; The first-level distribution node A is further configured to call a target task node allocation algorithm based on the user identifier of the call record, and determine the identifier of the call record processing node B to perform a billing operation on the call record from the Z call record processing nodes; The first-level distribution node A is further configured to determine, according to the identifier of the call record processing node B, a second-level distribution node C connected to the call record processing node B from the Y second-level distribution nodes, and distribute the call record to the second-level distribution node C; The secondary distribution node C is used to distribute the call record to the call record processing node B after receiving the call record; The call record processing node B is used to perform billing operations on the call record.
22. A call record processing device, characterized in that: The billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some of the call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; The device is applied to a first-level distribution node A among the X first-level distribution nodes, and includes: Acquisition module, used to obtain the user's call records; A first determining module is configured to call a target task node allocation algorithm based on a user identifier of the call record, and determine an identifier of a call record processing node B to perform a billing operation on the call record from among the Z call record processing nodes; A second determining module is configured to determine, according to the identifier of the call record processing node B, a secondary distribution node C connected to the call record processing node B from the Y secondary distribution nodes; The distribution module is used to distribute the call record to the secondary distribution node C, so that after the secondary distribution node C receives the call record, it distributes the call record to the call record processing node B, so that the call record processing node B performs billing operations on the call record.
23. A call record processing device, characterized in that: The billing system includes X first-level distribution nodes, Y second-level distribution nodes, and Z call record processing nodes, each of the first-level distribution nodes is connected to each of the second-level distribution nodes, and each second-level distribution node is connected to some of the call record processing nodes, wherein X, Y, and Z are all positive integers, and both X and Z are greater than Y; The device is applied to the secondary distribution node C among the Y secondary distribution nodes, and the device includes: A receiving module, configured to receive a user's call record obtained from the first-level distribution node A among the X first-level distribution nodes; A distribution module is used to distribute the call record to the call record processing node B so that the call record processing node B performs billing operations on the call record; the call record processing node B is the first-level distribution node A, which calls the target task node allocation algorithm according to the user identifier to which the call record belongs, and determines the call record processing node to be used to perform billing operations on the call record from the Z call record processing nodes.
24. An electronic device, characterized in that: The electronic device includes: at least one processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 9 to 14 or any one of claims 15 to 20.
25. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method of any one of claims 9 to 14 or any one of claims 15 to 20.
Citation Information
Patent Citations
Roaming mobile subscriber registration in a distributed mobile architecture
US20070287452A1
Systems and methods for secure transaction management and electronic rights protection
US5910987A