A charging method, apparatus and electronic device
By acquiring the type of 5G messages and adopting a differentiated billing method, the problem of inaccurate billing for interactive messages and proactively sent messages in existing technologies has been solved, achieving a more efficient billing effect.
Patent Information
- Application Number
- CN202411151033.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-08-21
AI Technical Summary
Existing technologies cannot differentiate billing for interactive messages and proactively sent messages in 5G messaging, resulting in poor billing effectiveness and accuracy.
By obtaining the type of the target message, different billing methods are used for billing based on the type. Interactive messages and proactively sent messages use the first and second billing methods respectively. The differentiated design of the billing methods is based on the message type.
Independent billing for interactive messages and proactively sent messages has been implemented, improving the effectiveness and accuracy of billing.
Smart Images

Figure CN119052012B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a billing method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] Driven by 5G (5th Generation Wireless Systems), 5G messaging, as a new type of rich media communication, is gradually changing the landscape of traditional information services. It not only supports text but also integrates various formats such as images, videos, location information, and interactive cards, bringing users a richer and more intuitive communication experience. However, with the accelerated commercialization process, how to effectively manage and bill this diversified communication service has become a new challenge for the industry. Given the different formats of 5G messages, emerging billing technologies differentiate billing based on the actual sending format of the 5G message (such as text, images, videos, etc.).
[0003] In some scenarios, 5G messages generally fall into two categories: proactively sent messages and interactive messages. The distinction between these two types is based on the definition of the message trigger source. If a 5G message is sent by a chatbot after the user sends an uplink message, it is defined as an interactive message. If the message is sent directly by the chatbot, it is defined as a proactively sent message. Interactive messages originate from user interaction with the chatbot and are typically associated with customer service, inquiries, and other business scenarios. Proactively sent messages are mostly pushed by merchants or platforms, such as marketing notifications and news updates. Interactive and proactively sent messages differ significantly in business scenarios, user value perception, and cost structure. Therefore, they require independent billing. However, the current unified billing method for both proactive and interactive messages makes it impossible to differentiate and bill interactive messages independently, resulting in poor billing effectiveness and accuracy. Summary of the Invention
[0004] The purpose of this application is to provide a billing method, device, electronic device, storage medium, and program product that can identify and independently perform billing based on interactive messages, although the accuracy of the billing effect is poor.
[0005] To solve the above-mentioned technical problems, the embodiments of this application are implemented as follows:
[0006] In a first aspect, embodiments of this application provide a billing method, which includes: obtaining a target message to be billed; determining the type of the target message, wherein the type of the target message includes an interactive message and an actively sent message, wherein the interactive message is a message replied by the chatbot after the user terminal sends an uplink message to the chatbot, and the actively sent message is a message actively sent by the chatbot; if the type of the target message is the interactive message, then a first billing method is used to bill the target message; if the type of the target message is the actively sent message, then a second billing method is used to bill the target message, wherein the first billing method and the second billing method are different.
[0007] Secondly, embodiments of this application provide a billing device, comprising: an acquisition module for acquiring a target message to be billed; a determination module for determining the type of the target message, wherein the type of the target message includes an interactive message and an actively sent message, wherein the interactive message is a message replied by the chatbot after the user terminal sends an uplink message to the chatbot, and the actively sent message is a message actively sent by the chatbot; a billing module for billing the target message using a first billing method if the type of the target message is the interactive message; and the billing module for billing the target message using a second billing method if the type of the target message is the actively sent message, wherein the first billing method and the second billing method are different.
[0008] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus; wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to implement the billing method steps mentioned in the first aspect.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the billing method steps mentioned in the first aspect.
[0010] Fifthly, embodiments of this application provide a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the billing method steps mentioned in the first aspect.
[0011] The technical solution disclosed in this application involves obtaining the target message to be billed, and then determining the type of the target message. The target message types include interactive messages and proactively sent messages. Interactive messages are messages replied to by the chatbot after the user terminal sends an uplink message to it. Proactively sent messages are messages proactively sent by the chatbot. If the target message type is an interactive message, a first billing method is used for billing; if the target message type is a proactively sent message, a second billing method is used. The first and second billing methods are different. In this way, interactive messages and proactively sent messages can be billed independently and differentiated, improving the billing effect and accuracy. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating the billing method provided in this application embodiment;
[0014] Figure 2 A schematic diagram of the interaction process provided in the embodiments of this application;
[0015] Figure 3 A schematic diagram of the module composition of a billing device provided in an embodiment of this application;
[0016] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] The purpose of this application is to provide a billing method, device, electronic device, storage medium, and program product that can identify and independently perform billing based on interactive messages, although the accuracy of the billing effect is poor.
[0018] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0019] For example, such as Figure 1As shown in the figure, this application provides a billing method. The executing entity of this method can be a 5G messaging platform. The billing method may specifically include the following steps:
[0020] In step S101, the target message to be billed is obtained.
[0021] Specifically, the target message could be a 5G message sent from the chatbot, such as... Figure 2 The diagram illustrates an interaction flow: First, the terminal actively sends an uplink message to the 5G messaging platform. The 5G messaging platform forwards the message to a chatbot. The chatbot replies to the terminal's uplink message and then sends the reply 5G message back to the 5G messaging platform. The 5G messaging platform then sends the chatbot's reply 5G message back to the terminal. The 5G messaging platform receives either the terminal's uplink reply message corresponding to the 5G message sent by the chatbot in the previous step (e.g., if the user clicks a button in the 5G message sent by the chatbot to reply, or clicks a button to jump to a dial-up call, or clicks a button to jump to other web pages or APP links, a reply message will be sent to the 5G messaging platform) or the 5G messaging platform waits for the terminal's subsequent reply for a timeout (generally set to wait 10 minutes; if the timeout occurs, it will be recorded as an unanswered interaction message). The 5G messaging platform records relevant information of this interaction process and generates a call detail record (CDR) file, which is then handed over to the subsequent billing network element for billing. In the above process, if the user sends an uplink message and the chatbot sends a 5G message in response, the message type is an interactive message. If the chatbot sends the 5G message directly, the message type is an actively sent message.
[0022] In step S103, the type of the target message is determined.
[0023] Specifically, the target message types include interactive messages and proactively sent messages. Interactive messages are messages sent by the user terminal to the chatbot and then replied by the chatbot, while proactively sent messages are messages sent proactively by the chatbot.
[0024] When determining the type of the target message, one can do so based on the response identifier carried in the target message, or based on the chatbot's experience rating.
[0025] Determining the type of a target message based on the chatbot's experience rating can be achieved as follows: The 5G messaging platform records the user's experience rating for the chatbot after each interaction, and takes the average experience rating over a recent period as the chatbot's overall experience rating. When sending a target message, if the 5G messaging platform determines that the chatbot has a high experience rating, it directly classifies the sent target message as an interactive message.
[0026] Determining the type of a target message based on the response identifier it carries can be done as follows: determine the type of the target message based on whether it carries a response identifier; if the target message carries a response identifier, determine the type of the target message as an interactive message; if the target message does not carry a response identifier, determine the type of the target message as an actively sent message.
[0027] Specifically, when a chatbot sends a target message through the 5G messaging platform, if it sends the message with inReplyToMessageID (reply identifier), it means that the chatbot declares that the type of the target message is an interactive message. If it does not send the message with inReplyToMessageID, it can be directly determined that the type of the target message is an actively sent message, and it will be billed as an actively sent message. The inReplyToMessageID field value will be recorded as empty in the billing call detail record file.
[0028] In step S105, if the target message is an interactive message, the first billing method is used to bill the target message; if the target message is an actively sent message, the second billing method is used to bill the target message.
[0029] The first billing method differs from the second billing method.
[0030] Specifically, billing can be differentiated for interactive messages and proactively sent messages. Interactive messages can be billed using the first billing method, while proactively sent messages can be billed using the second billing method. Both billing methods can differentiate billing based on the message format; for example, images and videos are more expensive than text messages. However, under the first billing method, the cost is lower than under the second billing method. For instance, if the target message is a video, the cost under the first billing method will be lower than the cost under the second billing method.
[0031] Furthermore, when the target message type is an interactive message, user complaints, the quality of the user sending the 5G message, and whether the user replies after receiving the target message from the chatbot will all affect the interactive message. Therefore, the billing coefficient of the target message can be calculated through the above factors, and the target message can be billed in combination with the basic cost of the target message in the first billing method.
[0032] In one possible implementation, if the target message is an interactive message, then billing the target message using the first billing method includes: determining the message format of the target message and the corresponding cost; determining the billing coefficient of the target message; and billing the target message according to the cost and the billing coefficient.
[0033] Specifically, the billing coefficient for interactive messages can be determined by the chatbot's complaint risk coefficient, user quality coefficient, and message conversion coefficient. The complaint risk coefficient indicates the chatbot's complaint rate, which is directly proportional to the complaint rate. The user quality coefficient indicates the type of interactive behavior corresponding to the interactive message, which is directly proportional to the type of interactive behavior. The message conversion coefficient indicates whether the user has taken any interactive action in response to the interactive message. The message conversion coefficient for which the user has taken interactive action in response to the interactive message is greater than the message conversion coefficient for which the user has not taken interactive action in response to the interactive message.
[0034] More specifically, the billing factor can be determined by the following formula:
[0035] P = (P C +P U )*P M
[0036] Where P is the billing factor, P U This refers to the user quality coefficient, P. C This refers to the complaint risk coefficient, P. M This refers to the message conversion coefficient.
[0037] Regarding the aforementioned complaint risk coefficient P C It can be based on the total number of messages n sent by the chatbot in a recent period. c and the total number of complaint messages received within the corresponding time period, m c The following formula is used to calculate:
[0038]
[0039] Where min() is the minimum value function, it returns the smallest value among the function parameters. From the formula above, it can be intuitively seen that when the approximate message complaint rate is (1+n) c ) / (1+m c When P is less than or equal to one ten-thousandth,C The value will equal the minimum value of 1 when the message complaint rate is greater than one in ten thousand. C The value will be greater than 1. The higher the message complaint rate, the higher the complaint risk coefficient. (Approximate message complaint rate (1+n)) c ) / (1+m c When P is greater than or equal to 0.1, C The value will be equal to the maximum value of 4. The possible range of values for the chatbot complaint risk coefficient is [1, 4].
[0040] For the user quality coefficient P U It can count the number of active days of users in the previous month. D Total number of days last month U M Interactions occurred last month (interactions refer to the above-mentioned...) Figure 2 The number of interactions M between the terminal and the chatbot shown. U The number of user interaction types T last month U (If there are 5 types of interactive behaviors: automatic reply, dialing a number, redirecting to the app, opening a link, and displaying geolocation) The following formula is used to calculate:
[0041]
[0042] Where min() is the minimum value function, it returns the largest value among the function parameters. Intuitively, the more active days and interaction times a user had in the previous month (M... U Equal to M max At that time, the user quality coefficient reached its maximum value of 0.5, M U More than M max If the user is suspected of malicious behavior, this coefficient will decrease. The more types of interaction behaviors, the higher the user quality coefficient. The possible range of the user quality coefficient is [0,2].
[0043] For the message conversion coefficient P M The message conversion coefficient indicates the type of subsequent user reply message. After the 5G messaging platform sends the target message of the chatbot to the terminal, it waits for the terminal user's reply message. The process of the terminal user replying to the target message is as follows: if the user clicks the button in the target message on the terminal to reply, a visible message will be sent to the 5G messaging platform. If the user clicks the button on the terminal to jump to a dialing call, or clicks the button to jump to other web pages and APP links, an invisible message will be sent to the 5G messaging platform. The 5G messaging platform waits for a maximum of 10 minutes.
[0044] The terminal's reply messages are paired using a similar matching rule as the target message judgment: the value of the MessageID (message identifier, unique for each downlink target message, using a globally unique identifier (UUID)) field carried in the sent target message is matched with the value of the inReplyToMessageID (reply identifier) field in the terminal's subsequent reply message record. If they match, a reply message is matched, and the 5G messaging platform records the message type of the matched reply message in the billing call detail record and provides it to the billing network element. The billing network element judges the message type of the user's subsequent reply message. If the user subsequently clicks a button to jump to a webpage or APP, it indicates that the message conversion effect is good, and the billing network element will charge according to the first message conversion coefficient. If the user does not reply within a certain period of time (e.g., 10 minutes), it indicates that the message conversion effect is poor, and the billing network element will charge according to the second message conversion coefficient. The first message conversion coefficient is higher than the second message conversion coefficient. The specific correspondence between the user's reply message type and the message conversion coefficient can be configured according to the actual situation. M The possible value range is [0.1, 2], which is not listed in detail here.
[0045] The technical solution provided in this application obtains the target message to be billed, and then determines the type of the target message. The target message types include interactive messages and proactively sent messages. Interactive messages are messages replied to by the chatbot after the user terminal sends an uplink message to it. Proactively sent messages are messages proactively sent by the chatbot. If the target message type is an interactive message, the first billing method is used for billing; if the target message type is a proactively sent message, the second billing method is used. The first and second billing methods are different. In this way, interactive messages and proactively sent messages can be billed independently and differentiated, improving the billing effectiveness and accuracy.
[0046] After the target message from the chatbot is sent via the 5G messaging platform, the system waits for the user's reply to record the message conversion effect. The corpus of language generated during this interaction will also be used to update the semantic model later. After the session ends, an interaction experience rating is pushed to the user to fill in, recording the experience score for this interaction and updating the corresponding chatbot's experience score. This real-time updating of the chatbot's experience score ensures the accuracy of determining the target message type.
[0047] After determining that the target message type is an interactive message, the legality of the interactive message can be verified. If the interactive message is legal, the target message type is ultimately determined to be an interactive message. If the interactive message is illegal, the target message type is redefined as an actively sent message.
[0048] In one possible implementation, the legality of an interaction message can be determined as follows: search for a target uplink message that matches the target message in the uplink message record; if a target uplink message that matches the target message exists in the uplink message record, the target message is determined to be a legal interaction message; if no target uplink message that matches the target message exists in the uplink message record, the type of the target message is redefined as an actively sent message.
[0049] The uplink message record refers to the historical record of messages actively sent by the user through the terminal. This record contains all uplink messages, each with corresponding message information such as a message identifier (e.g., using a UUID), the called and calling numbers, and the sending time. The corresponding target message also carries message information such as a reply identifier, the called and calling numbers, and the sending time. By matching the message information carried in the daily uplink messages with the target message information, the target uplink message matching the target message is identified. In this way, by verifying the legitimacy of the interaction messages, the accuracy of message identification can be further improved, thereby further improving billing accuracy.
[0050] In one possible implementation, finding the target uplink message that matches the target message from the uplink message record includes: finding the message identifier of the uplink message from the uplink message record; and identifying the uplink message whose message identifier matches the reply identifier as the target uplink message.
[0051] Specifically, the 5G messaging platform records all fields of each message sent or forwarded by the platform to the chatbot in a temporary message storage device, forming an uplink message record. When the chatbot finishes sending a message and prepares to generate a billing call detail record (CDR), it searches for the value of the MessageID (message identifier, unique for each uplink message, using UUID) field in the terminal's uplink message record based on the value of the inReplyToMessageID field carried in the target message. If an uplink message's MessageID matches the inReplyToMessageID of the target message, the process proceeds to the next step. If the chatbot did not carry the inReplyToMessageID field when sending the message, or if the 5G messaging platform cannot match the corresponding uplink message, it is determined that the message was actively sent, and the inReplyToMessageID field in the CDR file is recorded as empty. This check restricts the chatbot to only respond with downlink interaction messages after receiving an uplink message.
[0052] In one possible implementation, finding a target uplink message that matches the target message from the uplink message record includes: finding the first number information carried by the uplink message from the uplink message record; determining the second number information carried by the target message; and identifying the uplink message whose first number information matches the second number information as the target uplink message.
[0053] Specifically, both the first number information and the second number information include the calling number and the called number. The target uplink message that matches the target message can be determined based on the consistency between the calling number and the called number in the first number information and the calling number and the called number in the second number information.
[0054] More specifically, the 5G messaging platform records the values of the address field (caller's number, here the Chatbot's ID) and the destinationAddress field (called number, here the user's mobile phone number) carried when the chatbot sends a message. It compares these values with the values of the destinationAddress field (called number, here the Chatbot's ID) and the address field (caller's number, here the user's mobile phone number) in the retrieved uplink message record. If both match, the interaction message is deemed legitimate; otherwise, the type of the target message is redefined as an actively sent message, and the inReplyToMessageID field in the call detail record is recorded as empty. This verification restricts the chatbot to only replying to the user who actually sent the uplink message, and only the chatbot that sent the uplink message can reply; replies from other chatbots are invalid.
[0055] In one possible implementation, finding the target uplink message that matches the target message from the uplink message record includes: finding the uplink transmission time carried by the uplink message from the uplink message record; determining the downlink transmission time carried by the target message; and identifying uplink messages whose time difference between the uplink transmission time and the downlink transmission time is less than a threshold as target uplink messages.
[0056] Specifically, the 5G messaging platform records the time when the chatbot sends a message. It then searches for the `sendTime` field (uplink transmission time of the uplink message) in the uplink message records stored in the temporary message storage device. If the downlink transmission time of the sent message is within a certain validity period (threshold) after the uplink message's transmission time (the validity period is configurable, typically 30 minutes), it is considered a legitimate interaction message. Each legitimate interaction message in this step increases the chatbot's credibility by 0.01, and the 5G messaging platform records the `inReplyToMessageID` value of this sent message in the call detail record (CDR) file. If the downlink transmission time of the sent message exceeds the validity period of the uplink transmission time, it is considered an actively sent message, and the `inReplyToMessageID` field in the CDR file is recorded as empty. This check restricts the chatbot to replying to interaction messages only within a certain validity period; exceeding this period is considered a re-active resending of the message by the chatbot.
[0057] In one possible implementation, finding a target uplink message that matches the target message from the uplink message record includes: finding the first content of the uplink message from the uplink message record; determining the second content of the target message; calculating the correlation between the first content and the second content; and identifying uplink messages with a correlation greater than a preset value as the target uplink message.
[0058] Specifically, the 5G messaging platform trains a text vectorization model m based on open-source large corpus data and existing natural language processing methods. This model can convert the input text string A into a semantic vector m(A). Semantically similar strings will have similar semantic vectors after vector conversion.
[0059] The 5G messaging platform first calculates the semantic vector m(U) of the text U (first content) of the user's uplink message (if the user clicked a button, the text here is the text corresponding to the button name). Then, it determines the content format of the second content of the target message sent by the chatbot, and calculates the correlation between the first and second content according to different content formats. The following different judgment methods are adopted for different content formats of the second content of the target message:
[0060] Text message format: Extract the text message content C (second content) of the target message sent by the chatbot and directly calculate the semantic vector m(C) through the text vectorization model m.
[0061] Image or video message: Using a pre-trained artificial intelligence (AI) image / video description model, based on the image or video message in the target message sent by the chatbot, generate the text description content C of the image or video message, and then calculate the semantic vector m(C) through the text vectorization model m.
[0062] Audio messages: Using a pre-trained open-source speech conversion model, the audio messages sent by the chatbot are converted into text description messages C, and then the semantic vector m(C) is calculated through the text vectorization model m.
[0063] Multi-card message processing: For each card, the multimedia content, card content, and card theme are extracted from the card message. The multimedia message content within the card is used to generate a text description message for each card message using a pre-trained image / video / audio description model; the text content within the card is directly concatenated to the generated text description message. Then, the text description messages corresponding to all cards are concatenated to form the text description content C of the card message, and the semantic vector m(C) is calculated using a text vectorization model m.
[0064] Other message types: Rare file types such as Word and PDF, or other message types, can be transferred to manual judgment and processing.
[0065] After obtaining the semantic vector m(A) of the user's uplink message and the semantic vector m(C) of the target message sent by the chatbot, the correlation between the two vectors m(A) and m(C) is calculated using the cosine dot product method. Only messages with high correlation are judged as interactive messages, and the value of inReplyToMessageID is recorded in the call detail record file. Correlation with a correlation greater than a preset value can be defined as high correlation. The preset value can be determined according to the actual situation, and is not limited in this embodiment.
[0066] It is worth noting that the above-mentioned methods for verifying the legitimacy of interactive messages can be used individually or in combination. When used in combination, all of the above verification methods must be satisfied before an interactive message is determined to be legitimate, thereby further improving the accuracy of the target message type determination.
[0067] Corresponding to the billing method provided in the above embodiments, based on the same technical concept, this application also provides a billing device. Figure 3 This application provides a schematic diagram of the module composition of a billing device, which is used to perform... Figure 1 The billing method described, such as Figure 3 As shown, the billing device 300 includes: an acquisition module 301, used to acquire the target message to be billed; a determination module 302, used to determine the type of the target message, the type of the target message including interactive messages and actively sent messages, interactive messages being messages sent by the user terminal to the chatbot and replied by the chatbot, and actively sent messages being messages actively sent by the chatbot; a billing module 303, used to bill the target message using a first billing method if the type of the target message is an interactive message; the billing module 303 is also used to bill the target message using a second billing method if the type of the target message is an actively sent message, the first billing method being different from the second billing method.
[0068] As can be seen from the technical solutions provided in the embodiments of this application above, the target message to be billed is obtained, and then the type of the target message is determined. The types of target messages include interactive messages and proactively sent messages. Interactive messages are messages replied to by the chatbot after the user terminal sends an uplink message to it, while proactively sent messages are messages proactively sent by the chatbot. If the type of the target message is an interactive message, the first billing method is used to bill the target message; if the type of the target message is a proactively sent message, the second billing method is used to bill the target message, and the first billing method and the second billing method are different. In this way, interactive messages and proactively sent messages can be billed independently and differentiated, improving the billing effect and accuracy.
[0069] In one possible implementation, the determining module 302 is further configured to determine the type of the target message based on whether the target message carries a reply identifier; if the target message carries a reply identifier, the type of the target message is determined to be an interactive message; if the target message does not carry a reply identifier, the type of the target message is determined to be an actively sent message.
[0070] In one possible implementation, the system further includes a lookup module, which searches for a target uplink message that matches the target message in the uplink message record. If a target uplink message that matches the target message exists in the uplink message record, the target message is determined to be a valid interactive message. If no target uplink message that matches the target message exists in the uplink message record, the type of the target message is redefined as an actively sent message.
[0071] In one possible implementation, the lookup module is also used to look up the message identifier of the uplink message from the uplink message record; and to identify the uplink message whose message identifier matches the reply identifier as the target uplink message.
[0072] In one possible implementation, the lookup module is further configured to look up the first number information carried by the uplink message from the uplink message record; determine the second number information carried by the target message; and identify the uplink message whose first number information and second number information are consistent as the target uplink message.
[0073] In one possible implementation, the lookup module is further configured to look up the uplink transmission time carried by the uplink message from the uplink message record; determine the downlink transmission time carried by the target message; and identify uplink messages whose time difference between the uplink transmission time and the downlink transmission time is less than a threshold as target uplink messages.
[0074] In one possible implementation, the lookup module is further configured to: look up the first content of the uplink message from the uplink message record; determine the second content of the target message; calculate the correlation between the first content and the second content; and identify uplink messages with a correlation greater than a preset value as the target uplink message.
[0075] In one possible implementation, the billing module 303 is further configured to determine the message format of the target message and the corresponding cost; determine the billing coefficient of the target message; and bill the target message according to the cost and the billing coefficient.
[0076] The billing device provided in this application embodiment can implement the various processes in the embodiments corresponding to the above billing method, and has the same or similar beneficial effects. To avoid repetition, it will not be described again here.
[0077] It should be noted that the billing device and the billing method provided in this application embodiment are based on the same application concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned billing method and has the same or similar beneficial effects. Repeated parts will not be described again.
[0078] Corresponding to the billing method provided in the above embodiments, based on the same technical concept, this application also provides an electronic device for executing the above-described billing method. Figure 4 To illustrate the structure of an electronic device according to various embodiments of this application, as shown in the following diagrams... Figure 4 As shown. Electronic devices can vary considerably due to differences in configuration or performance, and may include one or more processors 401 and memory 402. Memory 402 may store one or more application programs or data. Memory 402 may be temporary or persistent storage. The application programs stored in memory 402 may include one or more modules (not shown), and each module may include a series of computer-executable instructions for the electronic device.
[0079] Furthermore, the processor 401 may be configured to communicate with the memory 402 and execute a series of computer-executable instructions stored in the memory 402 on the electronic device. The electronic device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input / output interfaces 405, and one or more keyboards 406.
[0080] Specifically, in this embodiment, the electronic device includes a processor, a communication interface, a memory, and a communication bus; wherein, the processor, the communication interface, and the memory communicate with each other via the bus; the memory is used to store computer programs; and the processor is used to execute the programs stored in the memory to achieve the above. Figure 1 The steps in the method embodiments are the same as those in the above method embodiments, and have the same beneficial effects. To avoid repetition, the embodiments of this application will not be described again here.
[0081] This embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the above-mentioned functions. Figure 1 The steps in the method embodiments are the same as those in the above method embodiments, and have the same beneficial effects. To avoid repetition, the embodiments of this application will not be described again here.
[0082] This application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform the above-described actions. Figure 1 The steps in the method embodiments are the same as those in the above method embodiments, and have the same beneficial effects. To avoid repetition, the embodiments of this application will not be described again here.
[0083] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0087] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0088] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0089] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0090] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0092] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A billing method, characterized in that, The billing method includes: Retrieve the target message to be billed; The type of the target message is determined. The type of the target message includes interactive messages and proactively sent messages. The interactive message is a message replied by the chatbot after the user terminal sends an uplink message to the chatbot. The proactively sent message is a message proactively sent by the chatbot. If the type of the target message is the interaction message, then the target message is billed using the first billing method; If the type of the target message is the actively sent message, then the target message is billed using the second billing method, which is different from the first billing method. Determining the type of the target message includes: The type of the target message is determined based on whether the target message carries a reply identifier; If the target message carries the reply identifier, the type of the target message is determined to be the interactive message; Search the uplink message records for a target uplink message that matches the target message. If a target uplink message matching the target message exists in the uplink message record, the target message is determined to be a legitimate interaction message. If no target uplink message matching the target message exists in the uplink message record, the type of the target message is redefined as an actively sent message. If the target message does not carry the reply identifier, the type of the target message is determined to be the proactively sent message.
2. The billing method according to claim 1, characterized in that, The step of searching for a target uplink message that matches the target message from the uplink message record includes: Find the message identifier of the uplink message from the uplink message record; An uplink message whose message identifier matches the response identifier is identified as the target uplink message.
3. The billing method according to claim 1, characterized in that, The step of searching for a target uplink message that matches the target message from the uplink message record includes: Retrieve the first number information carried in the uplink message from the uplink message record; Determine the second number information carried by the target message; An uplink message whose first number information matches the second number information is identified as the target uplink message.
4. The billing method according to claim 1, characterized in that, The step of searching for a target uplink message that matches the target message from the uplink message record includes: Find the uplink transmission time carried in the uplink message from the uplink message record; Determine the downlink transmission time carried by the target message; Uplink messages whose time difference between the uplink transmission time and the downlink transmission time is less than a threshold are identified as the target uplink messages.
5. The billing method according to claim 1, characterized in that, The step of searching for a target uplink message that matches the target message from the uplink message record includes: Retrieve the first content of the uplink message from the uplink message record; Determine the second content of the target message; Calculate the correlation between the first content and the second content; Uplink messages with a correlation greater than a preset value are identified as the target uplink messages.
6. The billing method according to any one of claims 1-5, characterized in that, If the type of the target message is the interaction message, then the first billing method is used to bill the target message, which includes: Determine the message format of the target message and the corresponding cost for that message format; Determine the billing factor for the target message; The target message is billed based on the stated cost and the stated billing factor.
7. A billing device, characterized in that, include: The acquisition module is used to acquire the target message to be billed; The determination module is used to determine the type of the target message. The type of the target message includes interactive messages and proactively sent messages. The interactive message is a message replied by the chatbot after the user terminal sends an uplink message to the chatbot. The proactively sent message is a message proactively sent by the chatbot. The billing module is used to bill the target message using a first billing method if the type of the target message is the interaction message. The billing module is also used to bill the target message using a second billing method if the type of the target message is the actively sent message, wherein the first billing method is different from the second billing method; The determining module is further configured to determine the type of the target message based on whether the target message carries a reply identifier; If the target message carries the reply identifier, the type of the target message is determined to be the interactive message; The search module is used to search for a target uplink message that matches the target message from the uplink message records; If a target uplink message matching the target message exists in the uplink message record, the target message is determined to be a legitimate interaction message. If no target uplink message matching the target message exists in the uplink message record, the type of the target message is redefined as an actively sent message. The determining module is further configured to determine that the type of the target message is the actively sent message if the target message does not carry the reply identifier.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus; wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the billing method steps as described in any one of claims 1-6.
9. A computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the billing method steps as described in any one of claims 1-6.
Citation Information
Patent Citations
5G message fallback method and system, computing device and storage medium
CN114449458A
Chat robot message processing method and device and storage medium
CN115776472A