Message processing method, apparatus and device

CN117395134BActive Publication Date: 2026-09-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210793212.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-05
Publication Date
2026-09-22
Estimated Expiration
2042-07-05

AI Technical Summary

Technical Problem

[0003]在相关技术中,不同的语音消息服务集群对接不同的外呼服务,具有独立的数据库,如若其中一个服务集群发生故障,无法自动切换至其他集群进行外呼任务,导致任务失败

Benefits of technology

[0016]本申请实施例提供了一种消息处理方法、装置和设备,通过发送语音消息任务至第一集群,语音消息任务携带第一消息标识,第一消息标识包括第一集群的第一集群标识,以使第一集群根据语音消息任务提供语音外呼服务,然后通过监测第一集群根据语音消息任务提供语音外呼服务时存在异常的情况,判断第一集群是否发生故障,若判定第一集群发生故障,则根据语音消息任务的类型、第一消息标识重新发送语音消息任务至目标集群,以使目标集群根据语音消息任务提供语音外呼服务,目标集群为除第一集群之外的任意服务集群。本申请实施例通过在第一集群故障时,自动将语音消息任务发送至目标集群,使目标集群提供语音外呼服务,实现故障时自动切换集群,提高了语音消息服务的稳定性和可用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117395134B_ABST
    Figure CN117395134B_ABST
Patent Text Reader

Abstract

The application discloses a message processing method, device and equipment, which can be applied to various scenes such as cloud technology, cloud calling and voice message service. The method comprises the following steps: sending a voice message task to a first cluster, wherein the voice message task carries a first message identifier, the first message identifier comprises a first cluster identifier of the first cluster, so that the first cluster provides a voice outbound service according to the voice message task; judging whether the first cluster has a fault by monitoring whether an abnormal condition exists when the first cluster provides the voice outbound service according to the voice message task; if it is judged that the first cluster has a fault, then resending the voice message task to a target cluster according to the type of the voice message task and the first message identifier, so that the target cluster provides the voice outbound service according to the voice message task, and the target cluster is any service cluster except the first cluster, thereby improving the stability and availability of the voice message service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a message processing method, apparatus, and device. Background Technology

[0002] As the most time-sensitive service type within enterprises, voice messaging services have higher requirements for stability and high availability.

[0003] In related technologies, different voice messaging service clusters connect to different outbound call services and have independent databases. If one service cluster fails, it cannot automatically switch to another cluster for outbound call tasks, resulting in task failure. Even with manual switching, voice tasks created in the original cluster cannot be retrieved. This leads to low stability and availability of voice messaging services in related technologies. Summary of the Invention

[0004] This application provides a message processing method, apparatus, and device, which improves the stability and availability of voice message services.

[0005] On the one hand, a message processing method is provided, the method comprising:

[0006] A voice message task is sent to the first cluster, the voice message task carrying a first message identifier, the first message identifier including the first cluster identifier of the first cluster, so that the first cluster provides voice outbound call service according to the voice message task;

[0007] By monitoring for any abnormalities when the first cluster provides voice outbound call services according to the voice message task, it can be determined whether the first cluster has malfunctioned.

[0008] If the first cluster is determined to be faulty, the voice message task is resent to the target cluster according to the type of the voice message task and the first message identifier, so that the target cluster can provide voice outbound call service according to the voice message task. The target cluster is any service cluster other than the first cluster.

[0009] On the other hand, a message processing apparatus is provided, the apparatus comprising:

[0010] A first sending module is used to send a voice message task to a first cluster. The voice message task carries a first message identifier, which includes a first cluster identifier of the first cluster, so that the first cluster provides voice outbound call service according to the voice message task.

[0011] The judgment module is used to determine whether the first cluster has malfunctioned by monitoring for abnormal situations when the first cluster provides voice outbound call services according to the voice message task.

[0012] The second sending module is used to, if it is determined that the first cluster has failed, resend the voice message task to the target cluster according to the type of the voice message task and the first message identifier, so that the target cluster provides voice outbound call service according to the voice message task, wherein the target cluster is any service cluster other than the first cluster.

[0013] On the other hand, a computer-readable storage medium is provided that stores a computer program adapted for loading by a processor to perform the steps in the message processing method as described in any of the above embodiments.

[0014] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the processor executing steps in the message processing method as described in any of the above embodiments by calling the computer program stored in the memory.

[0015] On the other hand, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps in the message processing method as described in any of the above embodiments.

[0016] This application provides a message processing method, apparatus, and device. By sending a voice message task to a first cluster, the voice message task carrying a first message identifier, which includes a first cluster identifier of the first cluster, the first cluster provides voice outbound calling services according to the voice message task. Then, by monitoring for anomalies in the first cluster's provision of voice outbound calling services according to the voice message task, it is determined whether the first cluster has failed. If a failure is determined, the voice message task is resent to a target cluster according to the type of the voice message task and the first message identifier, so that the target cluster provides voice outbound calling services according to the voice message task. The target cluster can be any service cluster other than the first cluster. This application automatically sends the voice message task to the target cluster when the first cluster fails, enabling the target cluster to provide voice outbound calling services, thus achieving automatic cluster switching in case of failure and improving the stability and availability of the voice message service. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram illustrating the application scenarios of the related technologies provided in the embodiments of this application.

[0019] Figure 2 This is a first flowchart illustrating the message processing method provided in an embodiment of this application.

[0020] Figure 3 This is a schematic diagram of a first application scenario of the message processing method provided in the embodiments of this application.

[0021] Figure 4 This is a schematic diagram of a second application scenario for the message processing method provided in the embodiments of this application.

[0022] Figure 5 This is a schematic diagram of a third application scenario for the message processing method provided in the embodiments of this application.

[0023] Figure 6 This is a second flowchart illustrating the message processing method provided in an embodiment of this application.

[0024] Figure 7 This is a schematic diagram of the structure of the message processing device provided in the embodiments of this application.

[0025] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0026] The technical solutions of 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 are within the scope of protection of this application.

[0027] This application provides a message processing method, apparatus, computer device, and storage medium. Specifically, the message processing method of this application can be executed by a computer device, which can be a terminal or server, etc. This application can be applied to various scenarios such as cloud technology, cloud calling, and voice messaging services.

[0028] First, some of the nouns or terms that appear in the description of the embodiments of this application are explained as follows:

[0029] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.

[0030] A database, simply put, can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, with minimal redundancy, and independent of application programs.

[0031] A cloud call center is a call center system built on cloud computing technology. Businesses don't need to purchase any software or hardware systems; they only need basic conditions such as personnel and space to quickly have their own call center. The software and hardware platform, communication resources, and daily maintenance and services are provided by the server provider. It features many advantages, including short construction cycles, low investment, low risk, flexible deployment, strong system capacity scalability, and low operation and maintenance costs. Whether it's a telemarketing center or a customer service center, businesses can simply rent services on demand to establish a comprehensive, stable, reliable call center system with agents distributed throughout the country and nationwide call access.

[0032] Voice Message Service (VMS) is a dedicated voice line provided by the service provider to offer services such as voice alarms, voice notifications, and voice verification codes. VMS boasts advantages such as high delivery rate, ultra-low latency, and second-level delivery, and is committed to providing high-quality voice messaging services.

[0033] A cluster is a group of computers that work together to provide a set of network resources to users. These individual computer systems are called nodes in the cluster.

[0034] Service entity: Service entity usually refers to service software and service hardware.

[0035] In related technologies, voice messaging services typically interface with downstream voice platforms, such as apps. Generally, the push path for voice messages is from the business side to the messaging service, which then pushes them to the downstream voice platform. Currently, the voice messaging service has a cluster in each city; please refer to [link / reference]. Figure 1 Taking two clusters as an example, different regions correspond to two independent voice platform systems, and the data on both sides is isolated. If one cluster fails, it cannot automatically switch over. If no manual switch is performed, voice message task creation will fail, affecting services from sending alarm messages. Furthermore, due to the data isolation between the voice platforms, even after a manual cross-cluster switch, voice tasks created in the original failed cluster cannot be found in the new cluster, resulting in the service side being unable to obtain accurate message status. It is evident that the stability and availability of voice message services are low in related technologies. Therefore, this application proposes a message processing method that automatically switches to another healthy cluster to continue providing voice message services when the cluster providing the voice message service fails. Moreover, by carrying a message identifier including a cluster identifier for the voice message task, cross-cluster queries can be achieved, greatly improving the stability and availability of the voice message service.

[0036] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0037] This application provides a message processing method in various embodiments, which can be executed by a terminal or a server, or by both a terminal and a server. This application uses the example of a message processing method executed by a server to illustrate the method.

[0038] Please see Figures 2 to 6 , Figure 2 , Figure 6 These are all schematic flowcharts of the message processing method provided in the embodiments of this application. Figures 3 to 5 These are all schematic diagrams illustrating application scenarios of the message processing method provided in the embodiments of this application. The method includes:

[0039] 101. Send a voice message task to the first cluster. The voice message task carries a first message identifier, which includes the first cluster identifier of the first cluster.

[0040] In this system, voice message tasks can be sent by the voice message service's sending layer. Upon receiving a request from the business party, the sending layer creates a first voice message task and sends it to the corresponding service cluster. The corresponding service cluster receives the voice message task and assigns it to a server node. The server node can then perform outbound voice calls based on the task. Specifically, in related technologies, outbound voice calls in different regions typically connect to different service clusters; for example, service cluster A connects to outbound voice calls in region A. Alternatively, a single service cluster may connect to outbound voice calls in multiple regions. Specifically, voice message tasks can be used to instruct the corresponding service cluster to provide users with services such as voice alarms, voice notifications, and voice verification codes.

[0041] 102. By monitoring for abnormal situations when the first cluster provides voice outbound call services based on voice message tasks, it can be determined whether the first cluster has malfunctioned.

[0042] The sending layer can determine whether there is any abnormality in the first cluster providing voice outbound call services based on the status of the voice message task returned by the first cluster.

[0043] In some embodiments, the first cluster includes multiple server nodes, and the first message identifier includes a first node identifier, which is the identifier of the first server node among the multiple server nodes. The method may further include: if there is an anomaly in the first server node providing voice outbound call service according to the voice message task, then the voice message task is sent to the second server node so that the second server node provides voice outbound call service according to the voice message task. The second server node is any server node in the first cluster other than the first server node.

[0044] Specifically, the sending layer can monitor and record any anomalies occurring during the outbound call service provided by the cluster, ensuring that every anomaly is recorded and used as a basis for determining whether the cluster is faulty. Specifically, if an anomaly occurs in the outbound call service provided by a server node in the cluster based on a voice message task, it can be considered that the server node is faulty, and the voice message task will be sent to other server nodes in the cluster to continue providing outbound call services based on the voice message task.

[0045] In this embodiment, the method may further include: if the number of server nodes in the first cluster that are found to be abnormal in providing voice outbound call services according to voice message tasks exceeds a preset threshold, then the first cluster is determined to have malfunctioned.

[0046] Specifically, if a server node in the cluster encounters an anomaly while providing outbound call services based on a voice message task, the voice message task can be forwarded to other server nodes so that they can execute the corresponding outbound call service. If a certain number of server nodes in the cluster fail to execute the outbound call service consecutively, it can be assumed that there are no available server nodes in the cluster, and the service cluster can be determined to be faulty.

[0047] Specifically, voice message tasks can be divided into two main categories: creation type and query type. For example, the creation type can be used to instruct the service cluster to create an outbound call service, that is, to send a voice message to the recipient. The query type can be used to query the voice status.

[0048] Among them, anomaly detection can be performed based on the type of different voice message tasks.

[0049] For example, regarding creation types, there might be instances where a single group of voice API calls time out or fail, meaning the API encounters an error when the business calls it. There might also be instances where polling voice API calls fail or time out, meaning that when sending voice messages to multiple groups of recipients, one or more groups of voice services might experience errors.

[0050] For example, depending on the query type, there might be cases where querying voice status fails, such as an abnormal response from the query interface. There's also the possibility that the voice platform returns an abnormal call status, meaning the downstream business is returning an abnormal result.

[0051] Specifically, regarding the above situation, if a server node in the cluster fails to provide voice outbound calling service, it can be considered a faulty server node. The voice message task is then sent to another server node in the cluster. If that other server node also fails to provide voice outbound calling service, the voice message task is sent to other server nodes in the cluster, until the number of server nodes in the cluster that fail to provide voice outbound calling service according to the voice message task exceeds a preset threshold. At this point, the cluster is considered a faulty cluster. Different preset thresholds can be set for different task types. For example, if the number of server nodes providing creation-type voice outbound calling service that fails consecutively exceeds 10, or the number of server nodes providing query-type voice outbound calling service that fails consecutively exceeds 30, then that node is considered a faulty node. Alternatively, regardless of type, if the number of server nodes providing voice outbound calling service that fails consecutively exceeds 20, then the cluster is considered a faulty cluster.

[0052] Specifically, each server node in the cluster can provide voice outbound calling services. Therefore, if one of the server nodes is not faulty, the cluster can be considered to be fault-free.

[0053] Specifically, the method may further include: if any server node in the first cluster is found to be providing abnormal voice outbound call service, then the server node is marked as a faulty node.

[0054] It's easy to understand that when a server node fails, marking it can prevent tasks from being sent to that node again, or, if a task is sent to that node again, it can be switched to another server node that is not experiencing a failure to provide outbound call services.

[0055] In some embodiments, the method may also include: if a preset number of server nodes in the first cluster are detected to be marked as faulty nodes, then the first cluster is determined to have failed.

[0056] It's easy to understand that each cluster may connect to multiple platforms. If there are too few available server nodes in the cluster, outbound call services may not be provided in a timely manner. Therefore, if there are too many unavailable server nodes in the cluster, i.e., too few available server nodes, it can be determined that the first cluster has failed. This preset number can be set according to the number of platforms the cluster connects to. For example, if the cluster connects to a large number of platforms, the preset number should be set larger; if the cluster connects to a small number of platforms, the preset number should be set smaller.

[0057] In some embodiments, the step of "sending the voice message task to the second server node" may include: reassembling the first message identifier according to the second node identifier of the second server node to obtain a third message identifier, wherein the third message identifier includes the first node identifier and the second node identifier, and the second server node is any server node in the first cluster that is not marked as a faulty node; and sending the voice message task to the second server node, wherein the voice message task carries the third message identifier.

[0058] Specifically, the first cluster includes multiple server nodes. If the first server node fails to provide voice outbound calling service, the voice message task is sent to a server node in the cluster that has not been marked as a faulty node, so as to avoid sending the voice message task to the faulty node and causing the voice outbound calling service to fail again, thus ensuring the success of critical business calls.

[0059] For example, please see Figure 3 The SZ cluster has multiple server nodes that can provide voice outbound calling services. If a server node fails, it can send a voice message task to other server nodes in the cluster so that the other server nodes can provide voice outbound calling services according to the voice message task.

[0060] It's easy to understand that for query tasks, since the query is performed on a database within the local cluster, there are no issues.

[0061] 103. If the first cluster is determined to be faulty, the voice message task is resent to the target cluster according to the type of the voice message task and the first message identifier, so that the target cluster can provide voice outbound call service according to the voice message task. The target cluster is any service cluster other than the first cluster.

[0062] Specifically, in related technologies, because different service clusters correspond to voice messaging services in different regions—that is, regions A and B have two independent voice platform systems, and the service data in the two regions is isolated—it is impossible to automatically switch to a service cluster in another region to execute voice messaging tasks when a failure occurs. For example, if service cluster A fails, the inability to actively switch to service cluster B to execute voice outbound calls will affect the sending of voice messages. Furthermore, even if manual switching is possible, the voice messaging tasks in the original failed cluster cannot be found in the switched cluster, resulting in the service side not obtaining accurate voice messaging status. Therefore, in this embodiment, if it is determined that the first cluster has failed, the voice messaging task is resent to the target cluster according to the type of the voice messaging task and the first message identifier, so that the target cluster can provide voice outbound calling services according to the voice messaging task, achieving automatic switching in case of failure and improving the stability and availability of the voice messaging service.

[0063] In this embodiment, there are multiple service clusters other than the first cluster. The method may further include: determining the target cluster based on the number of idle server nodes in each of the multiple service clusters other than the first cluster.

[0064] It's easy to understand that different service clusters handle different numbers of voice message tasks. Some platforms may be busier than others. To avoid excessive outbound call tasks causing service congestion, a service cluster with a large number of idle server nodes can be selected as the target cluster. Subsequent migration of message tasks from a faulty cluster to the target cluster will prevent service congestion and untimely outbound calls.

[0065] In some embodiments, there are multiple service clusters other than the first cluster, and the method further includes: determining the target cluster based on the number of service platforms connected to each of the multiple service clusters other than the first cluster.

[0066] It's easy to understand that if a service cluster connects to a large number of service platforms, even if there are many idle nodes in the cluster at the moment, a sudden surge in business volume may occur. Therefore, the target cluster can be determined based on the number of service platforms connected to the service cluster. The service cluster with the fewest connected service platforms is selected as the target cluster to avoid business congestion and untimely outbound calls caused by a surge in business when migrating message tasks from the faulty cluster to the target cluster.

[0067] Specifically, in this embodiment, each voice message task corresponds to a message identifier, which may include a voice message identifier, a cluster identifier, and a node identifier. The voice message identifier is used to identify a unique voice message, the cluster identifier is used to identify the service cluster corresponding to the voice message, and the node identifier is used to identify the server node corresponding to the voice message. The identifier can be a string consisting of numbers or letters. For example, "sz+10.158.69.01+msgid" can constitute a unique message identifier, where "sz" is the cluster name, "10.158.69.01" is the server node address, and "msgid" is a numeric identifier used to uniquely identify the voice message.

[0068] Specifically, 103 can mainly include: if the voice message task is of the creation type, then synchronizing the databases of the first cluster and the target cluster; after the databases of the first cluster and the target cluster are synchronized, recombining the first message identifier of the voice message task according to the second cluster identifier of the target cluster to obtain the second message identifier; sending the voice message task, which carries the second message identifier.

[0069] It is easy to understand that, due to the delay in data synchronization between the first cluster and the target cluster, the voice message task needs to be reprocessed after the databases of the first cluster and the target cluster are synchronized.

[0070] Specifically, such as Figure 4 As shown, the sending layer sends a voice message task of type creation to the SZ cluster. If it detects that a preset number of server nodes in the SZ cluster are providing voice outbound call services abnormally, it determines that the cluster is abnormal. Therefore, it reassembles the first message identifier of the voice message task according to the second cluster identifier to obtain the second message identifier. The second message identifier may include the first message identifier and the identifier of the TJ cluster. The voice message task is then sent to the TJ cluster, and the voice message task carries the aforementioned second message identifier.

[0071] Specifically, during the retransmission process, the identifiers of the source cluster and the target cluster can be associated. This identifier indicates that the voice message task was sent to the target cluster after the source cluster experienced an anomaly in providing voice outbound calling service, allowing the target cluster to resume providing voice outbound calling service based on the voice message task. If the target cluster successfully provides voice outbound calling service based on the voice message task, the final state of the voice message execution can be recorded using the second message identifier. Thus, by processing the message identifier of the voice message task, there is no need to restore message-related information, saving storage resources and uniquely recording the complete lifecycle of the message. For example, the sending layer sends a creation-type voice message task to the SZ cluster. If a preset number of server nodes in the SZ cluster continuously fail to provide voice outbound calling service, the cluster is determined to be faulty. Therefore, the first message identifier of the voice message task is reassembled based on the second cluster identifier to obtain the second message identifier. This second message identifier may include the first message identifier and the identifier of the TJ cluster. The voice message task is then sent to the TJ cluster, carrying the aforementioned second message identifier. After the TJ cluster obtains the voice message task, it provides voice outbound calling service according to the voice message task. If the TJ cluster successfully provides the voice outbound calling service, it records the status of providing the outbound calling service, such as the success status, through the second message identifier.

[0072] In some embodiments, 103 may mainly include: if the type of the voice message task is query type, then sending the voice message task to the target cluster, wherein the voice message task carries a first cluster identifier, so that the target cluster provides voice outbound call service based on the first cluster and the voice message task.

[0073] It's easy to understand that for a query task, it's only necessary to determine which cluster the corresponding message service was created in, and then query that cluster. Therefore, the resent voice message task only needs to carry the source cluster's identifier and the voice message task's unique identifier. The source cluster's identifier is used to identify the query cluster, and the voice message task's unique identifier is used to identify the voice message task itself. This reduces invalid queries between clusters, and since the query task executes every 3 seconds, the identifier processing ensures that the query task's processor consumption is controlled.

[0074] Please see Figure 5 The sending layer sends a query-type voice message task to the SZ cluster. If the SZ cluster fails, the sending layer parses the first message identifier of the voice message task to obtain the identifier of the SZ cluster. Then, the sending layer sends the voice message task carrying the identifier of the SZ cluster to the TJ cluster, so that the TJ cluster can query the SZ cluster.

[0075] In some embodiments, the method may further include: if each service cluster other than the first cluster fails, controlling all service clusters to stop providing voice outbound calling services.

[0076] Specifically, if all server nodes in the first cluster fail, the voice message service sending layer needs to switch voice message tasks to other available clusters for processing. If no available clusters are available at this time, only alerts can be issued to each platform and services can be stopped; no switching is required.

[0077] To better illustrate the message processing method provided in the embodiments of this application, please refer to... Figure 6 The message processing method provided in this application embodiment can be summarized into the following steps:

[0078] Step 201: Send a voice message task to the first cluster. The voice message task carries a first message identifier, which includes a voice message identifier, a first cluster identifier of the first cluster, and a first node identifier of the first server node within the first cluster, so that the first server node of the first cluster can provide voice outbound call services according to the voice message task.

[0079] The voice message task can be sent by the voice message service's sending layer. The voice message service's sending layer receives the business party's request, creates the first voice message task, and sends the first voice message task to the corresponding service cluster. The corresponding service cluster receives the voice message task and assigns it to the server node. The server node can then perform voice outbound call services based on the voice message task.

[0080] Each voice message task corresponds to a message identifier, which may include a voice message identifier, a cluster identifier, and a node identifier. The voice message identifier uniquely identifies the voice message, the cluster identifier identifies the service cluster corresponding to the voice message, and the node identifier identifies the server node corresponding to the voice message. The identifier can be a string consisting of numbers or letters. For example, "sz+10.158.69.01+msgid" can constitute a unique message identifier, where "sz" is the cluster name, "10.158.69.01" is the server node address, and "msgid" is a numeric identifier used to uniquely identify the voice message.

[0081] Step 202: If it is detected that the first server node is providing abnormal voice outbound call service according to the voice message task, the first server node is determined to be faulty and marked as a faulty node.

[0082] The sending layer can determine whether there is any abnormality in the first cluster providing voice outbound call services based on the status of the voice message task returned by the first cluster.

[0083] Step 203: Switch to any server node in the first cluster that is not marked as a faulty node to provide voice outbound calling service according to the voice message task.

[0084] Specifically, the sending layer can monitor and record any anomalies occurring during the outbound call service provided by the cluster, ensuring that every anomaly is recorded and used as a basis for determining whether the cluster is faulty. Specifically, if an anomaly occurs in the outbound call service provided by a server node in the cluster based on a voice message task, the server node can be considered faulty, and the voice message task will be sent to a server node in the cluster that has not been marked as faulty, allowing it to continue providing outbound call service based on the voice message task.

[0085] Step 204: If a preset number of server nodes in the first cluster are detected to be marked as faulty nodes, then the first cluster is determined to be faulty.

[0086] Specifically, if a server node in the cluster encounters an anomaly while providing outbound call services based on a voice message task, the voice message task can be forwarded to other server nodes so that they can execute the corresponding outbound call service. If a certain number of server nodes in the cluster fail to execute the outbound call service consecutively, it can be assumed that there are no available server nodes in the cluster, and the service cluster can be determined to be faulty.

[0087] Step 205: Determine the target cluster based on the number of service platforms connected to by each service cluster in the multiple service clusters other than the first cluster.

[0088] It's easy to understand that if a service cluster connects to a large number of service platforms, even if there are many idle nodes in the cluster at the moment, a sudden surge in business volume may occur. Therefore, the target cluster can be determined based on the number of service platforms connected to the service cluster. The service cluster with the fewest connected service platforms is selected as the target cluster to avoid business congestion and untimely outbound calls caused by a surge in business when migrating message tasks from the faulty cluster to the target cluster.

[0089] Step 206: If the voice message task is of type creation, then synchronize the databases of the first cluster and the target cluster.

[0090] Step 207: After the database synchronization between the first cluster and the target cluster is completed, the first message identifier of the voice message task is reassembled according to the second cluster identifier of the target cluster to obtain the second message identifier. The second message identifier includes the first message identifier and the second cluster identifier. The voice message task is then sent to the target cluster, carrying the second message identifier, so that the target cluster can provide voice outbound calling service according to the voice message task.

[0091] Specifically, during the retransmission process, the source cluster identifier and the target cluster identifier can be associated. This identifier indicates that the voice message task was sent to the target cluster after the source cluster experienced an anomaly in providing voice outbound calling service, prompting the target cluster to re-provide voice outbound calling service according to the voice message task. If the target cluster successfully provides voice outbound calling service according to the voice message task, the final state of the voice message execution can also be recorded through this second message identifier. In this way, by processing the message identifier of the voice message task, there is no need to re-store message-related information, which can save storage resources and uniquely record the complete lifecycle of the message.

[0092] Step 208: If the voice message task is of the query type, then send the voice message task to the target cluster. The voice message task carries the first cluster identifier so that the target cluster can provide voice outbound call service based on the first cluster identifier and the voice message task.

[0093] It's easy to understand that for a query task, it's only necessary to determine which cluster the corresponding message service was created in, and then query that cluster. Therefore, the resent voice message task only needs to carry the source cluster's identifier and the voice message task's unique identifier. The source cluster's identifier is used to identify the query cluster, and the voice message task's unique identifier is used to identify the voice message task itself. This reduces invalid queries between clusters, and since the query task executes every 3 seconds, the identifier processing ensures that the query task's processor consumption is controlled.

[0094] As described above, this embodiment sends a voice message task to the first cluster. The voice message task carries a first message identifier, which includes a voice message identifier, a first cluster identifier, and a first node identifier for the first server node within the first cluster. This enables the first server node in the first cluster to provide voice outbound calling services according to the voice message task. Then, if the first server node is detected to be providing voice outbound calling services abnormally for more than a preset threshold consecutively, the first server node is determined to be faulty and marked as a faulty node. Subsequently, the system switches to any server node in the first cluster that is not marked as a faulty node to provide voice outbound calling services according to the voice message task. Thus, in the event of a fault in the first server node within the first cluster, the system can switch to another server node in the first cluster to provide voice outbound calling services according to the voice message task, ensuring successful calls for critical business operations. If a predetermined number of server nodes in the first cluster are detected as faulty nodes, the first cluster is deemed faulty. Based on the number of service platforms connected to by each of the multiple service clusters other than the first cluster, a target cluster is determined. If the voice message task is a creation type, the databases of the first cluster and the target cluster are synchronized. After the database synchronization is complete, the first message identifier of the voice message task is reassembled based on the second cluster identifier of the target cluster to obtain a second message identifier. This second message identifier includes both the first message identifier and the second cluster identifier. The voice message task is then sent to the target cluster, carrying the second message identifier, so that the target cluster can provide outbound voice call services based on the voice message task. If the voice message task is a query type, the voice message task is sent to the target cluster, carrying the first cluster identifier, so that the target cluster can provide outbound voice call services based on the first cluster identifier and the voice message task. Thus, in the event of a source cluster failure, the system can switch to the target cluster to resume providing voice outbound calling services based on the voice message task. Furthermore, by processing the message identifier carried by the voice message task, the source and target clusters can be linked, ensuring effective delivery of the voice message task while avoiding duplicate storage. This saves storage resources and records the complete lifecycle of the voice message task. Moreover, by processing the message identifier carried by the voice message task differently for different task types, data consistency across different task types can be guaranteed.

[0095] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.

[0096] This embodiment of the application sends a voice message task to a first cluster, the voice message task carrying a first message identifier, which includes the first cluster identifier of the first cluster. This enables the first cluster to provide voice outbound calling services based on the voice message task. Then, by monitoring for anomalies in the first cluster's provision of voice outbound calling services based on the voice message task, it determines whether the first cluster has failed. If a failure is determined, the voice message task is resent to a target cluster based on the type of the voice message task and the first message identifier, so that the target cluster can provide voice outbound calling services based on the voice message task. The target cluster can be any service cluster other than the first cluster. This embodiment of the application automatically sends the voice message task to the target cluster when the first cluster fails, enabling the target cluster to provide voice outbound calling services, thus achieving automatic cluster switching in case of failure and improving the stability and availability of the voice message service.

[0097] To facilitate better implementation of the message processing method of this application embodiment, this application embodiment also provides a message processing apparatus. Please refer to... Figure 7 , Figure 7 This is a first structural schematic diagram of a message processing apparatus provided in an embodiment of this application. The message processing apparatus 10 may include:

[0098] The first sending module 11 is used to send a voice message task to the first cluster. The voice message task carries a first message identifier, which includes the first cluster identifier of the first cluster, so that the first cluster can provide voice outbound call service according to the voice message task.

[0099] The judgment module 12 is used to determine whether the first cluster has malfunctioned by monitoring for abnormal situations when the first cluster provides voice outbound call services according to voice message tasks.

[0100] The second sending module 13 is used to resend the voice message task to the target cluster according to the type of the voice message task and the first message identifier if the first cluster is determined to have failed, so that the target cluster can provide voice outbound call service according to the voice message task. The target cluster is any service cluster other than the first cluster.

[0101] Optionally, the second sending module 13 can be used to: if the voice message task is of the creation type, synchronize the databases of the first cluster and the target cluster; after the databases of the first cluster and the target cluster are synchronized, reassemble the first message identifier of the voice message task according to the second cluster identifier of the target cluster to obtain the second message identifier, the second message identifier including the first message identifier and the second cluster identifier; send the voice message task to the target cluster, the voice message task carrying the second message identifier.

[0102] Optionally, the second sending module 13 can be used to: if the type of the voice message task is query type, send the voice message task to the target cluster, the voice message task carrying the first cluster identifier, so that the target cluster provides voice outbound call service based on the first cluster and the voice message task.

[0103] Optionally, the first cluster includes multiple server nodes, and the first message identifier includes a first node identifier, which is the identifier of the first server node among the multiple server nodes. The judgment module 12 can be used to: if there is an anomaly in the first server node providing voice outbound call service according to the voice message task, then send the voice message task to the second server node so that the second server node provides voice outbound call service according to the voice message task. The second server node is any server node in the first cluster other than the first server node.

[0104] Optionally, the judgment module 12 can also be used to: if the number of server nodes in the first cluster that provide abnormal voice outbound call services according to voice message tasks exceeds a preset threshold, then determine that the first cluster has failed.

[0105] Optionally, the message processing device 10 may also include a marking module, which can be used to mark a server node as a faulty node if it is detected that any server node in the first cluster is providing abnormal voice outbound call service according to the voice message task.

[0106] Optionally, the judgment module 12 can be used to: reassemble the first message identifier according to the second node identifier of the second server node to obtain a third message identifier, the third message identifier including the second node identifier, the second server node being any server node in the first cluster that has not been marked as a faulty node; and send the voice message task to the second server node, the voice message task carrying the third message identifier.

[0107] Optionally, there may be multiple service clusters other than the first cluster. The message processing device 10 may include a determining module, which can be used to determine the target cluster based on the number of idle server nodes in each of the multiple service clusters other than the first cluster.

[0108] Optionally, the determination module can also be used to: determine the target cluster based on the number of service platforms that each service cluster in multiple service clusters other than the first cluster connects to.

[0109] Optionally, the message processing device 10 may also include a shutdown module, which can be used to: after determining that the first cluster has failed, if all service clusters other than the first cluster have failed, control all service clusters to stop providing voice outbound call services.

[0110] It should be noted that the functions of each module in the message processing device 10 in this application embodiment can be referred to the specific implementation methods in the above method embodiments, and will not be repeated here.

[0111] Each unit in the aforementioned message processing device 10 can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0112] The message processing device 10 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the message processing device 10 can be the terminal or server.

[0113] The message processing device 10 provided in this application embodiment sends a voice message task to a first cluster through a first sending module 11. The voice message task carries a first message identifier, which includes a first cluster identifier of the first cluster, so that the first cluster provides voice outbound call service according to the voice message task. Then, the judgment module 12 determines whether the first cluster has failed by monitoring for abnormal situations when the first cluster provides voice outbound call service according to the voice message task. If the first cluster is determined to have failed, the second sending module 13 resends the voice message task to the target cluster according to the type of the voice message task and the first message identifier, so that the target cluster provides voice outbound call service according to the voice message task. The target cluster can be any service cluster other than the first cluster. When the cluster providing voice message service fails, it can automatically switch to other available clusters to continue providing voice message service, thereby improving the stability and availability of voice message service.

[0114] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0115] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be... Figure 1 The terminal or server shown. For example... Figure 8 As shown, the computer device 20 may include: a communication interface 21, a memory 22, a processor 23, and a communication bus 24. The communication interface 21, memory 22, and processor 23 communicate with each other via the communication bus 24. The communication interface 21 is used for data communication between the computer device 20 and external devices. The memory 22 can be used to store software programs and modules, and the processor 23 executes the software programs and modules stored in the memory 22, such as the software programs for the corresponding operations in the aforementioned method embodiments.

[0116] Optionally, the processor 23 can call the software program and modules stored in the memory 22 to perform the following operations: send a voice message task to the first cluster, the voice message task carrying a first message identifier, the first message identifier including the first cluster identifier of the first cluster, so that the first cluster provides voice outbound call service according to the voice message task; determine whether the first cluster has failed by monitoring for abnormal situations when the first cluster provides voice outbound call service according to the voice message task; if it is determined that the first cluster has failed, resend the voice message task to the target cluster according to the type of the voice message task and the first message identifier, so that the target cluster provides voice outbound call service according to the voice message task, the target cluster being any service cluster other than the first cluster.

[0117] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding flow in the message processing method of the embodiments of this application; for brevity, further details are omitted here.

[0118] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding flow in the message processing method of the embodiments of this application. For simplicity, further details are omitted here.

[0119] This application also provides a computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding flow in the message processing method of the embodiments of this application. For brevity, further details are omitted here.

[0120] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0121] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0122] It should be understood that the above-described memory is exemplary and not a limiting description. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0123] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0124] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0125] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0126] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0127] In addition, the functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0128] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0129] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A message processing method, characterized in that, The method includes: A voice message task is sent to the first cluster, the voice message task carrying a first message identifier, the first message identifier including the first cluster identifier of the first cluster, so that the first cluster provides voice outbound call service according to the voice message task; By monitoring for any abnormalities when the first cluster provides voice outbound call services according to the voice message task, it can be determined whether the first cluster has malfunctioned. If the first cluster is determined to be faulty, the voice message task is resent to the target cluster according to the type of the voice message task and the first message identifier, so that the target cluster can provide voice outbound call service according to the voice message task. The target cluster is any service cluster other than the first cluster. The step of resending the voice message task to the target cluster according to the type of the voice message task and the first message identifier includes: If the voice message task is of the creation type, then the databases of the first cluster and the target cluster are synchronized; After the database synchronization between the first cluster and the target cluster is completed, the first message identifier of the voice message task is reassembled according to the second cluster identifier of the target cluster to obtain the second message identifier, which includes the first message identifier and the second cluster identifier. The voice message task is sent to the target cluster, and the voice message task carries the second message identifier.

2. The message processing method as described in claim 1, characterized in that, The step of resending the voice message task to the target cluster according to the type of the voice message task and the first message identifier further includes: If the voice message task is of the query type, the voice message task is sent to the target cluster. The voice message task carries the first cluster identifier, so that the target cluster provides voice outbound call service based on the first cluster identifier and the voice message task.

3. The message processing method as described in claim 1, characterized in that, The first cluster includes multiple server nodes, the first message identifier includes a first node identifier, and the first node identifier is the identifier of the first server node among the multiple server nodes. The method further includes: If the first server node experiences an anomaly in providing outbound voice call services based on the voice message task, the voice message task is sent to the second server node so that the second server node can provide outbound voice call services based on the voice message task. The second server node can be any server node in the first cluster other than the first server node.

4. The message processing method as described in claim 3, characterized in that, The method further includes: If the number of server nodes in the first cluster that are found to be abnormal in providing voice outbound call services according to the voice message task exceeds a preset threshold, then the first cluster is determined to have malfunctioned.

5. The message processing method as described in claim 3, characterized in that, The method further includes: If any server node in the first cluster is found to be providing abnormal voice outbound call service according to the voice message task, then the server node is marked as a faulty node.

6. The message processing method as described in claim 5, characterized in that, Sending the voice message task to the second server node includes: The first message identifier is reassembled based on the second node identifier of the second server node to obtain a third message identifier, wherein the third message identifier includes the second node identifier, and the second server node is any server node in the first cluster that has not been marked as a faulty node. The voice message task is sent to the second server node, and the voice message task carries the third message identifier.

7. The message processing method according to any one of claims 1-6, characterized in that, In addition to the first cluster, there are multiple service clusters, and the method further includes: The target cluster is determined based on the number of idle server nodes in each of the plurality of service clusters other than the first cluster.

8. The message processing method according to any one of claims 1-6, characterized in that, In addition to the first cluster, there are multiple service clusters, and the method further includes: The target cluster is determined based on the number of service platforms that each service cluster, excluding the first cluster, connects to.

9. The message processing method according to any one of claims 1-6, characterized in that, After determining that the first cluster has failed, the method further includes: If all service clusters other than the first cluster fail, control all said service clusters to stop providing voice outbound calling services.

10. A message processing device, characterized in that, The device includes: A first sending module is used to send a voice message task to a first cluster. The voice message task carries a first message identifier, which includes a first cluster identifier of the first cluster, so that the first cluster provides voice outbound call service according to the voice message task. The judgment module is used to determine whether the first cluster has malfunctioned by monitoring for abnormal situations when the first cluster provides voice outbound call services according to the voice message task. The second sending module is used to resend the voice message task to the target cluster according to the type of the voice message task and the first message identifier if it is determined that the first cluster has failed, so that the target cluster can provide voice outbound call service according to the voice message task. The target cluster is any service cluster other than the first cluster. Specifically, the second sending module is used to: if the voice message task is of the creation type, then synchronize the databases of the first cluster and the target cluster; After the database synchronization between the first cluster and the target cluster is completed, the first message identifier of the voice message task is reassembled according to the second cluster identifier of the target cluster to obtain the second message identifier, which includes the first message identifier and the second cluster identifier. The voice message task is sent to the target cluster, and the voice message task carries the second message identifier.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the steps of the message processing method as described in any one of claims 1-9.

12. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the steps of the message processing method according to any one of claims 1-9 by calling the computer program stored in the memory.

13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the message processing method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Message routing method and device

    CN112653625A

  • Cluster switching method, device and equipment

    CN113051110A