Bill determination method and device of virtual number, medium and equipment
By filtering virtual numbers in the first information table and the second information table, and calculating monthly rent based on the activation and unsubscribe time, the problem of complexity and accuracy of virtual number bill generation is solved, and simplified operation and efficient and accurate bill calculation is achieved.
Patent Information
- Application Number
- CN202510436090.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, frequent activation and unsubscribe operations of virtual numbers lead to reduced complexity and accuracy in bill generation, making it difficult to accurately calculate the monthly rent bill of virtual numbers.
By filtering the virtual number currently in use in the first information table and the unsubscribed virtual number in the second information table, counting their monthly rent bills respectively, filtering the virtual number that meets the conditions using preset conditions, and calculating the monthly rent based on the activation time and the unsubscribe time.
Simplifies bill generation operations, improves calculation efficiency and accuracy, and ensures the accuracy of the monthly bill of virtual numbers.
Smart Images

Figure CN120264233A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical fields of network communication and data processing, and particularly to a method, device, medium and equipment for determining a bill of a virtual number. Background Art
[0002] A virtual number is a telephone number provided by a virtual operator, and its communication function is realized through the network service of the virtual operator, which helps to protect user privacy. Multiple application platforms (virtual number tenants), such as online car-hailing platforms and food delivery platforms, usually use virtual numbers as a bridge for communication between riders or drivers and users to protect the privacy of both parties.
[0003] The opening and cancellation operations of virtual numbers are relatively convenient, resulting in relatively common opening and cancellation operations of virtual numbers. A virtual number may be opened and cancelled by multiple tenants, which increases the complexity and accuracy of generating the phone bill of the virtual number.
[0004] Therefore, how to provide a simple and accurate solution for determining the bill of a virtual number is a technical problem worthy of attention. Summary of the Invention
[0005] To solve the above technical problems, embodiments of the present disclosure provide a method, device, medium and equipment for determining a bill of a virtual number.
[0006] According to a first aspect of an embodiment of the present disclosure, there is provided a method for determining a bill of a virtual number, including:
[0007] In response to monitoring a bill generation operation, at least one first type of virtual number that meets a first preset condition is screened in a first information table, and at least one second type of virtual number that meets a second preset condition is screened in a second information table; wherein, the first information table records virtual numbers currently in use and number opening information, and the second information table records virtual numbers that have undergone cancellation operations and number cancellation information. The first preset condition is used to indicate that the opening time is in the month to generate a bill and the previous months, and the second preset condition is used to indicate that the cancellation time is in the month to generate a bill;
[0008] Based on the opening time of the at least one first type of virtual number, the monthly rent bill of each first type of virtual number in the at least one first type of virtual number in the month to generate a bill is determined;
[0009] Based on the at least one second type of virtual number, the monthly rent bill of each second type of virtual number in the at least one second type of virtual number in the month to generate a bill is determined.
[0010] According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for determining a bill of virtual numbers, including:
[0011] A first screening module, configured to, in response to monitoring a bill generation operation, screen at least one first type of virtual number that meets a first preset condition in a first information table, and screen at least one second type of virtual number that meets a second preset condition in a second information table; wherein, the first information table records virtual numbers that are currently in use and number activation information, the second information table records virtual numbers that have undergone an unsubscribe operation and number unsubscribe information, the first preset condition is used to indicate that the activation time is in the month to generate the bill and the previous months, and the second preset condition is used to indicate that the unsubscribe time is in the month to generate the bill;
[0012] A first determination module, configured to determine the monthly rent bills of each of the at least one first type of virtual number in the month to generate the bill based on the activation time of the at least one first type of virtual number;
[0013] A second determination module, configured to determine the monthly rent bills of each of the at least one second type of virtual number in the month to generate the bill based on the at least one second type of virtual number.
[0014] According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing computer program instructions, which when executed, implement the above method for determining a bill of virtual numbers.
[0015] According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0016] A memory, configured to store a computer program product;
[0017] A processor, configured to execute the computer program product stored in the memory, and when the computer program product is executed, implement the above method for determining a bill of virtual numbers.
[0018] According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product including computer program instructions, which when executed by a processor, implement the above method for determining a bill of virtual numbers.
[0019] Based on the above embodiments of the present disclosure, for the bill of the virtual number, when a bill generation operation is monitored, at least one first type of virtual number that meets the first preset condition is screened in the first information table, and at least one second type of virtual number that meets the second preset condition is screened in the second information table; wherein, the first information table records the virtual numbers in the current in-use state and the number activation information, and the second information table records the virtual numbers that have undergone an unsubscribe operation and the number unsubscribe information. Then, based on the activation time of at least one first type of virtual number, the monthly rent of each first type of virtual number in the month for which the bill is to be generated is determined; based on at least one second type of virtual number, the monthly rent of each second type of virtual number in the month for which the bill is to be generated is determined. Thus, the technical solution of the present disclosure separately calculates the monthly rent bills of the virtual numbers in the current in-use state and the virtual numbers that have undergone an unsubscribe operation through the first information table and the second information table, thereby realizing the separate calculation of the monthly rent bills of the two types of bills. The bill generation operation is simpler, the calculation efficiency is higher, and the accuracy is high.
[0020] The technical solution of the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] By describing the embodiments of the present disclosure in more detail with reference to the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure, and do not constitute a limitation to the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0022] Figure 1 It is a flowchart of an embodiment of the method for determining the bill of the virtual number of the present disclosure;
[0023] Figure 2 It is a flowchart of the generation of call timing charges in the method for determining the bill of the virtual number of the present disclosure;
[0024] Figure 3 It is a flowchart of the generation of the monthly rent bill of the first type of virtual number in the method for determining the bill of the virtual number of the present disclosure;
[0025] Figure 4 It is a flowchart of an embodiment of aggregating bills by tenant in the method for determining the bill of the virtual number of the present disclosure;
[0026] Figure 5 It is a schematic structural diagram of an embodiment of the device for determining the bill of the virtual number of the present disclosure;
[0027] Figure 6 It is a schematic structural diagram of another embodiment of the device for determining the bill of the virtual number of the present disclosure;
[0028] Figure 7 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present application. Detailed implementation manners
[0029] Hereinafter, exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. It should be understood that the present disclosure is not limited by the exemplary embodiments described herein.
[0030] It should be noted that: Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and values set forth in these embodiments do not limit the scope of the present disclosure.
[0031] Those skilled in the art can understand that terms such as "first", "second", etc. in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and do not represent any specific technical meaning, nor do they indicate an inevitable logical order between them.
[0032] It should also be understood that in the embodiments of the present disclosure, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.
[0033] It should also be understood that for any component, data or structure mentioned in the embodiments of the present disclosure, unless otherwise clearly defined or a contrary indication is given in the context, it is generally understood to be one or more.
[0034] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present disclosure generally represents an "or" relationship between the associated objects before and after.
[0035] It should also be understood that the present disclosure emphasizes the differences between the various embodiments. The same or similar parts can be referred to each other. For the sake of brevity, they will not be described in detail one by one.
[0036] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0037] The following description of at least one exemplary embodiment is actually only illustrative and in no way limits the present disclosure and its application or use.
[0038] Technologies, methods and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods and devices should be regarded as part of the specification.
[0039] It should be noted that like reference numerals and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
[0040] Embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate together with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, or servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0041] Terminal devices, computer systems, servers and other electronic devices can be described in the general context of computer system-executable instructions, such as program modules, executed by a computer system. Generally, program modules may include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment. In a distributed cloud computing environment, tasks can be executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0042] Overview of the present disclosure
[0043] In the process of implementing the present disclosure, the inventors found through research that in related technologies, when using an information table to store the usage information of virtual numbers (including number activation information and number cancellation information) and generating monthly rental bills for virtual numbers based on the information stored in the information table, errors are likely to occur. For example, when using one information table to store virtual number information, the information table will be screened twice to process the monthly rent of valid virtual numbers and cancelled virtual numbers respectively. When virtual number A is activated in the month for which the bill is to be generated and cancelled in the same month, when processing valid virtual numbers, the screening condition is [activation time is earlier than or equal to 23:59:59 on the last day of the month for which the bill is to be generated]. At this time, virtual number A will be selected and the monthly rent will be calculated once. When processing cancelled virtual numbers, the screening condition is [cancellation time is between 00:00:00 at the beginning of the month and 23:59:59 at the end of the month for which the bill is to be generated]. At this time, virtual number A will also be selected and the monthly rent will be calculated once. This is inconsistent with the billing rule that [for virtual numbers activated and cancelled in the same month, only the full monthly rent should be calculated once], resulting in an error in the generation of the bill for virtual number A.
[0044] To improve the accuracy of the monthly rental bills for virtual numbers and reduce the operation complexity, the inventors proposed the technical solution of the present disclosure.
[0045] Exemplary method
[0046] Figure 1 FIG. is a flowchart of an embodiment of the method for determining the bill of the virtual number of the present disclosure; the method for determining the bill of the virtual number can be applied to an electronic device (such as a computer system, a server); as Figure 1 shown, the method for determining the bill of the virtual number includes step 101-step 103. Each step will be described below.
[0047] In step 101, in response to monitoring a bill generation operation, at least one first type of virtual number that meets a first preset condition is screened in a first information table, and at least one second type of virtual number that meets a second preset condition is screened in a second information table.
[0048] Among them, the bill generation operation is an operation for generating a call charge bill of a virtual number.
[0049] In some embodiments, the bill generation operation can be an operation triggered regularly. For example, at 00:00 on the 1st of each month, the bill generation operation for generating the call charges of the previous month is automatically triggered; in other embodiments, the bill generation operation can also be an operation manually triggered by an operator through an operation interface. For example, on the bill generation page, the bill generation operation is triggered through an operation button or a menu command.
[0050] Among them, the first information table records the virtual numbers currently in use and the number activation information, and the second information table records the virtual numbers for which unsubscription operations have occurred and the number unsubscription information. The first preset condition is used to indicate that the activation time is in the month to generate the bill and the previous months, and the second preset condition is used to indicate that the unsubscription time is in the month to generate the bill.
[0051] In this embodiment, the first information table can be a database table, and the first type of virtual numbers that meet the first preset condition can be obtained from the first information table through an SQL query statement. The first preset condition is used to indicate that the activation time is in the month to generate the bill and the previous months. Among them, the month to generate the bill is the month for which the phone bill needs to be generated, usually the month before the time when the bill generation operation is monitored. For example, if the time when the bill generation operation is monitored is 0:00 on January 1, 2025, the month to generate the bill is December 2024, and the first preset condition is that the activation time is earlier than or equal to 23:59:59 on December 31, 2024. The first type of virtual numbers are the currently valid numbers for which the bills in the month to generate the bill need to be counted.
[0052] In this embodiment, the second information table can be a database table, and the second type of virtual numbers that meet the second preset condition can be obtained from the second information table through an SQL query statement. The second preset condition is used to indicate that the unsubscription time is in the month to generate the bill. Among them, the month to generate the bill is the month for which the phone bill needs to be generated. For example, if the time when the bill generation operation is monitored is 0:00 on January 1, 2025, the month to generate the bill is December 2024, and the second preset condition is that the unsubscription time is between 00:00:00 on December 1, 2024 and 23:59:59 on December 31, 2024. The second type of virtual numbers are the numbers for which unsubscription operations have occurred and the unsubscription operations occurred in the month to generate the bill.
[0053] Among them, if a virtual number has multiple unsubscription records corresponding to unsubscription operations in the second information table, and multiple unsubscription operations occur in the month to generate the bill, then each unsubscription record corresponding to each unsubscription operation is screened out. Among them, the number activation information recorded in the first information table at least includes the activation time and tenant identifier of the virtual number; the number unsubscription information recorded in the second information table at least includes the activation time, unsubscription time and tenant identifier of the virtual number.
[0054] In this embodiment, in response to monitoring an unsubscription operation of a virtual number, the number unsubscription information corresponding to the unsubscription operation can be added to the second information table, and the virtual number corresponding to the unsubscription operation can be deleted from the first information table; in response to monitoring an activation operation of a virtual number, the virtual number corresponding to the activation operation and the corresponding number activation information are added to the first information table.
[0055] In specific implementation, when a virtual number is activated for use, the information of the virtual number is added to the first information table. If the virtual number is unsubscribed, the virtual number is deleted from the first information table, and the unsubscription time and activation time of this unsubscription operation are added to the second information table. In some embodiments, if a virtual number is unsubscribed and then activated again, the virtual number is re-added to the first information table and the number activation time is the time of this re-activation, but the number unsubscription information (including unsubscription time and activation time) corresponding to the previous unsubscription operation is still recorded in the second information table. If there are n unsubscription operations, there are n pieces of number unsubscription information.
[0056] Further, after screening at least one first type of virtual number that meets the first preset condition in the first information table, step 102 can be executed to determine the monthly rent of the first type of virtual number in the month for which the bill is to be generated; after screening at least one second type of virtual number that meets the second preset condition in the second information table, step 103 can be executed to determine the monthly rent of the second type of virtual number in the month for which the bill is to be generated.
[0057] In step 102, based on the activation time of at least one first type of virtual number, determine the monthly rent bill of each first type of virtual number in the at least one first type of virtual number in the month for which the bill is to be generated.
[0058] Among them, for the monthly rent of the first type of virtual number, if the first type of virtual number is activated in a month before the month for which the bill is to be generated (the activation time is earlier than 00:00:00 on the 1st day of the month for which the bill is to be generated), the monthly rent of the virtual number in the month for which the bill is to be generated is the full monthly rent. For example, if the monthly rent is 30 yuan, the monthly rent bill of the virtual number in the month for which the bill is to be generated is 30 yuan. If the first type of virtual number is activated in the month for which the bill is to be generated (the activation time is later than 00:00:00 on the 1st day of the month for which the bill is to be generated and earlier than 23:59:59 on the last day of the month for which the bill is to be generated), the monthly rent bill of the virtual number in the month for which the bill is to be generated is determined according to the number of days of use in the month for which the bill is to be generated and can be calculated by (monthly rent / number of days in the current month * number of days of use).
[0059] In step 103, based on at least one second type of virtual number, determine the monthly rent bill of each second type of virtual number in the at least one second type of virtual number in the month for which the bill is to be generated.
[0060] Among them, for the monthly rent of the second type of virtual number, if the second type of virtual number has one unsubscription operation in the month for which the bill is to be generated, the monthly rent of the virtual number in the month for which the bill is to be generated is the full monthly rent. For example, if the monthly rent is 30 yuan, the monthly rent of the virtual number in the month for which the bill is to be generated is 30 yuan.
[0061] It should be noted that if a virtual number has multiple unsubscribe operations in the month for which the bill is to be generated, there will be multiple number unsubscribe messages in the second information table. Correspondingly, multiple second-type virtual numbers with the same virtual number are determined, and multiple full-month rents are also generated correspondingly when generating the monthly rent.
[0062] Exemplarily, number A was opened on September 1, 2024, and cancelled on September 2, 2024. Then it was opened again on September 3, 2024, and cancelled again on September 4, 2024. Then there will be two records in the second information table as shown in Table 1.
[0063] Table 1
[0064] Virtual number Activation time Unsubscription time Tenant A September 1, 2024 September 2, 2024 Tenant 1 A September 3, 2024 September 4, 2024 Tenant 2
[0065] When screening for the second-type virtual numbers with the month for which the bill is to be generated being September 2024 based on Table 1, two second-type virtual numbers can be generated for virtual number A. When generating the monthly rent, two months' worth of monthly rent will be generated correspondingly, and the monthly rent tenants are tenant 1 and tenant 2 respectively.
[0066] It can be understood that when a virtual number has multiple unsubscribe operations in the month for which the bill is to be generated and the unsubscribe operations are performed by the same tenant, multiple months' worth of monthly rent are also generated correspondingly.
[0067] In some alternative embodiments, the second preset condition indicates that the unsubscribe time is within the month for which the bill is to be generated. To avoid missing the monthly rent of virtual numbers whose unsubscribe operations occur in months after the month for which the bill is to be generated when generating the monthly rent for the month for which the bill is to be generated, the time for generating the month for which the bill is to be generated should be at zero o'clock on the first day of the next month of the month for which the bill is to be generated, or before generating the bill for the virtual number, triggering the unsubscribe operation of the virtual number is not allowed.
[0068] In some other alternative embodiments, the second preset condition can also indicate that the unsubscribe time is within the month for which the bill is to be generated and subsequent months. If the screening condition is "the unsubscribe time is within the month for which the bill is to be generated and subsequent months", then when generating the bill for the month for which the bill is to be generated, the monthly rent can be determined by combining the activation time and the unsubscribe time of the second-type virtual number. For example, if the unsubscribe time is in a month after the month for which the bill is to be generated and the activation time is the month for which the bill is to be generated, then the monthly rent for the month for which the bill is to be generated is determined according to (monthly rent / number of days in the current month * number of days of use); if the unsubscribe time is within the month for which the bill is to be generated, the monthly rent is the full-month rent.
[0069] Through the above steps 101 - 103, for the bill of the virtual number, when the bill generation operation is monitored, at least one first - type virtual number that meets the first preset condition is screened in the first information table, and at least one second - type virtual number that meets the second preset condition is screened in the second information table; wherein, the first information table records the virtual numbers currently in use and the number activation information, and the second information table records the virtual numbers for which an unsubscribe operation has occurred and the number unsubscribe information. Then, based on the activation time of at least one first - type virtual number, the monthly rent of each first - type virtual number in the month for which the bill is to be generated is determined; based on at least one second - type virtual number, the monthly rent of each second - type virtual number in the month for which the bill is to be generated is determined. Thus, the technical solution of the present disclosure separately counts the monthly rent bills of the virtual numbers currently in use and the virtual numbers for which an unsubscribe operation has occurred through the first information table and the second information table, thereby realizing the separate counting of the monthly rent bills of the two types of bills. The bill generation operation is simpler, the calculation efficiency is higher, and the accuracy is high.
[0070] Figure 2 It is a flowchart for generating the call timing fee in the method for determining the bill of the virtual number of the present disclosure; as Figure 2 shown, it includes the following steps 201 - 203. Each step will be described separately below
[0071] In step 201, at least one call record that meets the third preset condition is screened in the third information table.
[0072] Among them, the third information table records at least one call record and the corresponding call record description information. The third preset condition is used to indicate that the call end time is within the month for which the bill is to be generated, and the call record description information includes at least the call duration, virtual number, and tenant identifier.
[0073] In this embodiment, the third information table can be a database table. At least one call record that meets the third preset condition can be obtained from the third information table through an SQL query statement. The third preset condition is used to indicate a call whose end time is within the month for which the bill is to be generated. For example, if the month for which the bill is to be generated is December 2024, the third preset condition is that the call time is later than 00:00:00 on December 1, 2024 and earlier than or equal to 23:59:59 on December 31, 2024.
[0074] In step 202, based on the call duration of each call record among at least one call record, the call timing fee for each call record is generated.
[0075] In this embodiment, the call fee is determined for each call record one by one. First, the call duration of each call record is rounded up, and then multiplied by the unit price per minute to obtain the call timing fee for each call record.
[0076] In step 203, based on the tenant identifiers of each call record, at least one call record is clustered to obtain the total call timing fees corresponding to each tenant.
[0077] In this embodiment, through the call records of each virtual number, a call duration billing statement for each tenant using the virtual number can be generated, which helps to subsequently combine and obtain the monthly rent bills of each tenant in the month for which the bill is to be generated, and generate the total bill of each tenant in the month for which the bill is to be generated. The logic is simple, the operation is convenient, and the result accuracy is high.
[0078] Figure 3 This is a flowchart for generating the monthly rent bill of the first type of virtual number in the virtual number bill determination method of the present disclosure. The embodiments of the present disclosure take how to generate the monthly rent bill of a valid virtual number (the first type of virtual number) as an example for exemplary illustration. As Figure 3 shown, the method includes steps 301 - step 305. Each step will be described separately below.
[0079] In step 301, each first type of virtual number is traversed in the first information table, and the activation time of each first type of virtual number is obtained.
[0080] In some alternative implementation manners, after filtering out at least one first type of virtual number from the first information table according to a first preset condition, the at least one first type of virtual number can be stored in a list or a queue, and then the first type of virtual number is selected one by one from the list or the queue to determine the monthly rent.
[0081] Preferably, when storing the at least one first type of virtual number in the list or the queue, a flag indicating whether the bill has been determined can be generated for each first type of virtual number, and the initial value of this flag is that the bill has not been generated.
[0082] Among them, the first information table records the virtual numbers in the current in-use state and the number activation information, and the number activation information at least includes the activation time and the tenant. Therefore, the activation time of the first type of virtual number can be obtained from the first information table.
[0083] Further, when the activation time is in the month for which the bill is to be generated, the monthly rent is determined through step 302; when the activation time is in a month before the month for which the bill is to be generated, the monthly rent is determined through step 303.
[0084] In step 302, based on the activation time and the total number of days in the month for which the bill is to be generated, the monthly rent of the corresponding first type of virtual number in the month for which the bill is to be generated is determined.
[0085] Among them, if the first type of virtual number is activated in the month for which the bill is to be generated (the activation time is later than 00:00:00 on the 1st day of the month for which the bill is to be generated and earlier than 23:59:59 on the last day of the month for which the bill is to be generated), then the monthly rent of the virtual number in the month for which the bill is to be generated is determined according to the number of days of use in the month for which the bill is to be generated, and can be calculated by (monthly rent / number of days in the current month * number of days of use).
[0086] Exemplarily, if the month for which the bill is to be generated is November and the activation time of the first type of virtual number is November 16th, and the monthly rent for the whole month is 30 yuan, then the monthly rent for November is (30 yuan / 30 days * 15 days) = 15 yuan.
[0087] In step 303, determine that the monthly rent of the corresponding first type of virtual number in the month for which the bill is to be generated is the preset monthly rent.
[0088] Among them, if the first type of virtual number is activated in a month before the month for which the bill is to be generated (the activation time is earlier than 00:00:00 on the 1st day of the month for which the bill is to be generated), then the monthly rent of the virtual number in the month for which the bill is to be generated is the monthly rent for the whole month. For example, if the monthly rent is 30 yuan, then the monthly rent of the virtual number in the month for which the bill is to be generated is 30 yuan.
[0089] In some embodiments, when generating the monthly rent for a virtual number through step 302 and / or step 303, the mark indicating whether the monthly rent of each first type of virtual number has been determined can be set to "bill generated".
[0090] In step 304, determine whether to generate the monthly rent bills for all the first type of virtual numbers.
[0091] In some embodiments, it can be determined whether the monthly rent bills for all the first type of virtual numbers have been generated according to the value of the mark indicating whether the monthly rent of each first type of virtual number has been determined. If the marks corresponding to all the first type of virtual numbers are "bill generated", it means that the monthly rent bills for all the first type of virtual numbers have been generated.
[0092] If the monthly rent bills for all the first type of virtual numbers are generated, the process ends; if the monthly rent bills for all the first type of virtual numbers are not generated, then execute step 301, select another first type of virtual number, and generate its monthly rent bill.
[0093] Through the above steps 301 - 304, a method for determining the monthly rent of valid virtual numbers (virtual numbers currently in use) is disclosed. After screening the first type of virtual numbers that meet the conditions from the database table (the first information table) through a screening statement, the monthly rent bills of each first type of virtual number can be generated according to the preset billing method by iteratively traversing the first type of virtual numbers. The operation is simple, the calculation efficiency is high, and the accuracy is high.
[0094] Figure 4 This is a flowchart of an embodiment of aggregating bills according to tenant for the method of determining bills for virtual numbers of the present disclosure. The embodiments of the present disclosure are exemplarily described by taking how to aggregate bills of each tenant as an example. As Figure 3 shown, the method includes step 401-step 402. Each step will be described separately below.
[0095] In step 401, based on the tenant identifier, at least one first type of virtual number and at least one second type of virtual number are clustered to obtain at least one tenant instance. Each tenant instance includes the monthly rent bills of at least one first type of virtual number and the monthly rent bills of at least one second type of virtual number.
[0096] Among them, the tenant identifier is used to indicate information that can identify the tenant using the virtual number service. The tenant can be some network platforms, such as online car-hailing platforms, food delivery platforms, e-commerce platforms, etc., and the corresponding tenant identifiers are platform names, platform links, etc.; the tenant can also be an individual, and the corresponding tenant identifier is an individual account, an individual's real phone number, etc.
[0097] In this embodiment, the first information table records the number activation information. The first information table records the virtual numbers currently in use and the number activation information. The number activation information at least includes the activation time of the virtual number and the tenant identifier. When generating the monthly rent bill of each virtual number in the first type of virtual numbers, the bill may include the virtual number, the tenant identifier, and the monthly rent amount.
[0098] In this embodiment, the second information table records the number cancellation information. The second information table records the virtual numbers that have undergone cancellation operations and the number cancellation information. The number cancellation information at least includes the activation time of the virtual number, the cancellation time, and the tenant identifier. When generating the monthly rent bill of each virtual number in the second type of virtual numbers, the bill may include the virtual number, the tenant identifier, and the monthly rent amount.
[0099] Based on the tenant identifier, each first type of virtual number and second type of virtual number can be clustered to obtain at least one tenant instance. Each tenant instance includes at least one first type of virtual number and at least one second type of virtual number, as well as the monthly rent bills of each virtual number corresponding to the month for which the bill is to be generated.
[0100] In step 402, based on the monthly rent bills of at least one first type of virtual number, the monthly rent bills of at least one second type of virtual number, and the total call timing fees of each tenant included in each tenant instance, the total bill of each tenant is obtained.
[0101] In this embodiment, a tenant may have the monthly rent of the first type of virtual number and the monthly rent of the second type of virtual number at the same time. Therefore, based on the tenant identifier, the first type of virtual number and the second type of virtual number with the same tenant identifier can be clustered to determine the total monthly rent of the virtual numbers of each tenant.
[0102] In the embodiments of the present disclosure, a method for statistically calculating the total monthly rent of each tenant based on the tenant identifier is disclosed. The operation logic is simple and clear, and the total bills of various types of virtual numbers of each tenant can be obtained, with high accuracy, avoiding the problem that the logical complexity may increase exponentially due to multiple opening and cancellation of virtual numbers in the related art.
[0103] In some alternative implementation manners, the first type of virtual number and the second type of virtual number can also be directly clustered according to the tenant identifier to obtain the virtual number instances of each tenant. The virtual number instances of each tenant include the corresponding tenant
[0104] In some alternative implementation manners, in addition to aggregating the bills of each virtual number according to the tenant, the bills of each virtual number can also be aggregated based on the city according to the requirements, so as to facilitate obtaining the bill details of using the virtual number in each city and facilitate the reconciliation of the platform or enterprise.
[0105] In some alternative implementation manners, after generating the bills of each virtual number, each tenant, or the city in the month for which the bill is to be generated, the bills can be stored in a table. When receiving a bill query operation sent by the client, the tenant identifier of the tenant to be queried is obtained from the query request; based on the tenant identifier, the bill data of the tenant identifier is obtained from the preset bill storage file; and the bill data corresponding to the tenant identifier is returned to the client. For example, the query result is output through an Excel file. Among them, the preset bill storage file stores the tenant identifiers of each tenant and the bill data of the virtual numbers rented by each tenant.
[0106] In this implementation manner, a query and display interface for the bill is provided, which can realize the classification and summary of the bill according to the tenant, the city, the month, etc., increasing the clarity and usability.
[0107] Exemplary device
[0108] Figure 5 It is a schematic structural diagram of an embodiment of an apparatus for determining the bill of the virtual number of the present disclosure. As Figure 5 shown, the apparatus includes:
[0109] The first screening module 51 is configured to, in response to detecting a bill generation operation, screen at least one first - type virtual number that meets the first preset condition in the first information table, and screen at least one second - type virtual number that meets the second preset condition in the second information table; wherein, the first information table records the virtual numbers currently in use and the number activation information, the second information table records the virtual numbers for which an unsubscribe operation has occurred and the number unsubscribe information, the first preset condition is used to indicate that the activation time is in the month for which the bill is to be generated and the previous months, and the second preset condition is used to indicate that the unsubscribe time is in the month for which the bill is to be generated.
[0110] The first determination module 52 is configured to determine the monthly rent bills of each first - type virtual number in the at least one first - type virtual number in the month for which the bill is to be generated based on the activation time of the at least one first - type virtual number.
[0111] The second determination module 53 is configured to determine the monthly rent bills of each second - type virtual number in the at least one second - type virtual number based on the at least one second - type virtual number in the month for which the bill is to be generated.
[0112] Figure 6 Schematic structural diagram of another embodiment of the virtual number bill determination device of the present disclosure. As Figure 6 shown, on the basis of the embodiment shown in Figure 5 In some embodiments of the present disclosure, the device further includes:
[0113] The second screening module 54 is configured to screen at least one call record that meets the third preset condition in the third information table, the third information table records at least one call record and the corresponding call record description information, the third preset condition is used to indicate that the call end time is in the month for which the bill is to be generated, and the call record description information includes at least call duration, virtual number, and tenant identifier.
[0114] The third determination module 55 is configured to generate the call timing charges for each call record based on the call duration of each call record in the at least one call record.
[0115] The fourth determination module 56 is configured to cluster the at least one call record based on the tenant identifier of each call record to obtain the total call timing charges corresponding to each tenant.
[0116] In some embodiments of the present disclosure, the number activation information includes a tenant identifier, and the number unsubscribe information includes a tenant identifier.
[0117] Further includes:
[0118] The clustering module 57 is configured to cluster at least one first - type virtual number and at least one second - type virtual number based on the tenant identifier to obtain at least one tenant instance, where each tenant instance includes the monthly rent bills of at least one first - type virtual number and the monthly rent bills of at least one second - type virtual number;
[0119] The fifth determination module 58 is configured to obtain the total bill of each tenant based on the monthly rent bills of at least one first - type virtual number included in each tenant instance, the monthly rent bills of at least one second - type virtual number, and the total call timing cost of each tenant.
[0120] In some embodiments of the present disclosure, it further includes:
[0121] The query module 59 is configured to, in response to receiving a bill query operation sent by the client, obtain the tenant identifier of the tenant to be queried from the query request;
[0122] The obtaining module 60 is configured to obtain the bill data of the tenant identifier in a preset bill storage file based on the tenant identifier. The preset bill storage file stores the tenant identifiers of each tenant and the bill data of the virtual numbers rented by each tenant;
[0123] The sending module 61 is configured to return the bill data corresponding to the tenant identifier to the client.
[0124] In some embodiments of the present disclosure, the first determination module 52 includes:
[0125] The time - obtaining sub - module 521 is configured to traverse each first - type virtual number in at least one first - type virtual number in the first information table and obtain the activation time of each first - type virtual number;
[0126] The first determination sub - module 522 is configured to, in response to the activation time being in the month for which the bill is to be generated, determine the monthly rent of the corresponding first - type virtual number in the month for which the bill is to be generated based on the activation time and the total number of days in the month for which the bill is to be generated;
[0127] The second determination sub - module 523 is configured to, in response to the activation time being in a month before the month for which the bill is to be generated, determine that the monthly rent of the corresponding first - type virtual number in the month for which the bill is to be generated is the preset monthly rent.
[0128] In some embodiments of the present disclosure, it further includes:
[0129] The unsubscription processing module 62 is configured to, in response to monitoring an unsubscription operation of a virtual number, add the number unsubscription information corresponding to the unsubscription operation in the second information table and delete the virtual number corresponding to the unsubscription operation in the first information table;
[0130] The activation processing module 63 is configured to, in response to monitoring an activation operation of a virtual number, add the virtual number corresponding to the activation operation and the corresponding number activation information to the first information table.
[0131] The device according to the embodiments of the present disclosure can be used to implement the methods of the above-mentioned embodiments of the present disclosure. The specific implementations between the two correspond to each other, and the specific implementations of the relevant parts are mutually referred to and will not be elaborated here.
[0132] Exemplary electronic device, computer program product, and computer-readable storage medium
[0133] The embodiments of the present disclosure further provide an electronic device, including: a memory for storing a computer program; a processor for executing the computer program stored in the memory, and when the computer program is executed, implementing the method for determining the bill of the virtual number according to any one of the above-mentioned embodiments of the present disclosure.
[0134] Next, with reference to Figure 7 to describe the electronic device according to the embodiments of the present disclosure, in which a device for implementing the method according to the embodiments of the present disclosure can be integrated. Figure 7 is a structural diagram of an electronic device provided by an illustrative embodiment of the present disclosure. As Figure 7 shown, the electronic device includes one or more processors 71, a memory 72 of one or more computer-readable storage media, and a computer program stored on the memory and executable on the processor. When executing the program of the memory 72, the method for determining the bill of the virtual number described above can be implemented.
[0135] Specifically, in practical applications, the electronic device may further include components such as an input device 73 and an output device 74, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown). Those skilled in the art can understand that Figure 7 the structure of the electronic device shown in
[0136] does not constitute a limitation on the electronic device, and it may include more or fewer components than shown, or certain components, or different component arrangements. Among them:
[0137] The memory 72 can store one or more computer program products. The memory may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The above-mentioned volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The above-mentioned non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products can be stored on the computer-readable storage media, and the processor 71 can run the computer program products to implement the virtual number billing determination method of each embodiment of the present disclosure above and / or other desired functions.
[0138] The input device 73 can be used to receive input digital or character information. The input device 73 may include a keyboard, a mouse, a joystick, etc. related to user settings and function control.
[0139] The output device 74 can output various information to the outside, including the determined distance information, direction information, etc. The output device 74 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0140] The electronic device may further include a power supply for powering each component, which can be logically connected to the processor 71 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0141] Of course, for simplicity, Figure 7 only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.
[0142] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions that cause the processor to execute the steps in the virtual number billing determination method according to various embodiments of the present disclosure described in the "Exemplary Method" section of this specification when the computer program instructions are run by the processor.
[0143] A computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The programming code may be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0144] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are run by a processor, the processor is caused to execute the steps in the method for determining the bill of a virtual number according to various embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0145] The computer-readable storage medium may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0146] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. In addition, the above-described specific details are only for illustrative purposes and for ease of understanding, and are not limitations. The above details do not limit the present disclosure to necessarily implement using the above specific details.
[0147] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments may be referred to each other. For system embodiments, since they basically correspond to method embodiments, the description is relatively simple, and the relevant parts may refer to the partial description of the method embodiments.
[0148] Those of ordinary skill in the art will understand that all or part of the steps of implementing the above method embodiments can be accomplished by hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments. The aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disks, or optical discs.
[0149] The methods and apparatuses of the present disclosure may be implemented in many ways. For example, the methods and apparatuses of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the methods is for illustrative purposes only. The steps of the methods of the present disclosure are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the methods according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the methods according to the present disclosure.
[0150] The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments were chosen and described in order to best explain the principles of the present disclosure and its practical application, and to enable others of ordinary skill in the art to understand the present disclosure and design various embodiments with various modifications suitable for the particular use.
Claims
1. A method for determining a bill of a virtual number, characterized in that, Including: In response to monitoring a bill generation operation, screening at least one first - type virtual number that meets a first preset condition in a first information table, and screening at least one second - type virtual number that meets a second preset condition in a second information table; wherein, the first information table records virtual numbers currently in use and number activation information, the second information table records virtual numbers that have undergone an unsubscribe operation and number unsubscribe information, the first preset condition is used to indicate that the activation time is in the month to generate the bill and the previous months, and the second preset condition is used to indicate that the unsubscribe time is in the month to generate the bill; Based on the activation time of the at least one first - type virtual number, determining the monthly rent bill of each first - type virtual number in the at least one first - type virtual number for the month to generate the bill; Based on the at least one second - type virtual number, determining the monthly rent bill of each second - type virtual number in the at least one second - type virtual number for the month to generate the bill.
2. The method according to claim 1, wherein In response to monitoring a bill generation operation, it further includes: Screening at least one call record that meets a third preset condition in a third information table, the third information table records at least one call record and corresponding call record description information, the third preset condition is used to indicate that the call end time is in the month to generate the bill, and the call record description information at least includes call duration, virtual number, and tenant identifier; Based on the call duration of each call record in the at least one call record, generating the call timing fee for each call record; Based on the tenant identifier of each call record, clustering the at least one call record to obtain the total call timing fee corresponding to each tenant.
3. The method according to claim 2, characterized in that, The number activation information includes a tenant identifier, and the number unsubscribe information includes the tenant identifier; It further includes: Based on the tenant identifier, clustering the at least one first - type virtual number and the at least one second - type virtual number to obtain at least one tenant instance, and each tenant instance includes the monthly rent bill of at least one first - type virtual number and the monthly rent bill of at least one second - type virtual number; Based on the monthly rent bill of at least one first - type virtual number, the monthly rent bill of at least one second - type virtual number included in each tenant instance, and the total call timing fee of each tenant, obtaining the total bill of each tenant.
4. The method according to any one of claims 1-3, characterized in that, It further includes: In response to receiving a bill query operation sent by a client, obtaining the tenant identifier of the tenant to be queried from the query request; Based on the tenant identifier, obtaining the bill data of the tenant identifier in a preset bill storage file, and the preset bill storage file stores the tenant identifiers of each tenant and the bill data of the virtual numbers rented by each tenant; Returning the bill data corresponding to the tenant identifier to the client.
5. The method according to any one of claims 1-2, characterized in that, The determining the monthly rent bill of each first - type virtual number in the at least one first - type virtual number for the month to generate the bill based on the activation time of the at least one first - type virtual number includes: Traversing each first - type virtual number among the at least one first - type virtual number in the first information table, and obtaining the activation time of each first - type virtual number; In response to the activation time being in the month for which the bill is to be generated, based on the activation time and the total number of days in the month for which the bill is to be generated, determine the monthly rent bill of the corresponding first type of virtual number in the month for which the bill is to be generated; In response to the activation time being in a month before the month for which the bill is to be generated, determine that the monthly rent bill of the corresponding first type of virtual number in the month for which the bill is to be generated is the preset monthly rent.
6. The method according to any one of claims 1-5, characterized in that Further includes: In response to monitoring an unsubscribe operation of a virtual number, add the number unsubscribe information corresponding to the unsubscribe operation to the second information table, and delete the virtual number corresponding to the unsubscribe operation from the first information table; In response to monitoring an activation operation of a virtual number, add the virtual number corresponding to the activation operation and the corresponding number activation information to the first information table.
7. A billing determination device for a virtual number, characterized in that, Includes: A first screening module, configured to, in response to monitoring a bill generation operation, screen at least one first type of virtual number that meets a first preset condition in the first information table, and screen at least one second type of virtual number that meets a second preset condition in the second information table; wherein, the first information table records the virtual numbers currently in use and the number activation information, the second information table records the virtual numbers for which an unsubscribe operation has occurred and the number unsubscribe information, the first preset condition is used to indicate that the activation time is in the month for which the bill is to be generated and the previous months, and the second preset condition is used to indicate that the unsubscribe time is in the month for which the bill is to be generated; A first determination module, configured to determine the monthly rent bill of each first type of virtual number in the at least one first type of virtual number in the month for which the bill is to be generated based on the activation time of the at least one first type of virtual number; A second determination module, configured to determine the monthly rent bill of each second type of virtual number in the at least one second type of virtual number based on the at least one second type of virtual number.
8. A computer-readable storage medium, the storage medium stores computer program instructions, and when the computer program instructions are executed, the method described in any one of claims 1-6 above is implemented.
9. An electronic device, the electronic device includes: A memory, configured to store a computer program product; A processor, configured to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in any one of claims 1-6 above is implemented.
10. A computer program product, comprising computer program instructions, characterized in that, When the computer program instructions are executed by the processor, the method described in any one of claims 1-6 above is implemented.