CN116723241A - Voice call distribution method, system, computing device and storage medium - Google Patents
Voice call distribution method, system, computing device and storage medium Download PDFInfo
- Publication number
- CN116723241A CN116723241A CN202310622166.6A CN202310622166A CN116723241A CN 116723241 A CN116723241 A CN 116723241A CN 202310622166 A CN202310622166 A CN 202310622166A CN 116723241 A CN116723241 A CN 116723241A
- Authority
- CN
- China
- Prior art keywords
- voice call
- message
- server
- merchant
- voice
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1069—Session establishment or de-establishment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/61—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a voice call distribution method, a system, a computing device and a storage medium, wherein the method is executed at a server and comprises the following steps: receiving a voice call message sent by a third party server after a voice channel is established according to a voice call request of a user side; performing de-duplication processing on the voice call message, setting a priority for the voice call message, and sending the voice call message to a priority queue; according to the priority of the voice call message, acquiring the voice call message from the priority queue; acquiring target merchant side data meeting preset conditions from a cache server; and distributing the voice call message to the target merchant terminal according to the target merchant terminal data, so that the target merchant terminal adds the voice call message to a voice channel of the third party server, and performs voice call with the user terminal through the voice channel. According to the technical scheme of the invention, the voice call request of the user terminal can be rapidly distributed to the target merchant terminal, so that the voice call between the user terminal and the merchant terminal can be rapidly established.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a voice call distribution method, a voice call distribution system, a computing device, and a storage medium.
Background
In the existing voice call distribution scheme, after the static factors are queried for the first time, middleware is used as a cache (for example, redis), the expiration time of the cache is configured, dynamic factors are queried from a third party in real time, and the score of the B-terminal personnel is calculated in real time, so that the B-terminal personnel can be distributed for the voice call of the user relatively quickly and in real time. According to the scheme, if the buffer expiration time is set to be too short, excessive real-time allocation can be caused, and the single allocation consumes a long time; if the expiration time of the cache is set too long, the condition that the personnel state of the B end is delayed can be caused, and the personnel utilization rate is affected. In addition, the scheme has complex distribution logic and overlong flow, increases error risk and reduces the success rate of voice call.
Therefore, a voice call distribution method is needed to improve the voice call distribution speed and efficiency, and solve the problems in the above technical solutions.
Disclosure of Invention
Accordingly, the present invention provides a voice call distribution method and a voice call distribution system to solve or at least alleviate the above-mentioned problems.
According to one aspect of the present invention, a voice call distribution method is provided, which is executed at a server, where the server is communicatively connected to a message queue server, a cache server, and a third party server, the message queue server includes a priority queue, and the cache server is adapted to store merchant side data; the method comprises the following steps: receiving a voice call message sent after a third party server establishes a voice channel, wherein the third party server is suitable for responding to a voice call request of a user side, establishing the voice channel according to the voice call request and sending the voice call message; performing de-duplication processing on the voice call message, setting a priority for the voice call message, and sending the voice call message to a priority queue; according to the priority of the voice call message, acquiring the voice call message from the priority queue; acquiring target merchant side data meeting preset conditions from the cache server; and distributing the voice call message to a target merchant terminal according to the target merchant terminal data, so that the target merchant terminal adds the voice call message to a voice channel of the third party server, and performs voice call with the user terminal through the voice channel.
Optionally, in the voice call allocation method according to the present invention, the message queue server further includes a message queue, and the message queue is adapted to receive dynamic information sent by the server side and the third party server; the merchant terminal data comprises dynamic information, static information and comprehensive scores of merchant terminals; the method further comprises the steps of: acquiring dynamic information of a merchant terminal from the message queue in real time, and inquiring static information of the merchant terminal; determining the comprehensive score of the merchant terminal according to the dynamic information and the static information; and storing the dynamic information, the static information and the comprehensive score of the merchant terminal to a cache server.
Optionally, in the voice call allocation method according to the present invention, the cache server is adapted to store merchant-side data based on a rediszset data storage structure; storing the dynamic information, the static information and the comprehensive score of the merchant terminal to a cache server, wherein the method comprises the following steps: and storing the dynamic information, the static information and the comprehensive score of the merchant terminal into a rediszset data storage structure of the cache server according to the high-low order of the comprehensive score.
Optionally, in the voice call allocation method according to the present invention, the obtaining, from the cache server, target merchant side data that satisfies a predetermined condition includes: acquiring merchant-side data with the comprehensive score greater than 0 from the rediszset data storage structure; and selecting merchant side data meeting the screening conditions from all merchant side data with the comprehensive score greater than 0 as target merchant side data according to the screening conditions about merchant sides in the voice call request.
Optionally, in the voice call allocation method according to the present invention, the message queue server further includes a voice call notification queue; distributing the voice call message to the target merchant terminal according to the target merchant terminal data, including: generating a voice call notification according to the voice call message and the target merchant terminal data, and adding the voice call notification to a voice call notification queue, so that the target merchant terminal obtains the voice call notification from the voice call notification queue and obtains the voice call message from the voice call notification.
Optionally, in the voice call allocation method according to the present invention, setting a priority for the voice call message includes: setting priority for the voice call message according to the message type of the voice call message; the message types comprise a voice channel message establishment, a voice channel message joining by a user terminal, a voice channel message joining by a merchant terminal, a voice channel message leaving by the user terminal, a voice channel message leaving by the merchant terminal and a voice channel message destruction.
Optionally, in the voice call allocation method according to the present invention, the performing a deduplication process on the voice call message includes: and carrying out de-duplication processing on the voice call message by using a distributed lock.
Optionally, in the voice call allocation method according to the present invention, the message queue server further includes a dead message queue communicatively connected to the priority queue; after sending the voice call message to the priority queue, the method further comprises: and setting expiration time for the voice call message, so that the voice call message is transferred to the dead message queue after the voice call message exceeds the expiration time.
Optionally, in the voice call allocation method according to the present invention, the method further includes: and responding to the change request of the dynamic information of the merchant terminal, and sending the updated dynamic information of the merchant terminal to a message queue.
Optionally, in the voice call allocation method according to the present invention, the dynamic information includes voice call state information, presence state information, call switch information; the static information comprises operation score data and rights and interests information.
Optionally, in the voice call distribution method according to the present invention, the target merchant terminal is adapted to call a voice answering page after the voice call message is acquired, and call an interface of the third party server, so as to add the voice call message to a voice channel of the third party server.
According to one aspect of the present invention, there is provided a voice call distribution system comprising: one or more merchant terminals; a message queue server, the message queue server comprising a priority queue; the cache server is suitable for storing merchant side data; the third party server is suitable for responding to a voice call request of a user side, establishing a voice channel according to the voice call request and sending a voice call message; the server is in communication connection with the message queue server, the cache server and the third party server and is suitable for executing the method to distribute voice calls.
According to one aspect of the invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the voice call allocation method as described above.
According to one aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform a voice call allocation method as described above.
According to the technical scheme of the invention, the voice call distribution method and the voice call distribution system are provided, the server side receives the voice call message sent by the third party server after the voice call request of the user side is established, performs de-duplication processing on the voice call message, sets a priority for the voice call message, and then sends the voice call message to the priority queue. And the server side can acquire the voice call message from the priority queue according to the priority of the voice call message, acquire target business side data meeting the preset condition from the cache server, distribute the voice call message to the target business side according to the target business side data, and then add the voice call message to a voice channel of the third party server by the target business side to carry out voice call with the user side through the voice channel. Therefore, according to the technical scheme of the invention, the voice call request of the user terminal can be rapidly distributed to the target merchant terminal, the voice call distribution speed and distribution efficiency are improved, and the voice call can be rapidly established between the user terminal and the merchant terminal.
Furthermore, the invention stores merchant end data by utilizing the rediszset data storage structure, and can orderly store the merchant end data in the rediszset data storage structure of the cache server in a ranking list mode according to the comprehensive score of each merchant end. Thus, the target merchant terminal data meeting the preset conditions can be flexibly and rapidly queried.
In addition, the invention can ensure that the voice call information of the third party is executed in sequence by utilizing the priority queue and the dead letter queue, thereby ensuring that the voice call distribution flow is smoother.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above, as well as additional objects, features, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 illustrates a schematic diagram of a voice call distribution system 100 in accordance with one embodiment of the present invention;
FIG. 2 shows a schematic diagram of a computing device 200 according to one embodiment of the invention;
fig. 3 shows a flow diagram of a voice call allocation method 300 according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a schematic diagram of a voice call distribution system 100 according to one embodiment of the invention.
As shown in fig. 1, the voice call distribution system 100 includes one or more merchant terminals 110, a server terminal 120, a third party server 130, a message queue server 140, and a cache server 150. The server 120 is communicatively connected to the third party server 130, the message queue server 140, and the cache server 150, respectively, and the merchant 110 and the third party server 130 may be communicatively connected to the message queue server 140, for example, may be network-connected by a wired or wireless method.
In one embodiment, the voice call distribution system 100 may also include one or more clients 160. Third party server 130 may be communicatively coupled to one or more of customer premise 160, one or more of merchant premise 110, for example, via a wired or wireless network connection.
Wherein merchant end 110 (end B) may be a terminal device used by a merchant. The user terminal 160 (C terminal) may be a terminal device used by a user. The merchant terminal 110 and the user terminal 160 may be personal computers such as desktop computers and notebook computers, or mobile terminals such as mobile phones, tablet computers, multimedia devices, intelligent wearable devices, but are not limited thereto, and may be application programs residing in terminal devices.
The server 120 may be configured to provide a voice call distribution service to enable a voice call initiated by the client 160 to be quickly distributed to the appropriate merchant 110. Which may be implemented as any computing device capable of providing voice call distribution services in the prior art, the invention is not limited to the specific type of server 120. For example, the server 120 may be implemented as a desktop computer, a notebook computer, a processor chip, a mobile phone, a tablet computer, etc., but is not limited thereto. The server may also be a service program residing in the computing device.
In one embodiment of the invention, merchant-side data (merchant-side personnel information) may be stored in cache server 150. Here, the merchant-side data may include dynamic information, static information, and composite scores of merchant side 110, in particular.
Specifically, the dynamic information may include voice call status information (e.g., whether the merchant terminal 110 is in a call), presence status information (whether the merchant terminal is in a presence state), and call switch information (call switch on or off, wherein a voice call message is not allocated to the merchant terminal in the case that the call switch is off). The static information may include business state information of merchant terminal 110 including, for example, operational point data, equity information (e.g., exhibition equity information, IM equity information), etc.
In one embodiment of the invention, message queue server 140 may include a message queue, a priority queue, and a dead message queue communicatively coupled to the priority queue.
In an embodiment of the present invention, the server 120 may receive a voice call message sent after the third party server 130 establishes a voice channel. It should be noted that, the third party server 130 may receive the voice call request sent by the user terminal 160, and then, in response to the voice call request of the user terminal 160, establish a voice channel according to the voice call request and send a voice call message to the third party server 130.
The server 120 performs de-duplication processing on the voice call message, sets a priority for the voice call message, and then sends the voice call message with the priority set to the priority queue. In this way, all voice call messages added to the priority queue can be consumed in the order of priority.
And, the server 120 may obtain the voice call message from the priority queue according to the priority of the voice call message by monitoring the priority queue. And obtaining target merchant-side data satisfying a predetermined condition from the cache server 150. For example, in one embodiment, merchant-side data whose composite score meets a predetermined condition may be obtained from cache server 150 as target merchant-side data. Further, the server 120 may distribute the voice call message to the target merchant terminal corresponding to the target merchant terminal data according to the target merchant terminal data, and then the target merchant terminal may add the voice call message to the voice channel of the third party server 130, so that the target merchant terminal may perform a voice call with the user terminal 160 through the voice channel.
In one embodiment, when determining the composite score of the merchant terminal 110 based on the dynamic information and the static information of the merchant terminal 110, if the merchant terminal 110 is determined to be in an online state based on the online state information in the dynamic information, the score is +2000; if merchant end 110 is offline, then the score is-2000. If it is determined that the merchant terminal 110 is in call according to the voice call state information in the dynamic information, taking the opposite number (negative number) of the absolute value of the existing score of the merchant terminal 110 as the current score of the merchant terminal 110; if it is determined that merchant terminal 110 is not in call, the existing score will still be the current score for that merchant terminal 110. Further, the current score is added to the operation score (the operation score can be obtained from the operation score data), and the comprehensive score of the merchant terminal 110 is obtained.
In one embodiment, cache server 150 may be a Redis server. Cache server 150 may store merchant-side data based on a rediszset data storage structure. Specifically, after determining the comprehensive score of the merchant terminal 110 according to the dynamic information and the static information of the merchant terminal 110, the server terminal 120 may sequentially store the dynamic information, the static information and the comprehensive score (in the form of a ranking list) of the merchant terminal 110 in the rediszset data storage structure of the cache server 150 according to the order of the comprehensive score. Thus, the present invention can orderly store the data of each merchant terminal in the form of a ranking list in the cache server 150 according to the order of the comprehensive score of each merchant terminal 110 by using the rediszset data storage structure. Thus, the target merchant terminal data meeting the preset conditions can be flexibly and rapidly queried.
In this embodiment, when target merchant-side data satisfying a predetermined condition is acquired from the cache server 150, first, all merchant-side data having an integrated score greater than 0 may be acquired from the rediszset data storage structure of the cache server 150. Merchant-side data with an overall score less than 0 (negative in value) can be filtered out directly. Then, for all merchant terminal data with the comprehensive score greater than 0, the merchant terminal data meeting the screening condition can be further selected from all merchant terminal data with the comprehensive score greater than 0 as target merchant terminal data according to the screening condition about the merchant terminal in the voice call request initiated by the user terminal.
In one embodiment, the server 120 may set an expiration time for the voice call message after sending the voice call message to the priority queue, such that the voice call message may be transferred to the dead message queue when the voice call message (dead time in the priority queue) exceeds the expiration time.
In one embodiment, the server 120 may set a corresponding priority for the voice call message according to the message type of the voice call message.
Specifically, the process of sending the voice call message may specifically include the following six steps (each of which may correspond to a message type): establishing a voice channel, adding a voice channel at a user end, adding a voice channel at a merchant end, leaving a voice channel at the user end, leaving a voice channel at the merchant end, and destroying the voice channel. Correspondingly, the message types corresponding to the voice call message can include a voice channel establishment message, a user side joining voice channel message, a merchant side joining voice channel message, a user side leaving voice channel message, a merchant side leaving voice channel message and a destroying voice channel message. In one embodiment, the message types listed above are arranged in a priority order from high to low.
In one embodiment, a corresponding priority value may be configured for each message type in advance, for example, a priority value corresponding to a voice channel message is established to be 60, a priority value corresponding to a user side joining a voice channel message is established to be 50, a priority value corresponding to a merchant side joining a voice channel message is established to be 40, a priority value corresponding to a user side leaving a voice channel message is established to be 30, a priority value corresponding to a merchant side leaving a voice channel message is established to be 20, and a priority value corresponding to a destroying voice channel message is established to be 10. Thus, after determining the message type corresponding to the voice call message, the voice call message can be prioritized according to the pre-configured priority value. Wherein, the larger the priority value, the higher the corresponding priority.
In one embodiment, the server 120 may utilize a distributed lock to perform de-duplication processing on the voice call message to ensure idempotent of the voice call message and prevent repeated processing of data, which is beneficial to improving the distribution efficiency of the voice call. In one implementation, the distributed lock may be implemented by a redissetnx method.
According to one embodiment of the invention, the message queue server 140 also includes a voice call notification queue. In this embodiment, the server 120 may generate a voice call notification from the voice call message and the target merchant side data and add the voice call notification to the voice call notification queue. And, each merchant terminal 110 may monitor the voice call notification queue. In this way, the target merchant side may monitor the voice call notification (containing the target merchant side data) in the voice call notification queue, and may obtain the voice call notification from the voice call notification queue, obtain the voice call message from the voice call notification, and then the target merchant side may add the voice call message to the voice channel of the third party server 130, so as to conduct the voice call with the user side 160 via the voice channel established by the third party server 130.
It can be seen that, according to the system 100 of the present invention, the voice call request of the user terminal 160 can be rapidly distributed to the target business terminal, the target business terminal adds the voice call message to the voice channel of the third party server 130, and the voice call is performed with the user terminal 160 via the voice channel, so that the voice call between the user terminal 160 and the business terminal 110 can be rapidly established.
In an embodiment of the present invention, the server 120 is adapted to perform the voice call allocation method 300. The voice call allocation method 300 of the present invention will be described in detail below.
In one embodiment, merchant terminal 110, server terminal 120, third party server 130, message queue server 140, cache server 150, and user terminal 160 of the present invention may each be implemented as a computing device. When the server 120 is implemented as a computing device, the voice call allocation method 300 of the present invention is enabled to be performed in the computing device.
FIG. 2 illustrates a block diagram of a computing device 200 according to one embodiment of the invention. As shown in FIG. 2, in a basic configuration 202, computing device 200 typically includes a system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between the processor 204 and the system memory 206.
Depending on the desired configuration, the processor 204 may be any type of processing including, but not limited to: a microprocessor (μp), a microcontroller (μc), a digital information processor (DSP), or any combination thereof. Processor 204 may include one or more levels of cache, such as a first level cache 210 and a second level cache 212, a processor core 214, and registers 216. The example processor core 214 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 218 may be used with the processor 204, or in some implementations, the memory controller 218 may be an internal part of the processor 204.
Depending on the desired configuration, system memory 206 may be any type of memory including, but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 106 may include an operating system 220, one or more applications 222, and program data 224. The application 222 is in effect a plurality of program instructions for instructing the processor 204 to perform a corresponding operation. In some implementations, the application 222 can be arranged to cause the processor 204 to operate with the program data 224 on an operating system.
Computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to basic configuration 202 via bus/interface controller 230. The example output device 242 includes a graphics processing unit 248 and an audio processing unit 250. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 252. The example peripheral interface 244 may include a serial interface controller 254 and a parallel interface controller 256, which may be configured to facilitate communication via one or more I/O ports 258 and external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.). The example communication device 246 may include a network controller 260 that may be arranged to facilitate communication with one or more other computing devices 262 over a network communication link via one or more communication ports 264.
The network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media in a modulated data signal, such as a carrier wave or other transport mechanism. A "modulated data signal" may be a signal that has one or more of its data set or changed in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or special purpose network, and wireless media such as acoustic, radio Frequency (RF), microwave, infrared (IR) or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In the computing device 200 according to the present invention, the application 222 of the computing device 200 includes a plurality of program instructions for executing the voice call allocation method 300, which may instruct the processor 204 to execute the voice call allocation method 300 of the present invention.
Fig. 3 shows a flow diagram of a voice call allocation method 300 according to one embodiment of the invention. The method 300 is suitable for execution in a server 120 (e.g., the aforementioned computing device 200). The server 120 is communicatively connected to a third party server 130, a message queue server 140, and a cache server 150, respectively. Both merchant side 110 and third party server 130 may be communicatively coupled to message queue server 140, and third party server 130 may be communicatively coupled to one or more user side 160 and one or more merchant side 110.
According to one embodiment of the invention, merchant-side data (merchant-side personnel information) may be stored in cache server 150. Here, the merchant-side data may include dynamic information, static information, and composite scores of merchant side 110, in particular.
In one application scenario, the merchant side may be a terminal device used by a sales advisor of the merchant.
Specifically, the dynamic information may include voice call status information (e.g., whether the merchant terminal 110 is in a call), presence status information (whether the merchant terminal is in a presence state), and call switch information (call switch on or off, wherein a voice call message is not allocated to the merchant terminal in the case that the call switch is off). The static information may include business state information of merchant terminal 110 including, for example, operational point data, equity information (e.g., exhibition equity information, IM equity information), etc. .
According to one embodiment of the invention, the message queue server 140 may include a message queue, a priority queue.
As shown in fig. 3, method 300 includes steps 310-350.
First, in step 310, the server 120 receives a voice call message sent after the third party server 130 establishes a voice channel. It should be noted that, the third party server 130 may receive the voice call request sent by the user terminal 160, and then, in response to the voice call request of the user terminal 160, establish a voice channel according to the voice call request and send a voice call message to the third party server 130. That is, in step 310, the server 120 may receive a voice call message sent after the third party server 130 establishes a voice channel according to the voice call request of the user 160.
Then, in step 320, the voice call message is subjected to a deduplication process, and a priority is set for the voice call message, and then the voice call message with the priority set is sent to the priority queue. In this way, all voice call messages added to the priority queue can be consumed in the order of priority.
In one embodiment, the server 120 may set a corresponding priority for the voice call message according to the message type of the voice call message.
Specifically, the process of sending the voice call message may specifically include the following six steps (each of which may correspond to a message type): establishing a voice channel, adding a voice channel at a user end, adding a voice channel at a merchant end, leaving a voice channel at the user end, leaving a voice channel at the merchant end, and destroying the voice channel. Correspondingly, the message types corresponding to the voice call message can include a voice channel establishment message, a user side joining voice channel message, a merchant side joining voice channel message, a user side leaving voice channel message, a merchant side leaving voice channel message and a destroying voice channel message. In one embodiment, the message types listed above are arranged in a priority order from high to low.
In one embodiment, a corresponding priority value may be configured for each message type in advance, for example, a priority value corresponding to a voice channel message is established to be 60, a priority value corresponding to a user side joining a voice channel message is established to be 50, a priority value corresponding to a merchant side joining a voice channel message is established to be 40, a priority value corresponding to a user side leaving a voice channel message is established to be 30, a priority value corresponding to a merchant side leaving a voice channel message is established to be 20, and a priority value corresponding to a destroying voice channel message is established to be 10. Thus, when the message type corresponding to the voice call message is determined, the voice call message can be prioritized according to the priority value configured for the message type in advance. Wherein, the larger the priority value, the higher the corresponding priority. In one embodiment, the server 120 may utilize a distributed lock to perform de-duplication processing on the voice call message to ensure idempotent of the voice call message and prevent repeated processing of data, which is beneficial to improving the distribution efficiency of the voice call. In one implementation, the distributed lock may be implemented by a redissetnx method.
According to one embodiment of the invention, message queue server 140 also includes a dead letter queue communicatively coupled to the priority queue. The server 120 may set an expiration time for the voice call message after sending the voice call message to the priority queue, so that the voice call message may be transferred to the dead message queue when the voice call message (dead time in the priority queue) exceeds the expiration time.
In step 330, the server 120 may obtain the voice call message from the priority queue according to the priority of the voice call message by monitoring the priority queue.
In step 340, target merchant-side data satisfying the predetermined condition is obtained from the cache server 150. For example, in one embodiment, merchant-side data whose composite score meets a predetermined condition may be obtained from cache server 150 as target merchant-side data.
According to one embodiment of the invention, the message queue may receive dynamic information of merchant side 110 sent by server side 120 and/or third party server 130. In other words, the server 120 and the third party server 130 may be communicatively connected to a message queue, respectively, and may send dynamic information of the merchant 110 to the message queue. Specifically, when the dynamic information of the merchant terminal 110 is changed, the server 120 or the third party server 130 communicatively connected to the merchant terminal 110 may send the updated dynamic information of the merchant terminal 110 to the message queue in response to the dynamic information change request of the merchant terminal 110.
In one embodiment, server 120 may obtain the (updated) dynamic information of merchant 110 from the message queue in real time by listening to the message queue, and may query the static information of merchant 110. The server 120 may then calculate an integrated score for determining the merchant 110 based on the dynamic and static information of the merchant 110, and may store the dynamic, static, and integrated scores (merchant data) for the merchant 110 to the cache server 150. In a specific embodiment, the server 120 may obtain updated dynamic information of the merchant 110 from the message queue in real time, calculate and determine an updated composite score of the merchant 110 according to the updated dynamic information and the static information of the merchant 110, and store the updated dynamic information, the static information and the composite score of the merchant 110 (as the latest merchant data) in the cache server 150. In this way, the change and storage of the data (dynamic information) of the merchant terminal can be realized through the server 120 and the third party server 130 by combining the message queue, so that the real-time performance of the data of the merchant terminal is improved.
In one embodiment, when determining the composite score of the merchant terminal 110 based on the dynamic information and the static information of the merchant terminal 110, if the merchant terminal 110 is determined to be in an online state based on the online state information in the dynamic information, the score is +2000; if merchant end 110 is offline, then the score is-2000. If it is determined that the merchant terminal 110 is in call according to the voice call state information in the dynamic information, taking the opposite number (negative number) of the absolute value of the existing score of the merchant terminal 110 as the current score of the merchant terminal 110; if it is determined that merchant terminal 110 is not in call, the existing score will still be the current score for that merchant terminal 110. Further, the current score is added to the operation score (the operation score can be obtained from the operation score data), and the comprehensive score of the merchant terminal 110 is obtained.
In one embodiment, cache server 150 may be a Redis server. Cache server 150 may store merchant-side data based on a rediszset data storage structure. Specifically, after determining the comprehensive score of the merchant terminal 110 according to the dynamic information and the static information of the merchant terminal 110, the server terminal 120 may sequentially store the dynamic information, the static information and the comprehensive score (in the form of a ranking list) of the merchant terminal 110 in the rediszset data storage structure of the cache server 150 according to the order of the comprehensive score. Thus, the present invention can orderly store the data of each merchant terminal in the form of a ranking list in the cache server 150 according to the order of the comprehensive score of each merchant terminal 110 by using the rediszset data storage structure. Thus, the target merchant terminal data meeting the preset conditions can be flexibly and rapidly queried.
In this embodiment, in step 340, when target merchant-side data satisfying the predetermined condition is acquired from the cache server 150, first, all merchant-side data with an integrated score greater than 0 may be acquired from the rediszset data storage structure of the cache server 150. Merchant-side data with an overall score less than 0 (negative in value) can be filtered out directly. Then, for all merchant terminal data with the comprehensive score greater than 0, the merchant terminal data meeting the screening condition can be further selected from all merchant terminal data with the comprehensive score greater than 0 as target merchant terminal data according to the screening condition about the merchant terminal in the voice call request initiated by the user terminal.
Finally, in step 350, the voice call message may be distributed to the target merchant terminal corresponding to the target merchant terminal data according to the target merchant terminal data, and then the target merchant terminal may add the voice call message to the voice channel of the third party server 130, so that the target merchant terminal may perform a voice call with the user terminal 160 through the voice channel.
It should be noted that, in the step 340, one or more target merchant end data may be screened out. When a plurality of target merchant terminal data exist, a polling weight algorithm can be adopted to distribute the voice call message to the target merchant terminal corresponding to one of the target merchant terminal data.
According to one embodiment of the invention, the message queue server 140 also includes a voice call notification queue. In this embodiment, in step 350, the server 120 may specifically generate a voice call notification according to the voice call message and the target merchant side data, and add the voice call notification to the voice call notification queue. And, each merchant terminal 110 may monitor the voice call notification queue. In this way, the target merchant side may monitor the voice call notification (containing the target merchant side data) in the voice call notification queue, and may obtain the voice call notification from the voice call notification queue, obtain the voice call message from the voice call notification, and then the target merchant side may add the voice call message to the voice channel of the third party server 130, so as to conduct the voice call with the user side 160 via the voice channel established by the third party server 130.
Thus, according to the method 300 of the present invention, the voice call request of the user terminal 160 can be rapidly distributed to the target business terminal, the target business terminal adds the voice call message into the voice channel of the third party server 130, and the voice call is performed with the user terminal 160 via the voice channel, so that the voice call between the user terminal 160 and the business terminal 110 can be rapidly established.
In one embodiment, the target merchant side may call a voice answer page after the voice call message is acquired, and add the voice call message to the voice channel of the third party server 130 by calling the interface (SDK) of the third party server 130.
In one embodiment, the message queue, the priority queue, the dead message queue, and the voice call notification queue in the message queue server may be implemented by using a rabitimq. Note that rabhitmq is open source message broker software (also known as message oriented middleware) that implements Advanced Message Queuing Protocol (AMQP).
According to the voice call distribution method and the voice call distribution system, the server side receives the voice call message sent by the third party server after the voice channel is established according to the voice call request of the user side, performs de-duplication processing on the voice call message, sets the priority for the voice call message, and then sends the voice call message to the priority queue. And the server side can acquire the voice call message from the priority queue according to the priority of the voice call message, acquire target business side data meeting the preset condition from the cache server, distribute the voice call message to the target business side according to the target business side data, and then add the voice call message to a voice channel of the third party server by the target business side to carry out voice call with the user side through the voice channel. Therefore, according to the technical scheme of the invention, the voice call request of the user terminal can be rapidly distributed to the target merchant terminal, the voice call distribution speed and distribution efficiency are improved, and the voice call can be rapidly established between the user terminal and the merchant terminal.
Furthermore, the invention stores merchant end data by utilizing the rediszset data storage structure, and can orderly store the merchant end data in the rediszset data storage structure of the cache server in a ranking list mode according to the comprehensive score of each merchant end. Thus, the target merchant terminal data meeting the preset conditions can be flexibly and rapidly queried.
In addition, the invention can ensure that the voice call information of the third party is executed in sequence by utilizing the priority queue and the dead letter queue, thereby ensuring that the voice call distribution flow is smoother.
A8, the method of any of A1-A7, wherein the message queue server further comprises a dead letter queue communicatively connected to the priority queue; after sending the voice call message to the priority queue, the method further comprises: and setting expiration time for the voice call message, so that the voice call message is transferred to the dead message queue after the voice call message exceeds the expiration time.
The method of any one of A2-A4, wherein further comprising: and responding to the change request of the dynamic information of the merchant terminal, and sending the updated dynamic information of the merchant terminal to a message queue.
A10, the method of any one of A1-A9, wherein the dynamic information comprises voice call state information, presence state information and call switch information; the static information comprises operation score data and rights and interests information.
A11, the method of any one of A1-A10, wherein the target merchant side is adapted to call a voice answering page and call an interface of the third party server after the voice call message is acquired, so as to add the voice call message to a voice channel of the third party server.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U-drives, floppy diskettes, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the voice call allocation method of the present invention in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, readable media comprise readable storage media and communication media. The readable storage medium stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with examples of the invention. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter.
Claims (10)
1. The voice call distribution method is executed at a server, the server is in communication connection with a message queue server, a cache server and a third party server, the message queue server comprises a priority queue, and the cache server is suitable for storing merchant side data; the method comprises the following steps:
receiving a voice call message sent after a third party server establishes a voice channel, wherein the third party server is suitable for responding to a voice call request of a user side, establishing the voice channel according to the voice call request and sending the voice call message;
performing de-duplication processing on the voice call message, setting a priority for the voice call message, and sending the voice call message to a priority queue;
according to the priority of the voice call message, acquiring the voice call message from the priority queue;
acquiring target merchant side data meeting preset conditions from the cache server;
and distributing the voice call message to a target merchant terminal according to the target merchant terminal data, so that the target merchant terminal adds the voice call message to a voice channel of the third party server, and performs voice call with the user terminal through the voice channel.
2. The method of claim 1, wherein the message queue server further comprises a message queue adapted to receive dynamic information sent by the server and a third party server; the merchant terminal data comprises dynamic information, static information and comprehensive scores of merchant terminals; the method further comprises the steps of:
acquiring dynamic information of a merchant terminal from the message queue in real time, and inquiring static information of the merchant terminal;
determining the comprehensive score of the merchant terminal according to the dynamic information and the static information;
and storing the dynamic information, the static information and the comprehensive score of the merchant terminal to a cache server.
3. The method of claim 2, wherein the cache server is adapted to store merchant-side data based on a rediszset data storage structure; storing the dynamic information, the static information and the comprehensive score of the merchant terminal to a cache server, wherein the method comprises the following steps:
and storing the dynamic information, the static information and the comprehensive score of the merchant terminal into a rediszset data storage structure of the cache server according to the high-low order of the comprehensive score.
4. The method of claim 3, wherein obtaining target merchant-side data from the cache server that meets a predetermined condition comprises:
Acquiring merchant-side data with the comprehensive score greater than 0 from the rediszset data storage structure;
and selecting merchant side data meeting the screening conditions from all merchant side data with the comprehensive score greater than 0 as target merchant side data according to the screening conditions about merchant sides in the voice call request.
5. The method of any of claims 1-4, wherein the message queue server further comprises a voice call notification queue; distributing the voice call message to the target merchant terminal according to the target merchant terminal data, including:
generating a voice call notification according to the voice call message and the target merchant terminal data, and adding the voice call notification to a voice call notification queue, so that the target merchant terminal obtains the voice call notification from the voice call notification queue and obtains the voice call message from the voice call notification.
6. The method of any of claims 1-5, wherein prioritizing the voice call message comprises:
setting priority for the voice call message according to the message type of the voice call message;
the message types comprise a voice channel message establishment, a voice channel message joining by a user terminal, a voice channel message joining by a merchant terminal, a voice channel message leaving by the user terminal, a voice channel message leaving by the merchant terminal and a voice channel message destruction.
7. The method of any of claims 1-6, wherein deduplicating the voice call message comprises:
and carrying out de-duplication processing on the voice call message by using a distributed lock.
8. A voice call distribution system comprising:
one or more merchant terminals;
a message queue server, the message queue server comprising a priority queue;
the cache server is suitable for storing merchant side data;
the third party server is suitable for responding to a voice call request of a user side, establishing a voice channel according to the voice call request and sending a voice call message;
a server in communication with the message queue server, the cache server, the third party server, and adapted to perform the method of any one of claims 1-7 to distribute voice calls.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be processed by the at least one processor, the program instructions comprising instructions for processing the method of any of claims 1-7.
10. A readable storage medium storing program instructions which, when read and processed by a computing device, cause the computing device to process the method of any of claims 1-7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310622166.6A CN116723241A (en) | 2023-05-29 | 2023-05-29 | Voice call distribution method, system, computing device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310622166.6A CN116723241A (en) | 2023-05-29 | 2023-05-29 | Voice call distribution method, system, computing device and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116723241A true CN116723241A (en) | 2023-09-08 |
Family
ID=87865293
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310622166.6A Pending CN116723241A (en) | 2023-05-29 | 2023-05-29 | Voice call distribution method, system, computing device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116723241A (en) |
-
2023
- 2023-05-29 CN CN202310622166.6A patent/CN116723241A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113329069B (en) | Instant messaging method, system and computing device | |
| US9509790B2 (en) | Global presence | |
| CN111459659A (en) | Data processing method, device, scheduling server and medium | |
| CN109756417B (en) | Offline message distribution method, server and storage medium | |
| CN108196961A (en) | A kind of asynchronous message processing method, terminal, system and storage medium | |
| CN110399231B (en) | Cross-platform-based data processing method and device and computer equipment | |
| CN108347445B (en) | Method and device for realizing remote calling | |
| CN111901490B (en) | Resource sharing method, device, computer device and storage medium | |
| CN106201723A (en) | The resource regulating method of a kind of data center and device | |
| CN109271259B (en) | Enterprise service bus system, data processing method, terminal and storage medium | |
| CN107800901A (en) | User's call processing method, device, computer equipment and storage medium | |
| CN112202750A (en) | Control method for policy execution, policy execution system and computing device | |
| CN113014608B (en) | Flow distribution control method and device, electronic equipment and storage medium | |
| WO2023103419A1 (en) | Message queue-based method and apparatus for sending 5g messages in batches, and electronic device | |
| CN111200606A (en) | Deep learning model task processing method, system, server and storage medium | |
| WO2022257247A1 (en) | Data processing method and apparatus, and computer-readable storage medium | |
| CN105872080A (en) | InCloud load balancing control method and device | |
| CN112104753B (en) | Service request processing system and method and computing device | |
| CN116723241A (en) | Voice call distribution method, system, computing device and storage medium | |
| CN116132214B (en) | Event transmission method, device, equipment and medium based on event bus model | |
| CN108134785B (en) | Server switching method and device, terminal equipment and storage medium | |
| CN107124353B (en) | Message processing method and device, computer device and storage medium | |
| WO2016095377A1 (en) | Image display method and device for thin client and electronic equipment | |
| CN115482110A (en) | Service processing method and device, electronic equipment and computer readable medium | |
| CN111651436B (en) | Processing method, system and computing device for user-generated content |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |