Charging method, device, server and charging system

By chunking the billing area and using alternative machines for billing, the problems of high server performance and distributed billing information in the prior art are solved, and accurate user consumption calculations are realized in complex business scenarios of Internet cafes.

CN119276643APending Publication Date: 2025-01-07CHENGDU JISHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411393258.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing billing system has high server performance requirements and distributed billing has problems such as long chain, loss of information and difficulty in tracking. Especially in complex business scenarios of Internet cafes, it is difficult to achieve accurate user consumption calculations.

Method used

By chunking the billing area, selecting the machines in each block as alternative machines, receiving rate packages and synchronizing, billing when the user starts the target machine, using the alternative machines to reduce server performance requirements, and through responsibility Chain mode handles requests to avoid loss of information.

Benefits of technology

It realizes the reduction of server performance requirements in complex business scenarios of Internet cafes, avoids information loss and difficulty in tracking caused by excessive chain in distributed billing, and ensures accurate calculation of user consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276643A_ABST
    Figure CN119276643A_ABST
Patent Text Reader

Abstract

The invention discloses a charging method and device, a server and a charging system, and the charging method comprises the steps: obtaining the number of machines in a charging region, carrying out the partitioning processing of the charging region according to a target region, so as to obtain the number of blocks corresponding to each sub-region, and enabling the number of machines in the target region to be minimum, and enabling the number of machines in the target region to be smaller than the number of blocks in each sub-region to be smaller than the number of blocks in each sub-region; the method comprises the following steps: selecting machines with the corresponding number of blocks in a sub-region as alternative machines, when the alternative machines are started, receiving an issued rate packet, synchronizing the rate packet to each machine in the corresponding sub-region, and when a user starts a target machine, performing charging according to the rate packet in the target machine, thereby realizing block processing of the internet bar region. According to the invention, the Internet access of the user is charged through one or more alternative machines in different areas, the processing performance requirements of the server are reduced through the arrangement of the alternative machines, and the problems of tedious information, more information amount, easiness in loss and difficulty in tracking caused by an overlong chain in distributed charging are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of billing software technology, and in particular to a billing method, device, server and billing system. Background Art

[0002] As user demand scenarios continue to change, the businesses carried by Internet cafes are becoming more and more complex, and the corresponding billing system functions are becoming more and more extensive. At the same time, the diversification of user systems makes the calculation rules more and more complicated. However, the core function of billing remains unchanged. Its essence lies in accurately calculating the consumption of users' online time, estimating the balance and subsequent usage time in real time after user operations such as recharge and product consumption, and accurately calculating the final user consumption at the end of a session.

[0003] Among the related technologies, the most common ones on the market are the billing and cloud billing systems based on the CS architecture. The current calculation methods are all performed uniformly on the Internet cafe's server or the central server in the cloud. When billing is performed through the Internet cafe's server, the server performance requirements are relatively high. When billing is performed through distributed cloud computing, there are problems such as the chain being too long and lost information being difficult to track. Summary of the invention

[0004] In view of the above problems, the present application provides a billing method, device, server and billing system to at least solve the problems existing in the related technology.

[0005] In a first aspect, an embodiment of the present application provides a billing method, the billing method comprising:

[0006] Get the number of machines in the billing area;

[0007] Divide the billing area into blocks according to the target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least;

[0008] Selecting a machine corresponding to the number of blocks in the sub-area as a candidate machine;

[0009] When the standby machine is started, it receives the rate package sent down, and synchronizes the rate package to each machine in the corresponding sub-area;

[0010] When the user starts the target machine, the charging is performed according to the rate package in the target machine.

[0011] In some embodiments, selecting a machine corresponding to the number of blocks in the sub-area as a candidate machine includes:

[0012] Select any machine in each block as a random candidate machine, wherein the number of machines in each block is equal to the number of machines in the target area, and multiple random candidate machines in the same sub-area correspond to different machines;

[0013] Obtaining the performance consumption of the random candidate machine and other machines in each block;

[0014] The machine with the least performance consumption in each block is used as the target candidate machine.

[0015] In some embodiments, the charging method further includes: when the number of the alternative machines in the same sub-area exceeds one, a plurality of the alternative machines share the rate package, and the plurality of the alternative machines are connected and run in a chain of responsibility mode.

[0016] In some embodiments, obtaining the performance consumption of the random candidate machine and the remaining machines in each block includes:

[0017] Obtaining a first performance consumption of the remaining machines transmitting to the random candidate machine;

[0018] The second performance consumption of the random candidate machine itself is obtained.

[0019] In some embodiments, taking the machine with the least performance consumption in each block as the target candidate machine includes:

[0020] According to the first performance consumption and the second performance consumption, the corresponding machines in each block are sorted according to the performance consumption;

[0021] The machine with the least performance consumption in the sorting is used as the target candidate machine, and the remaining machines in each block are notified to update the transmission target from the random candidate machine to the target candidate machine.

[0022] In some embodiments, the connecting of the plurality of candidate machines and operating them in a chain of responsibility mode includes:

[0023] Connecting the plurality of candidate machines in the same sub-area in sequence to form a responsibility chain;

[0024] Determine whether the performance of the candidate machine in the responsibility chain meets the work request;

[0025] When the candidate machine does not satisfy the work request, the work request is transmitted to the remaining connected candidate machines in sequence until the candidate machines in the responsibility chain complete the work request.

[0026] In some embodiments, the candidate machine is connected to a server, and the billing method further includes:

[0027] When all the candidate machines in the responsibility chain do not satisfy the work request;

[0028] Processing the work request based on the server and / or processing the work request based on the server allocating operators of the remaining sub-areas;

[0029] When the candidate machine in the responsibility chain satisfies the work request, the operator is returned to the sub-area based on the server.

[0030] In a second aspect, an embodiment of the present application provides a charging device, the device comprising:

[0031] The acquisition module is used to obtain the number of machines in the billing area;

[0032] A processing module, configured to divide the billing area into blocks according to a target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least;

[0033] A selection module, used for selecting machines corresponding to the number of blocks in the sub-area as candidate machines;

[0034] A synchronization module, used for receiving the rate package issued when the candidate machine is started, and synchronizing the rate package to each machine in the corresponding sub-area;

[0035] The charging module is used for charging according to the rate package in the target machine when the user starts the target machine.

[0036] In a third aspect, an embodiment of the present application provides a server, comprising a memory and a processor, wherein the memory stores a program code that can be executed on the processor, and when the program code is executed by the processor, the billing method introduced in any implementation method of the first aspect is implemented.

[0037] In a fourth aspect, an embodiment of the present application provides a billing system, including an alternative machine, and also including a billing device as introduced in the second aspect and a server as introduced in claim 3, wherein the server is respectively connected to multiple alternative machines, and the server is connected to the billing device.

[0038] In a fifth aspect, an embodiment of the present application provides a computer storage medium, which stores one or more programs, and the one or more programs can be executed by the server as introduced in the third aspect to implement the billing method as introduced in any implementation method of the first aspect.

[0039] The embodiments of the present application provide a billing method, device, server and billing system, the billing method comprising: obtaining the number of machines in a billing area, dividing the billing area into blocks according to a target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least, selecting machines with the corresponding number of blocks in the sub-area as alternative machines, and when the alternative machines are started, receiving the rate packages issued, synchronizing the rate packages to the machines in the corresponding sub-areas, and when the user starts the target machine, billing is performed according to the rate packages in the target machine, so as to realize block processing of the Internet cafe area, and billing the user's Internet access through one or more alternative machines in different areas, and reducing the server processing performance requirements through the setting of alternative machines, and avoiding the problems of distributed billing that the chain is too long, resulting in cumbersome information, large amount of information, easy loss and difficulty in tracking.

[0040] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Hereinafter, the present application will be described in more detail based on embodiments and with reference to the accompanying drawings.

[0042] Figure 1 A schematic diagram of a charging method process proposed in an embodiment of the present application is shown;

[0043] Figure 2 A schematic diagram of an exemplary system architecture proposed in an embodiment of the present application is shown;

[0044] Figure 3 A schematic diagram of rate package sharing in an exemplary system architecture proposed in an embodiment of the present application is shown;

[0045] Figure 4 A schematic diagram of transmission of candidate machine performance screening information in an exemplary system architecture proposed in an embodiment of the present application is shown;

[0046] Figure 5 A schematic diagram of dynamic free flow of parameters in an exemplary system architecture proposed in an embodiment of the present application is shown;

[0047] Figure 6 A schematic diagram of operator freeing in an exemplary system architecture proposed in an embodiment of the present application is shown;

[0048] Figure 7 A schematic diagram of the structure of a charging device proposed in an embodiment of the present application is shown;

[0049] Figure 8A structural block diagram of a server for executing a charging method according to an embodiment of the present application is shown;

[0050] Fig. 9 A computer-readable storage medium for storing or carrying a billing method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0051] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0052] As user demand scenarios continue to change, the businesses carried by Internet cafes are becoming more and more complex, and the corresponding billing system functions are becoming more and more extensive. At the same time, the diversification of user systems makes the calculation rules more and more complicated. However, the core function of billing remains unchanged. Its essence lies in accurately calculating the consumption of users' online time, estimating the balance and subsequent usage time in real time after user operations such as recharge and product consumption, and accurately calculating the final user consumption at the end of a session.

[0053] In the related technologies, the most common ones are the billing and cloud billing systems based on the CS architecture. The current calculation method is to perform unified calculations on the server of the Internet cafe or the central server in the cloud.

[0054] For billing systems based on CS architecture or cloud, the fees are calculated centrally, or there is a billing server in each Internet cafe, and billing is performed through the billing server of the Internet cafe. Since the Internet cafe system needs to calculate fees in real time, the usual practice is to calculate the fee consumption of each user once at each fixed time interval. Due to the complex computer scenarios involved and the variable fee rules designed by the Internet cafe, when all billing is concentrated on one server for calculation, it is a great test for the server performance. At the same time, when the client is offline, the hosting cannot accurately bill, which will also introduce other problems.

[0055] For the distributed cloud billing system, the client acts as a computing node. When the user logs on, the client loads the operator to perform billing calculations. Although this disperses the computing performance consumption to the client machine, allowing the client to perform billing independently when away from the center, when the chain is too long, information about whether the request is processed is often lost and difficult to track. In addition, frequent transmissions from each client in the chain add additional losses. The separation of requests and processing makes the computer process difficult to monitor and debug. Once a problem occurs, the entire Internet cafe machine needs to be traced and cannot be quickly located. These problems need to be solved urgently.

[0056] In view of the above problems, the applicant has proposed a billing method, device, server and billing system provided by the embodiment of the present application. The billing method includes: obtaining the number of machines in the billing area, dividing the billing area into blocks according to the target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least, selecting the machines with the corresponding number of blocks in the sub-area as the candidate machines, and when the candidate machines are started, receiving the rate package issued, synchronizing the rate package to each machine in the corresponding sub-area, and when the user starts the target machine, billing is performed according to the rate package in the target machine, so as to realize that the multiple billing areas of the Internet cafe are generated into blocks of the corresponding areas according to the regional conditions, and the rate package and the user are triggered after the alternative machines for auxiliary calculation in each block are used to complete the billing, which solves the problem of insufficient processing performance of the Internet cafe server in the prior art, and sets the corresponding alternative machines by regional block, avoiding the chain processing that is too long, resulting in the request and machine information being difficult to track and monitor, and the problems existing in the above prior art. Among them, the billing method is described in detail in the subsequent embodiments.

[0057] The following is an introduction to the application scenarios of the billing method provided in the embodiment of the present application:

[0058] See also Figure 1 , Figure 1 A schematic diagram of a billing method provided in an embodiment of the present application. In this embodiment, the billing method can be applied to Figure 8 The charging device 300 shown is Fig. 9 In the server 200 shown, the alternative machine, the server and the billing device can together form a billing system, and the server and the alternative machine, the billing device and other equipment can complete the information control by wireless and / or wired transmission. Figure 1 The process shown is described in detail, and the charging method may include S110 to S150.

[0059] S110: Obtain the number of machines in the billing area.

[0060] In an embodiment of the present application, the Internet cafe has different billing areas, each area has different charging standards and machine performance and quantity.

[0061] S120: Divide the billing area into blocks according to the target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least.

[0062] In the embodiment of the present application, the billing areas set up in the Internet cafe can be sorted from small to large according to the number of machines belonging to them. For example, area a has 5 machines, area b has 10 machines, and area c has 20 machines, which can be sorted according to a, b, and c. Blocking by target area includes: dividing the blocks based on the minimum number of machines to obtain the number of blocks in different sub-areas. For example, the billing area is divided based on a minimum of five machines, and area a has 1 block, area b has 2 blocks, and area c has 4 blocks.

[0063] S130: Select machines with a corresponding number of blocks in the sub-area as candidate machines.

[0064] In an embodiment of the present application, each sub-area corresponds to one or more alternative machines, corresponding to the number of blocks of machines. Exemplarily, it can be described as {area, block (block machine)}, then {a, block1 (a1, ..., a5)}, {b, block1 (b1, ..., b5), block2 (b6, .., b10)}.

[0065] S140: When the standby machine is started, it receives the sent rate package and synchronizes the rate package to each machine in the corresponding sub-area.

[0066] In the embodiment of the present application, the service area only needs to send the rate package when one or more candidate machines in the block report for the first time, and the candidate machine will synchronize the rate package to the machine in the corresponding block. For example, in area a, a1 as the candidate machine obtains the rate package and synchronizes the rate package to a2, ..., a5. In area b, b1 and b6 are the candidate machines, and b1 and b6 synchronize the rate package to the corresponding b2, ..., b5 and b7, ..., b10 respectively.

[0067] S150: When the user starts the target machine, charging is performed according to the rate package in the target machine.

[0068] In the embodiment of the present application, when the user logs in to the target machine, monitoring is triggered. If a rate package exists, the operator is activated and billing is performed. If not, a request is made to the alternative machine for reactivation before billing.

[0069] In this embodiment, please refer to Figure 2 , Figure 2 A schematic diagram of an exemplary system architecture proposed for this application, which implements block management on the client's machines, with the machines in the block directly processing requests. Block management eliminates problems such as long chains, frequent request transmissions, and no responses, thereby optimizing the performance consumption of Internet cafe servers and ensuring that abnormal situations are handled quickly, dynamically monitored and adjusted, and the client participates in the calculation as a computing node, ensuring that the Internet cafe server can be charged normally even in offline scenarios.

[0070] Considering the ability to timely handle problems within each block in order to optimize them.

[0071] In some embodiments, selecting machines with a corresponding number of blocks in the sub-area as candidate machines in S130 may include S131 to S133.

[0072] S131: Select any machine in each block as a random candidate machine, where the number of machines in each block is equal to the number of machines in the target area, and multiple random candidate machines in the same sub-area correspond to different machines.

[0073] In an embodiment of the present application, each block corresponds to a group of machines, as described in the S140 example, multiple blocks in a sub-area correspond to different groups of machines, wherein the selection of the candidate machines for each block is initially randomly drawn. For example, in the S140 example, a2, b3, and b9 can be used as candidate machines in the corresponding blocks.

[0074] S132: Obtain the performance consumption of the random candidate machine and the remaining machines in each block.

[0075] In some implementations, S132 includes: obtaining the first performance consumption transmitted by the remaining machines to the random candidate machine, and obtaining the second performance consumption of the random candidate machine itself.

[0076] In an embodiment of the present application, machines in other blocks can transmit the performance consumption of their own machines to randomly selected alternative machines according to a preset time period or continuously. For example, in area a block1, a1 is initialized as an alternative machine, and a2, a3, a4, and a5 report their own performance consumption to a1.

[0077] S133: The machine with the lowest performance consumption in each block is used as a target candidate machine.

[0078] In some embodiments, S133 includes: sorting the corresponding machines in each block according to the performance consumption size based on the first performance consumption and the second performance consumption, taking the machine with the lowest performance consumption in the sorting as the target candidate machine, and notifying the remaining machines in each block to update the transmission target from the random candidate machine to the target candidate machine.

[0079] In the embodiment of the present application, the lowest performance consumption can also be expressed as the machine having spare performance to handle other matters, or the machine having better performance. For example, after monitoring, a1 finds that a3 is more suitable as an alternative machine, then notifies each machine to update the alternative machine to a3, and subsequently other machines report to a3.

[0080] In this embodiment, please refer to Figure 4 , Figure 4The schematic diagram of the transmission of information on the performance screening of the candidate machine in an exemplary system architecture proposed in this application is that the client periodically reports the performance loss, the standby machine monitors the performance of the machines in the block, and independently controls the calculation in the block. The server can monitor the performance of each standby machine. When the performance difference exceeds the threshold, the high-performance candidate machine takes over the calculation of the low-performance candidate machine to achieve dynamic adjustment, complete the direct processing of the request by the most suitable machine in the block, and improve efficiency. Figure 4 In the process, according to the order in the block, other machines report to the candidate machine, and the candidate machine performs the ordering operation. When the new candidate machine is still the local machine, the current state remains unchanged. When the new candidate machine is not the local machine, the machine in the block is notified to update the candidate machine and report to the server. If a machine fails to update, the old candidate machine notifies the client again and returns the report failure; the client stops reporting until the report is successful.

[0081] In some embodiments, see Figure 5 , Figure 5 This is a schematic diagram of dynamic free parameters in an exemplary system architecture proposed in an embodiment of the present application, wherein the charging method further includes:

[0082] When the performance of other machines in the block does not meet the preset requirements, the parameters of other machines are freed and the parameters of other machines are directly sent to the candidate machine, which participates in auxiliary calculations. When other machines in the block are disconnected from the server, the machine no longer participates in the performance ranking and will re-participate after the connection is restored. At this time, the machine is still in the block, and the generation initialization of the block is completed without dynamic changes. Among them, the parameters include the original machine information and the user's machine information.

[0083] In some embodiments, the billing method further includes S210.

[0084] S210: When the number of alternative machines in the same sub-area exceeds one, multiple alternative machines share a rate package, and the multiple alternative machines are connected and run in a responsibility chain mode.

[0085] In an embodiment of the present application, when there are multiple plots of land in the same sub-area, multiple alternative machines can be organized into a responsibility chain to operate, so that when one alternative machine cannot complete the work, other alternative machines can replace it to complete the work.

[0086] In this example, see Figure 3 , Figure 3 A schematic diagram of rate package sharing in an exemplary system architecture proposed in this application, wherein a server monitors and manages each alternative machine, and alternative machines in the same area form a virtual ring according to a responsibility chain model, and the alternative machines on the virtual ring can still maintain free parameter information when they are free.

[0087] In some embodiments, S210 includes S211 to S213.

[0088] S211: Connect multiple candidate machines in the same sub-area in sequence to form a responsibility chain.

[0089] S212: Determine whether the performance of the candidate machine in the responsibility chain meets the work request.

[0090] S213: When the candidate machine does not satisfy the work request, the work request is transmitted to the other connected candidate machines in sequence until the candidate machines in the responsibility chain complete the work request.

[0091] In the above embodiment of the present application, the alternative machine determines whether to run. If not, it requests the same ring responsibility chain until no machine in the ring responds, thereby realizing independent management of each block. When problems occur, they are handled promptly within the block, and when the processing pressure within the block increases, help is requested from the same area block.

[0092] Exemplarily, when there are N (n1, ...n) blocks in an area, these N (n1, ..., n) backup machines are connected in sequence (n1 connects to n2, n2 connects to n3, ..., n finally connects back to n1), where the responsibility chain works as follows: when the n1 backup machine cannot support processing, it asks the connected n2 whether to accept the processing. n2 chooses whether to accept the processing based on its own performance. If it does not accept the processing, it continues to pass the request to n3.

[0093] In some embodiments, the alternative machine is also connected to a server, and the billing method further includes S214 to S215.

[0094] S214: When all candidate machines in the responsibility chain do not satisfy the work request, the work request is processed based on the server and / or the operator of the remaining sub-areas allocated by the server is processed to process the work request.

[0095] In an embodiment of the present application, the server sorts and manages the reported alternative machines for each block. Each area has at least one alternative machine, which is managed independently within the block. When auxiliary calculations are needed, the alternative machine is directly reported. When the processing pressure of the alternative machine increases, the alternative machines in the same chain assist. If the problem cannot be solved within one chain, it will be reported to the server, and the server will allocate cross-region processing.

[0096] S215: When the candidate machine in the responsibility chain satisfies the work request, the operator is returned to the sub-region based on the server.

[0097] In an embodiment of the present application, the server can save and maintain cross-region operators, and then return them to the same region after computing resources are satisfied.

[0098] In this example, see Figure 6 , Figure 6This is a schematic diagram of operator free movement in an exemplary system architecture proposed in an embodiment of the present application. In the figure: the operator free movement process is: when the alternative machine in the same area cannot meet the computing needs, it is reported to the server, and the server is responsible for computing or allocating operators across regions for computing; the server saves and maintains cross-region operators, and then returns them to the same area after computing resources are met, so as to realize dynamic free movement within the fast zone, which only requires passing parameter information, and server scheduling only needs to control a small number of machines. If cross-regional assistance is required, the server can complete dynamic adjustment.

[0099] In summary, the present application provides a billing method, device, server and billing system, in which the server only needs to monitor and sort the performance of a small number of clients in real time to avoid problems such as long chains, frequent request transmission, and difficulty in debugging and monitoring. When the server starts, each block is generated according to the area, and an alternative machine for auxiliary calculation is obtained in the block. Each alternative machine obtains a rate package, and the rate package is synchronized in the block. Monitoring is triggered when the user logs on to the machine. If the rate package exists, the operator is directly activated. If not, the alternative machine is requested to be reactivated.

[0100] The client periodically reports performance loss, and the standby machine monitors the performance of the machines in the block and independently controls the operations in the block; the server monitors the performance of each standby machine. When the performance difference exceeds the threshold, the high-performance standby machine takes over the operation of the low-performance standby machine to achieve dynamic adjustment. When the client has insufficient performance or disconnection, the parameters are freed to the standby machine for processing. When the server detects that the performance of the standby machine is insufficient, the standby machine operator is allocated to the high-performance standby machine.

[0101] In practical applications, for example, an Internet cafe has n areas with a total of m machines, and each area has at least x machines, then there are y = m / x blocks at the physical level. For Internet cafes that cannot be rounded, virtual offline machines are used to supplement them; the server only needs to manage y, at most y+1 machines, and each block selects its own backup machine to perform intra-block performance monitoring and auxiliary operations during free time; the backup machines of each block are monitored by the server, and the computing tasks of the backup machines are dynamically allocated.

[0102] See also Figure 7 , Figure 7 This is a structural block diagram of a billing device provided by the present application. The billing device 300 includes: an acquisition module 310, a processing module 320, a selection module 330, a synchronization module 340 and a billing module 350, wherein:

[0103] The acquisition module 310 is used to acquire the number of machines in the billing area.

[0104] The processing module 320 is used to divide the billing area into blocks according to the target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least.

[0105] The selection module 330 is used to select machines with a corresponding number of blocks in the sub-area as candidate machines.

[0106] The synchronization module 340 is used to receive the rate package sent when the standby machine is started, and synchronize the rate package to each machine in the corresponding sub-area.

[0107] The charging module 350 is used to charge according to the rate package in the target machine when the user starts the target machine.

[0108] It should be noted that the device embodiments in the present application correspond to each other with the aforementioned method embodiments. The specific principles in the device embodiments can be found in the contents of the aforementioned method embodiments and will not be repeated here.

[0109] In several embodiments provided in this embodiment, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0110] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0111] See also Figure 8 , Figure 8 A structural block diagram of a server 200 that can execute the above-mentioned billing method is provided in an embodiment of the present application.

[0112] The ice maker 200 further includes a processor 202 and a memory 204. The memory 204 stores a program that can execute the contents of the aforementioned embodiments, and the processor 202 can execute the program stored in the memory 204.

[0113] The processor 202 may include one or more cores and message matrix units for processing data. The processor 202 uses various interfaces and lines to connect the various parts of the entire ice maker 200, and executes various functions and processes data of the ice maker 200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 204, and calling data stored in the memory 204. Optionally, the processor 202 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 202 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modulation decoder. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modulation decoder may not be integrated into the processor, but may be implemented separately through a communication chip.

[0114] The memory 204 may include a random access memory (RAM) or a read-only memory (ROM). The memory 204 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 204 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., instructions for a user to obtain a random number), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (e.g., random numbers) created by the terminal during use, etc.

[0115] Please refer to Fig. 9 , Fig. 9 The computer-readable storage medium 400 stores program code 410, which can be called by a processor to execute the method described in the above method embodiment.

[0116] The computer-readable storage medium 400 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 400 has storage space for program codes 410 that perform any method steps in the above method. These program codes 410 can be read from or written to one or more computer program products. The program codes 410 can be compressed, for example, in an appropriate form.

[0117] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the billing method described in the above various optional implementations.

[0118] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A charging method, characterized in that: The billing method comprises: Get the number of machines in the billing area; Divide the billing area into blocks according to the target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least; Selecting a machine corresponding to the number of blocks in the sub-area as a candidate machine; When the standby machine is started, it receives the rate package sent down, and synchronizes the rate package to each machine in the corresponding sub-area; When the user starts the target machine, the charging is performed according to the rate package in the target machine.

2. The charging method according to claim 1, characterized in that: The selecting a machine corresponding to the number of blocks in the sub-area as a candidate machine includes: Select any machine in each block as a random candidate machine, wherein the number of machines in each block is equal to the number of machines in the target area, and multiple random candidate machines in the same sub-area correspond to different machines; Obtaining the performance consumption of the random candidate machine and the remaining machines in each block; The machine with the least performance consumption in each block is used as the target candidate machine.

3. The charging method according to claim 2, characterized in that: The billing method further includes: When the number of the alternative machines in the same sub-area exceeds one, the multiple alternative machines share the rate package, and the multiple alternative machines are connected and run in a responsibility chain mode.

4. The charging method according to claim 2, characterized in that: The obtaining the performance consumption of the random candidate machine and the remaining machines in each block includes: Obtaining a first performance consumption of transmission from the remaining machines to the random candidate machine; The second performance consumption of the random candidate machine itself is obtained.

5. The charging method according to claim 4, characterized in that: The step of taking the machine with the least performance consumption in each block as the target candidate machine includes: According to the first performance consumption and the second performance consumption, the corresponding machines in each block are sorted according to the performance consumption; The machine with the least performance consumption in the sorting is used as the target candidate machine, and the remaining machines in each block are notified to update the transmission target from the random candidate machine to the target candidate machine.

6. The charging method according to claim 3, characterized in that: The step of connecting the plurality of candidate machines and operating them in a chain of responsibility mode includes: Connecting the plurality of candidate machines in the same sub-area in sequence to form a responsibility chain; Determine whether the performance of the candidate machine in the responsibility chain meets the work request; When the candidate machine does not satisfy the work request, the work request is transmitted to the remaining connected candidate machines in sequence until the remaining candidate machines in the responsibility chain complete the work request.

7. The charging method according to claim 6, characterized in that: The candidate machine is connected to a server, and the billing method further includes: When all the candidate machines in the responsibility chain do not satisfy the work request, the server processes the work request and / or the server allocates operators of the remaining sub-areas to process the work request; When the candidate machine in the responsibility chain satisfies the work request, the operator is returned to the sub-area based on the server.

8. A charging device, characterized in that: The device comprises: The acquisition module is used to obtain the number of machines in the billing area; A processing module, configured to divide the billing area into blocks according to a target area to obtain the number of blocks corresponding to each sub-area, wherein the number of machines in the target area is the least; A selection module, used for selecting machines corresponding to the number of blocks in the sub-area as candidate machines; A synchronization module, used for receiving the rate package issued when the candidate machine is started, and synchronizing the rate package to each machine in the corresponding sub-area; The charging module is used for charging according to the rate package in the target machine when the user starts the target machine.

9. A server, characterized in that: The service area includes a memory and a processor, the memory stores a program code that can be run on the processor, and when the program code is executed by the processor, the charging method according to any one of claims 1 to 7 is implemented.

10. A billing system, characterized in that: The billing system includes an alternative machine, and also includes a billing device as claimed in claim 8 and a server as claimed in claim 9, wherein the server is respectively connected to a plurality of the alternative machines, and the server is connected to the billing device.