Communication system node with multiple modules and shared memory
By introducing a shared memory node architecture into the contact center system and using multiple modules to share memory resources, the lack of capacity and throughput of conventional systems when handling concurrent agents and high-speed incoming contacts is solved, and efficient call management and resources are achieved use.
Patent Information
- Application Number
- CN202380048214.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-22
- Filing Date
- 2023-06-21
- Publication Date
- 2025-02-18
AI Technical Summary
Conventional contact center systems lack sufficient capacity and throughput when handling concurrent agents and high-speed incoming contacts, requiring infrastructure such as additional load balancers to manage loads.
By introducing a shared memory node architecture into the contact center system, using multiple modules (microservices) to share memory resources, efficient storage and management of caller state objects are achieved, and dependence on the operating system kernel is reduced.
Improves the processing power and bandwidth of the contact center system, can support 100 or more calls per second, and exceeds 100,000 total callers or agents, reducing the need for additional resources such as load balancers.
Smart Images

Figure CN119487499A_ABST
Abstract
Description
Technical Field
[0001] Embodiments relating to a node of a communication system are disclosed. Background Art
[0002] An example of a communication system is a contact center system (also called a call center system). A contact center system may employ a pairing node for dispatching contacts (also called calls or callers) to agents that are available to handle those contacts. Sometimes, a contact center may have agents available and waiting to be dispatched to inbound or outbound contacts (e.g., telephone calls, Internet chat sessions, emails). At other times, a contact center may have contacts waiting in one or more queues for agents to become available for dispatch. Summary of the invention
[0003] Certain challenges currently exist. For example, conventional contact center systems do not have sufficient capacity to handle many concurrent agents, nor do they have sufficient throughput to handle high rates of incoming contacts. Therefore, conventional contact center systems typically require additional infrastructure such as load balancers to manage load across multiple systems (e.g., multiple automatic call distributors or ACDs with groups of agents divided among them). Therefore, it would be advantageous for a communication system such as, for example, a contact center system to efficiently manage computing resources including CPU, network bandwidth, and memory, perform necessary operations as quickly as possible, and reduce or eliminate the need for load balancers or other additional computing resources and infrastructure.
[0004] Therefore, in one aspect, a contact center system is provided, comprising: a node, which includes multiple modules (e.g., microservices), each module including a shared memory module (e.g., a shared memory library), wherein the shared memory module is configured to: obtain a shared memory key; use the shared memory key to obtain a shared memory segment identifier (smhid), the shared memory segment identifier identifying the shared memory segment; use the shared memory segment identifier to attach to the shared memory segment, wherein, for each of a plurality of memory block sizes, the shared memory segment stores information about a circular list, and the plurality of memory block sizes include a first memory block size and a second memory block size larger than the first memory block size.
[0005] In another aspect, a method in a contact center system is provided, the contact center system comprising a plurality of services (containers, virtual machines) configured to operate using a shared memory, the method comprising: upon arrival of a caller, storing a caller state object in an allocated portion of the shared memory (i.e., a free memory block within the shared memory) by a first service in a first container; managing the caller by a second service in a second container after the caller is placed on hold by reading and updating the caller state object in the allocated portion of the shared memory; and connecting the caller to an agent by reading and updating the caller state object.
[0006] In another aspect, a method is provided, comprising: storing first circular list information about a first circular list in a shared memory segment, the first circular list being associated with a first memory block size; storing second circular list information about a second circular list in the shared memory segment, the second circular list being associated with a second memory block size that is larger than the first memory block size; and using the first and second circular lists to manage allocation of memory within the shared memory segment.
[0007] In another aspect, a computer program is provided that includes instructions that, when executed by a processing circuit system of a device, cause the device to perform any method disclosed herein. In one embodiment, a carrier containing the computer program is provided, wherein the carrier is one of an electronic signal, an optical signal, a radio signal, and a computer-readable storage medium. In another aspect, an apparatus configured to perform the method disclosed herein is provided. The apparatus may include a memory and a processing circuit system coupled to the memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate various embodiments.
[0009] Figure 1A An example communication system according to an embodiment is shown.
[0010] Figure 1B An example communication system according to an embodiment is shown.
[0011] Figure 1C An example communication system according to an embodiment is shown.
[0012] Figure 1D An example communication system according to an embodiment is shown.
[0013] Figure 2 A pairing node of a contact center according to an embodiment is shown.
[0014] Figure 3 A general node of a communication system according to an embodiment is shown.
[0015] Figure 4 is a flow chart illustrating a process according to an embodiment.
[0016] Figure 5 is a flow chart illustrating a process according to an embodiment.
[0017] Figure 6 is a flow chart illustrating a process according to an embodiment.
[0018] Figure 7 is a flow chart illustrating a process according to an embodiment.
[0019] Figure 8 is a flow chart illustrating a process according to an embodiment.
[0020] Fig. 9 is a flow chart illustrating a process according to an embodiment.
[0021] Fig.10 is a block diagram of a node according to an embodiment. DETAILED DESCRIPTION
[0022] Figure 1A An example communication system 100A is shown. In this example, the communication system 100A is a contact center system. Figure 1A As shown, the communication system 100A may include a central switch 110. The central switch 110 may receive incoming contacts (e.g., telephone callers or other callers) or support outbound connections to contacts via a telecommunications network (not shown). The central switch 110 may include contact routing hardware and software to help route contacts among one or more contact centers, or to one or more private branch exchanges (PBXs) and / or automatic call distributors (ACDs) or other queuing or switching components, including other Internet-based, cloud-based or other networked contact agent hardware or software-based contact center solutions.
[0023] Central switch 110 may not be necessary, such as if there is only one contact center, or if there is only one PBX / ACD routing component in communication system 100A. If more than one contact center is part of communication system 100A, each contact center may include at least one contact center switch (e.g., contact center switches 120A and 120B). Contact center switches 120A and 120B may be communicatively coupled to central switch 110. In embodiments, various topologies of routing and network components may be configured to implement a contact center system.
[0024] Each contact center switch of each contact center may be communicatively coupled to a plurality of agents (or agent "pools"). Each contact center switch may support a certain number of agents (or "seats") logged in at one time. At any given time, a logged in agent may be available and waiting to be connected to a contact, or a logged in agent may be unavailable for any of a variety of reasons, such as connecting to another contact, performing some post-call function, such as recording information about a call, or taking an interruption.
[0025] exist Figure 1A In the example of , the center switch 110 routes the contact to one of the two contact centers via the contact center switch 120A and the contact center switch 120B, respectively. Each of the contact center switches 120A and 120B is shown as having two agents. Agents 130A and 130B can log into the contact center switch 120A, and agents 130C and 130D can log into the contact center switch 120B.
[0026] The communication system 100A may also be communicatively coupled to integrated services from, for example, third-party providers. Figure 1A In an example of the present invention, the paired node 140 can be communicatively coupled to one or more switches in the switch system of the communication system 100A, such as the central switch 110, the contact center switch 120A, or the contact center switch 120B. In some embodiments, the switches of the communication system 100A can be communicatively coupled to multiple paired nodes. In some embodiments, the paired node 140 can be embedded in a component of the contact center system (e.g., embedded in a switch or otherwise integrated with the switch). The paired node 140 can receive information about seats (e.g., seats 130A and 130B) logged into the switch from the switch (e.g., the contact center switch 120A) and information about contacts entering via another switch (e.g., the central switch 110) or in some embodiments from a network (e.g., the Internet or a telecommunications network) (not shown).
[0027] The contact center may include multiple pairing nodes. In some embodiments, one or more pairing nodes may be a component of a pairing node 140 or one or more switches (such as a central switch 110 or a contact center switch 120A and 120B). In some embodiments, a pairing node may determine which pairing node may handle the pairing of a certain contact. For example, a pairing node may alternate between enabling pairing via a behavioral pairing (BP) strategy and enabling pairing using a first-in, first-out (FIFO) strategy. In other embodiments, a pairing node (e.g., a BP pairing node) may be configured to simulate other pairing strategies.
[0028] Figure 1BA second example communication system 100B is shown. Figure 1B As shown, the communication system 100B may include one or more agent endpoints 151A, 151B and one or more contact endpoints 152A, 152B. The agent endpoints 151A, 151B may include an agent terminal and / or an agent computing device (e.g., a laptop computer, a cellular phone). The contact endpoints 151A, 151B may include a contact terminal and / or a contact computing device (e.g., a laptop computer, a cellular phone). The agent endpoints 151A, 151B and / or the contact endpoints 152A, 152B may be connected to a contact center as a service (CCaaS) 170 via the Internet or a public switched telephone network (PSTN) according to the capabilities of the endpoint devices.
[0029] Figure 1C An example communication system 100C is shown with an example configuration of a CcaaS 170. For example, the CCaaS 170 may include multiple data centers 180A, 180B. The data centers 180A, 180B may be physically separated, even in different countries and / or continents. The data centers 180A, 180B may communicate with each other. For example, one data center is a backup for another data center; therefore, in some embodiments, only one data center 180A or 180B receives the agent endpoints 151A, 151B and the contact endpoints 152A, 152B at a time.
[0030] Each data center 180A, 180B includes a web demilitarized zone (DMZ) device 171A and 171B, respectively, which is configured to receive agent endpoints 151A, 151B and contact endpoints 152A, 152B, which are communicatively connected to CCaaS via the Internet. The DMZ devices 171A and 171B can operate outside the firewall to connect with the agent endpoints 151A, 151 B and the contact endpoints 152A, 152B, while the remaining components of the data center 180A, 180B can be within the firewall (except for the phone DMZ devices 172A, 172 B, which can also be outside the firewall). Similarly, each data center 180A, 180B includes a phone DMZ device 172A and 172B, respectively, which is configured to receive agent endpoints 151A, 151B and contact endpoints 152A, 152B, which are communicatively connected to CCaaS via the PSTN. The phone DMZ devices 172A and 172B may operate outside of a firewall to connect with the agent endpoints 151A, 151B and contact endpoints 152A, 152B, while the remainder of the data center 180A, 180B (excluding the web DMZ devices 171A, 171B) may be within the firewall.
[0031] In addition, each data center 180A, 180B may include one or more nodes 173A, 173B and 173C, 173D, respectively. All nodes 173A, 173B and 173C, 173D may communicate with web DMZ devices 171A and 171B, respectively, and with phone DMZ devices 172A and 172B. In some embodiments, only one node in each data center 180A, 180B may communicate with web DMZ devices 171A, 171B and with phone DMZ devices 172A, 172B at a time.
[0032] Each node 173A, 173B, 173C, 173D may have one or more pairing modules 174A, 174B, 174C, 174D, respectively. Similar to the pairing module 140 of the communication system 100A of FIG. 1 , the pairing modules 174A, 174B, 174C, 174D may pair contacts to agents. For example, the pairing modules may alternate between enabling pairing via a behavioral pairing (BP) module and enabling pairing using a first-in, first-out (FIFO) module. In other embodiments, a pairing module (e.g., a BP module) may be configured to emulate other pairing strategies.
[0033] Now go to Figure 1D , the disclosed CCaaS communication system (eg, Figure 1B and / or Figure 1C ) can support multi-tenancy so that multiple contact centers (or contact center operations or enterprises) can operate on a shared environment. That is, multiple tenants, each with its own non-overlapping set of agents, can be handled by the disclosed CCaaS communication system, where each agent only interacts with contacts of a single tenant. CcaaS 170 is shown in FIG. 1D as including two tenants 190A and 190B. Back Figure 1C For example, multi-tenancy may be supported by node 173A supporting tenant 190A, while node 173B supports 190B. In another embodiment, data center 180A supports tenant 190A, while data center 180B supports tenant 190B. In another example, multi-tenancy may be supported by shared machines or shared virtual machines; thus, both tenants 190A and 190B may be supported at node 173A, and similarly for nodes 173B, 173C, and 173D.
[0034] In other embodiments, the system may be configured for a single tenant within a dedicated environment such as a dedicated machine or dedicated virtual machine. In other embodiments, the system may be configured for multiple tenants on the premises of a business process outsourcing (BPO) or other service provider.
[0035] Contact centers typically have several services operating within a computer node at any time, competing for processing power and bandwidth. Each service may have a private portion of memory allocated to it, and these services conventionally pass objects or pieces of information from service to service through the kernel of a conventional operating system. This is a slow process due to the time constraints of (1) copying objects or other data through conventional data replication techniques, and (2) requiring additional processing power for kernel-based operations, such as running additional checks to protect each service's individual memory allocation and multitasking overhead. For larger contact center systems, the kernel becomes increasingly overloaded, quickly reaching capacity and / or throughput limits and creating other bottlenecks within the system. As a result, conventional communication systems are low fault-tolerant systems. For example, a microservice may not receive an object at a time when the microservice needs to perform an action on the object (e.g., update state, append additional details, link to another object, establish a connection, etc.). This failure to receive an object results in a stall and may even force the microservice to restart if the wait time is long enough. Thus, conventional microservices rely on the speed of other microservices; or otherwise require the use of locking techniques and suffer from race conditions with other microservices, further limiting the capacity and / or throughput of the system to manage these types of overhead.
[0036] Furthermore, competition between microservices and the time efficiency constraints of conventional contact center node architectures limits the capacity of conventional contact centers.
[0037] The present disclosure newly provides systems and methods for applying a shared memory node architecture used in a contact center system as discussed herein. The systems and methods discussed herein provide a contact center with greatly increased speed, efficiency, processing power, and bandwidth. For example, where a conventional contact center typically handles less than 12 calls per second and has less than 1,000 callers or total agent capacity at the contact center system, the systems and methods of the present disclosure provide a contact center with a capacity of 100 or more calls per second, and a total capacity of more than 100,000 callers or agents.
[0038] Figure 2 An example paired node 200 (eg, Figure 1A L3 partner node 140 or Figure 1BThe nodes 173A, 173B, 173C, 173D of the pairing node 200 may be implemented using the pairing node 200). In the illustrated embodiment, the pairing node 200 includes a physical memory 210 (e.g., random access memory RAM), such as a dynamic RAM (DRAM) or a static RAM (SRAM) for storing contact center information, which identifies: (i) a set of contact identifiers (IDs) associated with contacts available for pairing (i.e., contacts waiting to be connected to an agent) and (ii) a set of agent IDs associated with agents available for pairing. In some embodiments, the contact center information includes: i) for each contact ID, metadata of the contact associated with the contact ID (the metadata may include status information indicating whether the contact is available (i.e., waiting for pairing), a score assigned to the contact, and / or information about the contact) and ii) for each agent ID, metadata of the agent associated with the agent ID (the metadata may include status information indicating whether the agent is available, a score assigned to the agent, and / or information about the agent).
[0039] Exemplary information about contacts and / or agents that may be stored in memory 210 and associated with contact IDs or agent IDs includes: attributes, arrival times, hold times or other duration data, estimated wait times, historical contact-agent interaction data, agent percentiles, contact percentiles, states (e.g., “available” when a contact or agent is waiting to be paired, “abandoned” when a contact is disconnected from the contact center, “connected” when a contact is connected to an agent or an agent is connected to a contact, “completed” when a contact has completed an interaction with an agent, “unavailable” when an agent is disconnected from the contact center), and patterns associated with agents and / or contacts.
[0040] The paired node 200 also includes several modules (software and / or hardware components) (e.g., microservices), including a contact detector 202 and an agent detector 204. The contact detector 202 is operable to detect available contacts (e.g., the contact detector 202 may communicate with a switch that signals the contact detector 202 whenever a new contact calls the contact center), and immediately in response to detecting an available contact, store at least a contact ID associated with the detected contact in the memory 210 (the above metadata may also be stored in association with the contact ID). Similarly, the agent detector 204 is operable to detect when an agent becomes available, and immediately in response to detecting that an agent becomes available, store at least an agent identifier uniquely associated with the detected agent in the memory 210 (metadata about the identified agent may also be stored in association with the agent ID). In this way, once a contact / agent becomes available, the memory 210 will be updated to include the corresponding contact / agent identifier and status information indicating that the contact / agent is available. Thus, at any given point in time, the memory 210 will contain a set of zero or more contact identifiers, each of which is associated with a different contact waiting to be connected to an agent, and a set of zero or more agent identifiers, each of which is associated with a different available agent.
[0041] The pairing node 200 also includes other modules (e.g., microservices), including: (i) a contact / agent (C / A) batch selector 220, which is used to identify (e.g., based on state information) a set of available contacts and agents for pairing, and once the contacts and agents are selected for pairing, provide state updates (i.e., modify state information) for the contacts and agents; and (ii) a C / A pairing evaluator 221, which is used to evaluate information associated with available contacts and information associated with available agents in order to propose contact-agent pairings. Figure 2 As shown, the C / A batch selector 220 communicates with the memory 210, and can thereby read the contact center information stored therein (e.g., a set of contact IDs, each of which identifies an available contact and a set of agent IDs, each of which identifies an available agent) from the memory 210. In one embodiment, the C / A batch selector 220 is configured to occasionally (e.g., periodically) read the memory 210 to obtain a list of available contacts and available agents based on the states associated with the agents and contacts listed in the memory 210. In addition, the C / A batch selector 220 contacts the C / A pairing evaluator 221, and after obtaining the list of available contacts and available agents, the C / A batch selector 220 can send the list to the C / A pairing evaluator 221 (e.g., send the contact ID and the agent ID to the C / A pairing evaluator 221).
[0042] After the C / A pairing evaluator 221 receives the set of contact IDs and agent IDs from the C / A batch selector 220, the C / A pairing evaluator 221 may read further information about the received contact IDs and agent IDs from the memory 210. The C / A pairing evaluator 221 uses the read information to identify and propose an agent-contact pairing for the received contact IDs and agent IDs based on a pairing strategy, which may result in no contact / agent pairing, a single contact / agent pairing, or multiple contact-agent pairings depending on the pairing strategy used and the available contacts and agents.
[0043] Upon identifying a contact / agent pairing, the C / A pairing evaluator 221 sends the set of contact / agent pairs to the batch selector 220. The C / A batch selector 220 provides the set of contact / agent pairs to the contact / agent connector 222 (e.g., if the contact associated with contact ID C12 is paired with the agent associated with agent ID A7, the C / A batch selector 220 provides these contact / agent IDs to the contact / agent connector 222). If the pairing process results in one or more contact / agent pairs, then for each contact / agent pairing, the C / A batch selector 220 sends an updated state associated with each contact ID and each agent ID in the one or more contact / agent pairs to the memory 210, which is then associated with each contact ID and agent ID. The memory 210 then retains the contact ID and agent ID for future analysis.
[0044] The contact / agent connector 222 is used to connect the identified agent with the paired identified contact. In addition, the C / A connector 222 sends the updated state associated with each contact ID and each agent ID in one or more contact / agent pairs to the memory 210, which is then associated with each contact ID and agent ID.
[0045] Thus, in one embodiment, the paired node 200 provides an asynchronous polling process, wherein the memory 210 provides a central repository that is read and updated by the contact detector 202, the seat detector 204, the C / A batch selector 220, the C / A pairing evaluator 221, and the C / A connector 222. Thus, the objects of each agent and contact do not need to be moved or copied among the microservices of the paired node 200; instead, the identifier associated with the object is transmitted or shared among the contact detector 202, the seat detector 204, the memory 210, the C / A batch selector 220, the C / A pairing evaluator 221, and the C / A connector 222, and the object remains in a location within the memory 210 that is shared and accessible to each microservice without relying on the operating system kernel to facilitate data replication among the microservices. This process saves bandwidth, processing power, and memory associated with each microservice, and is more advantageous than conventional event-based paired nodes.
[0046] Figure 3 A general node 300 of a communication system according to an embodiment is shown. In the illustrated embodiment, the node 300 includes modules (e.g., microservices) within the memory 210 and a shared memory segment (SHM) 310. Specifically, in the illustrated example, the node 300 includes three microservices: MS1, MS2, and MS3. Each microservice includes a shared memory submodule 302 (also referred to as a shared memory library (SHM_lib)) that implements the microservice contained therein to read from and write to the SHM 310. In one embodiment, each microservice is contained in its own container (e.g., Docker ® container). In one embodiment, one or more of the modules of the node 200 (e.g., the evaluator 221, the batch selector 220, etc.) include an instance of SHM_lib302. In some embodiments, each microservice is trusted to operate on the shared memory segment 310 through the functionality of SHM_lib302, thereby eliminating the need for the operating system kernel to manage memory protection among different microservices. In addition, each microservice can be developed and maintained more efficiently because any complexity of operating on the shared memory segment 310 is implemented and managed by the SHM_lib302 of each microservice.
[0047] Figure 4 is a flow chart illustrating a process 400 performed by one or more modules of the node 200 or 300 according to an embodiment. The process 400 may start at step s402.
[0048] Step s402 includes the module obtaining a shared memory key and a shared memory segment size value. For example, in one embodiment, the module obtains the key by reading a predefined configuration file containing the key and the size value. The key can be any arbitrary integer value. Each module of the node 200 / 300 can have the same configuration information so that each module will obtain the same key.
[0049] Step s404 includes the module obtaining a shared memory segment identifier (smhid) associated with the shared memory key. For example, in one embodiment, the module calls a shmget function with the key as a first argument to the function and a size value as a second argument to the function. Calling the shmget function will return a shmid and create the shared memory segment if it does not already exist.
[0050] Step s406 includes the module attaching itself to the shared memory segment. For example, the module may call the shmat function with shmid as an argument to the function. The shmat function attaches the shared memory segment associated with the shared memory identifier specified by shmid to the address space of the calling process (ie, module).
[0051] Figure 5 is a flow chart illustrating a process 500 for creating an object in the SHM 310, performed by a module of the node 200 or 300, according to an embodiment. The process 500 may start at step s502.
[0052] Step s502 includes the module passing a create object instruction to lib 302, wherein the create object instruction is associated with a specific memory size. For example, step s502 may include the module calling a create object function provided by lib 302, wherein one of the arguments to the function is a size value.
[0053] Step s504 includes lib 302 determining whether the length of a circular list of a size corresponding to the memory size associated with the create object instruction request is longer than a predetermined length. A circular list is a data structure (e.g., an array or a linked list) for storing a collection of memory addresses, wherein each memory address points to a memory block that has been "circulated" (i.e., the memory block is freely writable). In some embodiments, the use of circular lists reduces or eliminates the need to use the kernel for additional memory allocation, de-allocation, garbage collection, defragmentation, and other memory management, and the use of circular lists also reduces the need for lib 302 to delete, collect, or defragment reusable memory blocks. The use of circular lists also reduces the need to thrash, lock, or otherwise manage contention conditions, and improves fault tolerance within the system by controlling how quickly individual blocks of memory become available for reuse of new objects or other data.
[0054] In one embodiment, a set of size values is defined (e.g., the set may include the following values 10, 15, 20, 30, 50, values 16, 32, 64, 128, 256, etc.), and a circular list may be created for each size value in the set. Thus, if the set of values consists of five values, five circular lists may be created, one for each size value. Additionally, in some embodiments, each size value is associated with a different memory block within the SHM 310, and a memory block associated with a certain size value may include a data structure including an IE storage value (i.e., a pointer) specifying a memory location in the SHM 310 where at least a portion of the circular list (e.g., the head or front of the circular list) is stored; additionally, the data structure may include a second IE storing a second pointer pointing to the tail or back of the circular list and a third IE storing a value specifying the number of items (i.e., the length) of the circular list.
[0055] For example, step s504 includes lib 302 determining the length of the circular list (e.g., the number of memory addresses stored in the list), and then comparing the determined length with a predefined threshold. If the determined length is greater than the threshold, the process proceeds to step s508, otherwise the process proceeds to step s506.
[0056] In some embodiments, each memory size included in the set of memory sizes is associated with a threshold value (e.g., the threshold value may be different for different memory sizes). Each such threshold value can be determined based on historical data of the size value associated with the threshold value. Historical data about the size value may include: the average length of use of the memory block of the size indicated by the size value, how statically such memory blocks are used, and how many modules access such memory blocks. Typically, it is expected that larger memory blocks are typically static and not used by many modules, while smaller objects are more dynamic and are typically shared. Therefore, a small size value is expected to have a threshold value greater than a larger size value.
[0057] Step s508 includes lib 302 obtaining a memory address stored in a circular list and then removing the memory address from the list. For example, in the case of a circular list implemented using a linked list, step s508 may include lib 302 obtaining a memory address from the current head of the linked list and "removing" the current head from the list so that the block immediately after the current head becomes the new head of the list. In one embodiment, lib 302 "removes" the current head by storing a next block pointer contained in the current head of the list in a memory block associated with a size value, the next block pointer being the memory address of the next block in the list.
[0058] Step s510 includes lib 302 storing the object in a memory block of SHM 310 corresponding to the obtained memory address or reserving the memory block. For example, step s510 includes lib 302 creating the object indicated by MS1 using the memory block of SHM 310 corresponding to the obtained memory address.
[0059] Step s506 includes lib 302 determining whether SHM 310 has sufficient memory space available to implement the create object instruction. If SHM 310 has sufficient memory space available to implement the create object instruction, the process proceeds to step s514, otherwise the process proceeds to step s512.
[0060] Step s514 includes lib 302 obtaining a free memory block within SHM 310 and storing the object in the obtained memory block or reserving the memory block. In either case, the memory block will no longer be a "free" memory block. For example, step s514 includes lib 302 using the obtained or reserved memory block to create the object indicated by MS1.
[0061] Step s512 includes executing the process of process 600, as further described below.
[0062] Therefore, process 500 provides a resource efficient method for allocating memory blocks to microservices, and this efficiency provides certain advantages in the contact center system. As shown in node 200, many microservices can operate on the same object in memory at the same time or nearly at the same time. Process 500 provides that a first microservice can delete an object (e.g., as discussed in process 700 below) even if a second microservice is still operating on the object, because the object will remain in the shared memory (although at the end of the circular list) for the second microservice to read, write, update state information, etc. The fact that no other microservice will use the changes made to the shared memory by the second microservice is not important, because each microservice can perform their tasks as expected, reducing the overhead from lock or other competition condition management, increasing speed, and improving fault tolerance.
[0063] In contrast, in a conventional contact center node, if multiple microservices use a required object, and the object is deleted by a first microservice before being sent to a second microservice, the second microservice will experience data corruption, stalling as the second microservice waits for the object that will never be sent, and in the worst case, experience a microservice module failure requiring a microservice restart. Thus, process 500 minimizes any microservice restarts and increases the operating speed of the contact center node.
[0064] Figure 6is a flow chart illustrating process 600. Process 600 may begin at step s602.
[0065] Step s602 includes lib 302 determining whether a first loop list length corresponding to a first size greater than the memory size requested by the create object instruction is longer than a first predetermined length. For example, step s602 includes lib 302 determining the length of the loop list (e.g., the number of memory addresses stored in the list), and then comparing the determined length to a predefined threshold associated with the memory size of the loop list. If the first loop list length is longer than the first predetermined length, the process proceeds to step s610, otherwise the process proceeds to step s604.
[0066] Step s604 includes lib 302 determining whether a second circular list length corresponding to a second size of memory size greater than the first size is longer than a second predetermined length. If the second circular list length is longer than the second predetermined length, the process proceeds to step s610, otherwise the process proceeds to step s606.
[0067] For example, step s604 may be repeated for progressively larger list sizes until the process reaches an "nth" list size. Step s606 includes the lib 302 determining whether the nth circular list length for the nth size corresponding to a memory size greater than the previous size is longer than the nth predetermined length. When the nth circular list length is longer than the nth predetermined length, the process proceeds to step s610.
[0068] Step s610 includes lib 302 obtaining a memory address stored in a circular list (eg, a circular list that is longer than its associated predetermined length according to any one of steps s602, s604, and s606), and then removing the memory address from the list.
[0069] Step s612 includes lib 302 storing the object in a memory block of SHM 310 corresponding to the obtained memory address or reserving the memory block. In either case, the memory block will no longer be a "free" memory block.
[0070] Figure 7 is a flow chart illustrating a process 700 performed by a module of a node 200 or 300 for deleting an object in a SHM 310 according to an embodiment. The process 700 may start at step s702.
[0071] Step s702 includes the module passing a delete object instruction to lib 302, wherein the delete object instruction is associated with a specific memory block and memory size. For example, step s702 may include the module calling a delete object function provided by lib 302, wherein one of the arguments to the function is an object identifier (ID) identifying the object to be deleted, and lib 302 maintains a mapping (e.g., a table) that maps the object ID to (i) a memory address (also called a pointer) of a memory block specifying the storage object and (ii) a memory size. For example, step s702 may include the module calling a delete object function provided by lib 302, wherein one of the arguments to the function is a memory address associated with the object to be deleted.
[0072] Step s704 includes lib 302 determining the "tail" of the circular list corresponding to the size of the particular memory block / space allocation. For example, the "tail" may be the end of a linked list, the end of a data structure, etc.
[0073] Step s706 includes lib 302 storing a pointer to the memory block containing the object to be deleted in the circular list. For example, in one embodiment using a linked list to implement the circular list, step s708 includes: (i) obtaining a pointer to a free memory block; (ii) storing a data structure including a pointer to the memory block containing the object to be deleted in the free memory block; (iii) modifying the current tail of the circular list by storing a pointer to the free memory block in the current tail, thereby making the free memory block the new tail of the linked list; and (iv) incrementing a length value specifying the length of the circular list (as described above, the length value can be stored in the head of the circular list). In some embodiments, a first module within a node (e.g., MS1) can communicate with a second module within a node (e.g., MS2) via its corresponding list 302 and SHM 310.
[0074] That is, the object is not deleted, and other microservices can still operate on the object while the object is associated with the circular list. In one embodiment, storing the pointer in the circular list includes storing a data structure including a pointer to the memory block containing the object to be deleted in a free memory block. The data structure may also include a pointer to the next block in the circular list (if any).
[0075] For example, when MS1 has a message to send to MS2, MS1 may provide its lib 302a with a send message instruction containing the message to send and a certain channel identifier (CID) associated with a certain message queue in a shared memory (e.g., shared memory 310) that is monitored by MS2. The CID may be any arbitrary value.
[0076] When lib 302 receives the instruction, lib 302 uses the CID to locate the back (i.e., tail) of the message queue associated with the CID. For example, in one embodiment, a predefined memory block in SHM 310 is allocated for the CID, and the predefined memory block stores a tail pointer pointing to the tail of the message queue. The predefined memory block can also store a head pointer pointing to the head of the message queue.
[0077] After locating the back of the message queue, lib 302 adds the message to the free memory block and updates the tail pointer so that the tail pointer points to the memory block storing the message, thereby making the message the last message in the queue. In addition, in an embodiment where a linked list is used to implement a message queue, lib 302 can modify the memory block previously at the back of the message queue so that the memory block includes a next block pointer to the memory block storing the message.
[0078] The lib 302 of MS2 can monitor the message queue assigned to the CID to determine when a message is added. For example, as described above, a specific memory block in the SHM 310 can be assigned to the CID, and the lib 320 of MS2 can periodically read the memory block to see if the memory block has been updated. In one example, when the message queue changes from an empty state (no message in the queue) to a non-empty state (one or more messages in the queue), the memory block changes from a state where the memory block indicates that there are no messages in the queue to a state where the memory block indicates one or more messages in the queue (for example, the head pointer can be from a zero (0) value indicating an empty queue to a positive value indicating at least one message in the queue). In another example, the lib 320 of MS2 can periodically read the first message at the head of the message queue.
[0079] In another example, the lib 320 of MS2 reads the first message at the head of the message queue in response to a "read message at the head of the message queue" instruction from MS2 associated with the CID of the message queue. For example, MS2 can copy or reproduce the message into a personal buffer or memory space associated with MS2, and then pass the "message read complete" instruction to the lib 320 of MS2. Receiving the "message read complete" instruction causes MS2 to delete the message according to process 700. In other examples, in the case where MS2 does not copy the message into a personal buffer or memory space, MS2 can still send the "message read complete" instruction to the lib 320 of MS2. In the same manner, MS2 can send a message to MS1 using the CID associated with a certain message queue monitored by MS1.
[0080] In some embodiments, a module (MS1) can send a message to a group of modules. For example, in one embodiment, a certain CID is associated with a message queue monitored by each module in the group. Therefore, in order to send a message to a group, MS1 only needs to provide its lib 302a with a send message instruction containing the message to be sent and a certain CID, because this will cause the lib to add the message to the message queue associated with the certain CID. When the lib 302 adds the message to the message queue, the lib can initialize the counter to a value (e.g., zero). Whenever another lib accesses the message for the first time, the lib 302 increments the counter. When the value of the counter reaches the number of modules in the group, it means that all intended recipients have accessed the message, and the message can be removed from the queue, and the memory block containing the message can be added to a circular list associated with the size of the memory block. In other examples, the counter is initialized to a number of modules in the group, and then the counter is reduced each time the recipient accesses the message until the value of the counter reaches zero; the message can then be removed from the queue, and the memory block containing the message can be added to a circular list associated with the size of the memory block.
[0081] Figure 8 is a flow chart illustrating a process 800 performed in a contact center system including multiple services (containers, virtual machines) configured to operate using shared memory according to an embodiment. Process 800 may begin at step s802. Step s802 includes storing a caller state object in an allocated portion of the shared memory (i.e., a free memory block within the shared memory) by a first service in a first container when a caller arrives. Step s804 includes, after the caller is placed on hold, managing the caller by a second service in a second container by reading and updating the caller state object in the allocated portion of the shared memory. Step s806 includes connecting the caller to an agent by reading and updating the caller state object.
[0082] Fig. 9 s is a flow chart illustrating a process 900 according to an embodiment. The process 900 may begin at step s902. Step s902 includes storing first circular list information about a first circular list associated with a first memory block size in a shared memory segment. Step s904 includes storing second circular list information about a second circular list in the shared memory segment, the second circular list being associated with a second memory block size that is greater than the first memory block size. Step s906 includes managing allocation of memory within the shared memory segment using the first and second circular lists.
[0083] Fig.10 1 is a block diagram of a node 1000 according to some embodiments. The node 1000 may be an active node or a standby node. Fig.10 As shown, the node 1000 may include: a processing circuit system (PC) 1002, which may include one or more processors (P) 1055 (e.g., one or more general-purpose microprocessors and / or one or more other processors, such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), etc.), which may be located in a single housing or in a single data center, or may be geographically distributed (i.e., the node 1000 may be a distributed computing device); at least one network interface 1049 (e.g., a physical interface or an air interface), including a transmitter (Tx) 1045 and a receiver (Tx). A receiver (Rx) 1047 for enabling the node 1000 to send and receive data to and from other nodes connected to a network 110 (e.g., an Internet Protocol (IP) network), a network interface 1049 connected (physically or wirelessly) to the network 110 (e.g., the network interface 1049 may be coupled to an antenna arrangement including one or more antennas for enabling the node 1000 to wirelessly send / receive data); and a storage unit (also referred to as a "data storage system") 1009, which may include one or more non-volatile storage devices and / or one or more volatile storage devices. In an embodiment where the PC 1002 includes a programmable processor, a computer readable storage medium (CRSM) 1042 may be provided. The CRSM 1042 may store a computer program (CP) 1043 including computer readable instructions (CRI) 1044. The CRSM 1042 may be a non-transitory computer readable medium, such as a magnetic medium (e.g., a hard disk), an optical medium, a memory device (e.g., a random access memory, a flash memory), etc. In some embodiments, the CRI 1044 of the computer program 1043 is configured such that when executed by the PC 1002, the CRI causes the node 1000 to perform the steps described herein (e.g., the steps described herein with reference to the flowcharts). In other embodiments, the node 1000 may be configured to perform the steps described herein without requiring code. That is, for example, the PC 1002 may consist solely of one or more ASICs. Thus, the features of the embodiments described herein may be implemented in hardware and / or software.
[0084] Overview of Various Embodiments
[0085] A1. A contact center system, comprising: a node, the node comprising multiple modules (e.g., microservices), each module comprising a shared memory module (e.g., a shared memory library), wherein the shared memory module is configured to: obtain a shared memory key and a shared memory segment size value; use the shared memory key and the shared memory segment size value to obtain a shared memory segment identifier (smhid), the shared memory segment identifier identifying the shared memory segment; and use the shared memory segment identifier to attach to the shared memory segment, wherein, for each of a plurality of memory block sizes, the shared memory segment stores information about a circular list associated with the memory block size, and the plurality of memory block sizes include a first memory block size and a second memory block size larger than the first memory block size.
[0086] A2. The system of embodiment A1 wherein the contact center system is operable to receive at least 100 calls per second.
[0087] A3. A system according to embodiments A1 or A2, wherein the node is configured to: in response to an indication that one of the modules is requesting to create an object associated with the first memory block size, determine whether the circular list associated with the first memory block size has a length (L) that satisfies a condition (e.g., L>T1).
[0088] A4. A system according to embodiment A3, wherein the node is configured such that as a result of determining that L satisfies a condition, the node: obtains a memory address from a circular list associated with a first memory block size, wherein the memory address identifies a memory block, removes the memory address from the circular list, and creates an object using the memory block identified by the obtained memory address.
[0089] A5. The system of embodiment A3, wherein the node is further configured such that as a result of determining that L does not satisfy the condition, the node: determines whether a second circular list associated with the second memory block size has a length (L2) that satisfies the condition (eg, L2>T2).
[0090] A6. The system of any one of embodiments A1-A5, wherein the node is configured to: in response to an indication that one of the modules is requesting deletion of an object associated with the first memory block size, determine an end of the circular list associated with the first memory block size.
[0091] B1. A method in a contact center system, the contact center system comprising a plurality of services (containers, virtual machines), the plurality of services (containers, virtual machines) being configured to operate using a shared memory, the method comprising: upon a caller arriving, storing a caller state object in an allocated portion of the shared memory (i.e., a free memory block within the shared memory) by a first service in a first container; managing the caller by a second service in a second container after the caller is placed on hold by reading and updating the caller state object in the allocated portion of the shared memory; and connecting the caller to an agent by reading and updating the caller state object.
[0092] B2. The method of embodiment B1 further comprising: adding a pointer to the allocated portion of the shared memory to the circular list after the call is disconnected.
[0093] B3. A method according to embodiment B1 or B2, wherein storing the caller state object in the allocated portion of the shared memory includes: determining whether a circular list associated with a first memory block size has a length (L) that satisfies a condition (e.g., L>T1), the first memory block size being associated with the caller state object.
[0094] B4. The method according to embodiment B3 also includes, as a result of determining that L satisfies a condition: obtaining a memory address from a loop list, wherein the memory address identifies a memory block; removing the memory address from the loop list; and using the memory block identified by the obtained memory address to store a caller state object.
[0095] B5. The method of embodiment B3, further comprising, as a result of determining that L does not satisfy the condition: determining whether a second circular list associated with the second memory block size has a length (L2) that satisfies the condition (eg, L2>T2).
[0096] C1. A method comprising: storing first circular list information about a first circular list associated with a first memory block size in a shared memory segment; storing second circular list information about a second circular list in the shared memory segment, the second circular list being associated with a second memory block size that is larger than the first memory block size; and using the first and second circular lists to manage allocation of memory within the shared memory segment.
[0097] C2. A method according to embodiment C1, wherein using a first circular list and a second circular list to manage allocation of memory within a shared memory segment includes: in response to receiving an instruction to store or create a data object associated with a first memory block size, determining whether a length (L1) of the first circular list satisfies a condition (e.g., L1>T1); and as a result of determining that L1 satisfies the condition: obtaining a memory address from the first circular list, wherein the memory address identifies a memory block and removing the memory address from the first circular list; and using the memory block identified by the obtained memory address to store the data object.
[0098] C3. A method according to embodiment C1, wherein using a first circular list and a second circular list to manage allocation of memory within a shared memory segment includes: in response to receiving an instruction to store or create a data object associated with a first memory block size, determining whether a length (L1) of the first circular list satisfies a condition (e.g., L1>T1); and as a result of determining that L1 does not satisfy the condition, storing the data object in a free memory block.
[0099] C4. A method according to embodiment C1, wherein using a first circular list and a second circular list to manage allocation of memory within a shared memory segment includes: in response to receiving an instruction to store or create a data object associated with a first memory block size, determining whether a length (L1) of the first circular list satisfies a condition (e.g., L1>T1); and as a result of determining that L1 does not satisfy the condition, determining whether a length (L2) of the second circular list satisfies a condition (e.g., L2>T2).
[0100] D1. A computer program (1043) comprising instructions (1044) which, when executed by a processing circuit system (1002) of a node, cause the node to perform the method of any one of the above embodiments.
[0101] D2. A carrier embodying the computer program of embodiment D1, wherein the carrier is one of an electronic signal, an optical signal, a radio signal, and a computer-readable storage medium (1042).
[0102] E1. A node (1000) in a communication system, the node being configured to execute the method of any one of embodiments B1-B5 or C1-C4.
[0103] Although various embodiments are described herein, it should be understood that they are presented by way of example only and not limitation. Therefore, the breadth and scope of the present disclosure should not be limited by any of the above exemplary embodiments. In addition, unless otherwise specified herein or clearly contradictory to the context, any combination of the above elements in all possible variations thereof is encompassed by the present disclosure.
[0104] In addition, although the processes described above and shown in the accompanying drawings are shown as a series of steps, this is done for illustrative purposes only. Therefore, it is contemplated that some steps may be added, some steps may be omitted, the order of the steps may be rearranged, and some steps may be performed in parallel.
Claims
1. A contact center system (100A, 100B, 100C), comprising: A node (140, 173A, 173B, 173C, 173D, 200), the node comprising a plurality of modules (202, 204, 220, 221, 222), each module comprising a shared memory module (302), wherein the shared memory module is configured to: obtaining (s402) a shared memory key and a shared memory segment size value; obtaining (s404) a shared memory segment identifier smhid using the shared memory key and the shared memory segment size value, the shared memory segment identifier identifying a shared memory segment (310); and attaching (s406) to said shared memory segment using said shared memory segment identifier, in, For each of a plurality of memory block sizes, the shared memory segment stores information about a circular list associated with the memory block size, and The plurality of memory block sizes include a first memory block size and a second memory block size that is larger than the first memory block size.
2. The system according to claim 1, wherein: The contact center system is operable to receive at least 100 calls per second.
3. The system according to claim 1 or 2, wherein: The nodes are configured as: In response to an indication that one of the modules is requesting creation of an object associated with the first memory block size, it is determined whether a circular list associated with the first memory block size has a length L that satisfies a condition.
4. The system according to claim 3, wherein: The nodes are configured as: As a result of determining that L satisfies the condition, the node: obtaining a memory address from the circular list associated with the first memory block size, wherein the memory address identifies a memory block, removing the memory address from the circular list, and The object is created using the memory block identified by the obtained memory address.
5. The system according to claim 3, wherein: The node is also configured to: As a result of determining that L does not satisfy the condition, the node is caused to: determine whether a second circular list associated with the second memory block size has a length L2 that satisfies the condition.
6. The system according to any one of claims 1 to 5, wherein: The nodes are configured as: In response to an indication that one of the modules is requesting deletion of an object associated with the first memory block size, an end of a circular list associated with the first memory block size is determined.
7. A method (800) in a contact center system (100A, 100B, 100C), the contact center system comprising a plurality of services (202, 204, 220, 221, 222) configured to operate using a shared memory (310), the method comprising: Upon arrival of a caller, a caller state object is stored (s802) by a first service in a first container in an allocated portion of the shared memory; managing (s804) the caller by a second service in a second container by reading and updating the caller state object in the allocated portion of the shared memory after the caller is placed on hold; as well as The caller is connected (s806) to an agent by reading and updating the caller state object.
8. The method according to claim 7, further comprising: After the call is disconnected, a pointer to the allocated portion of the shared memory is added to a circular list.
9. The method according to claim 7 or 8, wherein: Storing the caller state object in the allocated portion of the shared memory comprises: A determination is made as to whether a circular list associated with a first memory block size associated with the caller state object has a length L that satisfies a condition.
10. The method according to claim 9, further comprising as a result of determining that L satisfies the condition: A memory address is obtained from the circular list, wherein: The memory address identifies a memory block; removing the memory address from the circular list; as well as The caller state object is stored using a memory block identified by the obtained memory address.
11. The method according to claim 9, further comprising: As a result of determining that L does not satisfy the condition, it is determined whether a second circular list associated with the second memory block size has a length L2 that satisfies the condition.
12. A method (900) comprising: storing (s902) first circular list information about a first circular list associated with a first memory block size in the shared memory segment; storing (s904) in the shared memory segment second circular list information about a second circular list associated with a second memory block size that is larger than the first memory block size; as well as The first circular list and the second circular list are used (906) to manage allocation of memory within the shared memory segment.
13. The method according to claim 12, wherein: Managing allocation of memory within the shared memory segment using the first circular list and the second circular list includes: In response to receiving an instruction to store or create a data object associated with the first memory block size, determining whether a length L1 of the first circular list satisfies a condition; and As a result of determining that L1 satisfies the condition: obtaining a memory address from the first circular list, wherein the memory address identifies a memory block and removing the memory address from the first circular list; and The data object is stored using the memory block identified by the obtained memory address.
14. The method according to claim 12, wherein: Managing the allocation of memory within the shared memory segment using the first circular list and the second circular list includes: In response to receiving an instruction to store or create a data object associated with the first memory block size, determining whether the length L1 of the first circular list satisfies a condition; and As a result of determining that L1 does not satisfy the condition, the data object is stored in a free memory block.
15. The method according to claim 12, wherein: Managing the allocation of memory within the shared memory segment using the first circular list and the second circular list includes: In response to receiving an instruction to store or create a data object associated with the first memory block size, determining whether the length (L1) of the first circular list satisfies a condition; and As a result of determining that L1 does not satisfy the condition, it is determined whether the length L2 of the second circular list satisfies the condition.
16. A computer program (1043) comprising instructions (1044) which, when executed by processing circuitry (1002) of a node (1000), cause the node to perform the method according to any of the preceding claims.
17. A carrier comprising a computer program according to claim 16, wherein: The carrier is one of an electronic signal, an optical signal, a radio signal, and a computer-readable storage medium (1042).
18. A node (1000) in a communication system, the node being configured to perform the method according to any one of claims 7-15.