Outbound call activity scheduling control method and equipment based on IPPBX (Internet Protocol Private Branch Exchange), and medium

By initializing the cache and database in the IPPBX system, controlling the scheduler execution module using refresh identifiers and stop identifiers, and combining timers to achieve precise scheduling of activities, the problems of scheduling conflicts and system crashes in the IPPBX system are solved, and the flexibility and reliability of the system are improved.

CN120390054AActive Publication Date: 2025-07-29XIAMEN XINGZONG DIGITAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510885909.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-07-29
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

Traditional IPPBX systems lack flexible state awareness and resource adaptation mechanisms in the call center automation platform, resulting in scheduling conflicts and system crashes, especially when license state changes, temporary activities stop, or concurrent resource competition is prone to problems.

Method used

The outgoing call activity scheduling control method based on IPPBX is adopted. By initializing the cache and database after IPPBX is started, the scheduler execution module is controlled using refresh identifiers and stop identifiers, and precise scheduling of activities is achieved in combination with timers, and the subscription status is monitored to avoid illegal execution.

Benefits of technology

It realizes efficient registration of active states, state change perception and scheduling execution robustness, avoids scheduling conflicts, improves system flexibility and reliability, and saves resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120390054A_ABST
    Figure CN120390054A_ABST
Patent Text Reader

Abstract

The invention relates to an IPPBX (Internet Protocol Private Branch Exchange)-based outbound call activity scheduling control method, equipment and a medium. The method comprises the following steps: executing an initialization operation after the IPPBX is started; when an activity starting instruction is received, registering all activities in the validity period in the database to a cache; constructing a refreshing identifier and a stopping identifier; the refresh identifier is used for controlling time refresh of a time point which should be triggered last time in the scheduler execution module and judging whether the scheduler execution module runs or not; the stop identifier is used for controlling the scheduler execution module to stop. According to the method, registration of the active state, state change perception and scheduling execution and recovery control are realized, and the method has the characteristics of high efficiency, high robustness and easiness in maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer software, and particularly to an outbound activity scheduling and control method, device, and medium based on IPPBX. Background Art

[0002] In the call center automation platform of the IPPBX system, there are a large number of activity tasks that need to start and end at regular intervals. Traditional systems usually rely on external schedulers (such as Cron) or complex task queue systems for control, lacking flexible state awareness and resource adaptation mechanisms. Especially when the License status changes, the activity is temporarily stopped, or there is concurrent resource contention, problems such as scheduling conflicts or system crashes are likely to occur. Summary of the Invention

[0003] To solve the above problems, the present invention proposes an outbound activity scheduling and control method, device, and medium based on IPPBX.

[0004] The specific solutions are as follows: An outbound activity scheduling and control method based on IPPBX, comprising the following steps: After the IPPBX is started, perform the following initialization operations: clear all activities in the cache; correct the status of all activities in the database that are in the valid period and in a non-compliant status; construct a refresh flag and a stop flag, and initialize them to nil; When a start activity instruction is received, register all activities in the database that are in the valid period to the cache, and the registration content includes the unique code, status, start time, and end time of each activity; Judge whether the scheduler execution module is running by whether the refresh flag is nil; if not running, initialize the scheduler execution module, and declare a space with a length of 1 for both the refresh flag and the stop flag during this initialization process; if running, assign a value to the refresh flag; After the scheduler execution module receives the signal of the refresh flag assignment, clear the assignment of the refresh flag, and perform the following operations: calculate the time point that should be triggered most recently according to the start time and end time of all activities in the cache; use a timer to time according to this most recently triggered time point, and trigger the operation on the corresponding activity when the timing ends; When it is necessary to stop the scheduler execution module, assign a value to the stop flag; when receiving the signal of the stop flag assignment, directly stop the operation of the scheduler execution module, and restore the refresh flag and the stop flag to nil.

[0005] Further, when receiving an instruction to delete an active event within its validity period, perform the following operations: Determine whether the scheduler execution module is running through the refresh flag; if not, directly delete the corresponding event in the database and cache; if it is running, after deleting the corresponding event in the database and cache, assign a value to the refresh flag.

[0006] Further, when receiving an instruction to add a new event, perform the following operations: Determine whether the scheduler execution module is running through the refresh flag; if not, store the new event in the database and register it in the cache; if it is running, after registering the new event in the cache, assign a value to the refresh flag.

[0007] Further, when receiving an instruction to end all events, perform the following operations: Determine whether the scheduler execution module is running through the refresh flag; if not, directly return; if it is running, perform the operation to stop the scheduler execution module.

[0008] Further, it also includes: Real-time monitoring of whether the subscription has expired, and if it has expired, perform the operation to stop the scheduler execution module.

[0009] Further, the states include import, waiting, running, paused, and ended.

[0010] Further, the method for correcting the state of an event in a non-compliant state includes: Modifying the import state to the waiting state, and modifying the running and waiting states to the paused state.

[0011] An outbound call activity scheduling control terminal device based on an IPPBX includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method in the above embodiments of the present invention.

[0012] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method in the above embodiments of the present invention.

[0013] The present invention adopts the above technical solutions, realizing the registration of event states, perception of state changes, scheduling execution, and recovery control, and having the characteristics of high efficiency, strong robustness, and easy maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The flowchart of the method in Embodiment 1 of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0015] To further illustrate each embodiment, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, those of ordinary skill in the art should be able to understand other possible embodiments and the advantages of the present invention.

[0016] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0017] Embodiment 1: The embodiment of the present invention provides an outbound activity scheduling control method based on IPPBX, as Figure 1 shown, the method includes the following steps: S1: After the IPPBX is started, perform the following initialization operations: clear all activities in the cache; correct the status of all activities that are in the valid period and in a non-compliant status in the database; construct a refresh flag and a stop flag, and initialize them to nil (empty).

[0018] The activities in this embodiment are stored in the form of a structure in the memory cache (such as Map[int32]*CampaignTask), and the corresponding fields include: unique code (id), status (Status), start time (StartTime), and end time (EndTime), where the status includes: import, wait, running, pause, and end. Import is the status during the process of importing the activity into the database, wait is the status when waiting for the activity to start running, running is the status when the activity is running, pause is the status when the activity is paused after running, and end is the status after the activity has finished running. It should be noted that the start time is the time when the status changes to running (i.e., the activity starts running), and the end time is the time when the status changes to end (the activity has finished running).

[0019] An activity in the valid period is an activity whose end time is later than the current time.

[0020] The non-compliant status means that the actual status of the activity is inconsistent with the status recorded in the database. For example, when the IPPBX is forced to shut down halfway through the running of the activity, the status of the activity that is currently running should be paused, but the status stored in the database is still running. Due to the inconsistent status, it is necessary to correct it. In this embodiment, the method for correcting the status of activities in the non-compliant status includes: changing the import status to the wait status, and changing the running and wait statuses to the pause status.

[0021] In this embodiment, both the refresh flag refreshChannel and the stop flag stopChannel have three states: initially nil; when the scheduler execution module is running, declare a space of length 1 for them; assign values to them at a specific moment, that is, write a random number into the space of length 1.

[0022] The refresh flag is used to control the time refresh of the time point that should be triggered most recently in the scheduler execution module and to determine whether the scheduler execution module is running; the stop flag is used to control the stop of the scheduler execution module.

[0023] S2: When the start activity instruction is received, register all the activities in the database that are within the validity period into the cache.

[0024] The start activity instruction and each of the following instructions can be sent by clicking a button in the interface.

[0025] S3: Determine whether the scheduler execution module is running by whether the refresh flag is nil (not being nil means it is running); if it is not running, initialize the scheduler execution module, and declare a space of length 1 for both the refresh flag and the stop flag during this initialization process; if it is running, assign a value to the refresh flag.

[0026] After the scheduler execution module receives the signal of the refresh flag assignment, clear the assignment of the refresh flag (retain the space of length 1), and perform the following operations: calculate the time point that should be triggered most recently according to the start time and end time of all activities in the cache; use a timer to time according to this time point that should be triggered most recently, and trigger the operation on the corresponding activity when the timing ends.

[0027] In this embodiment, the scheduler execution module is implemented by the run function. When the scheduler execution module executes, its internal timer runs on a separate channel. When the scheduler execution module stops running, close the timer and release the channel resources occupied by the timer.

[0028] When calculating the time point that should be triggered most recently according to the start time and end time of all activities in the cache, arrange all the start times and end times in chronological order, and use the start time or end time closest to the current time as the time point that should be triggered most recently.

[0029] When triggering the operation on the corresponding activity when the timing ends, if the time point that should be triggered most recently used by the timer for timing is the start time, the operation on the corresponding activity is to run (that is, control the activity to start running); if the time point that should be triggered most recently used by the timer for timing is the end time, the operation on the corresponding activity is to stop (that is, control the activity to stop running).

[0030] It should be noted that the above steps S3 - S4 are applicable to activities in the waiting and running states, and these activities can be automatically started and ended according to the corresponding start time and end time. Since activities in the paused state often have passed the start time, such activities cannot be automatically started and ended through the above steps. For such activities in the paused state, in this embodiment, they are started manually. Each activity in the paused state has its corresponding start button, and by clicking the corresponding start button, the corresponding activity can be controlled to start. When the activity is manually started, its state becomes running, and it can be automatically ended according to its end time through the above steps.

[0031] The above describes the execution process when the activity is not modified. Next, the corresponding execution processes in special cases such as when the activity is added, deleted, and ended are described.

[0032] When receiving an instruction to delete an activity within the valid period, the following operations are performed: Determine whether the scheduler execution module is running through the refresh flag; if it is not running, directly delete the corresponding activity in the database and cache; if it is running, after deleting the corresponding activity in the database and cache, assign a value to the refresh flag.

[0033] When receiving an instruction to add a new activity, the following operations are performed: Determine whether the scheduler execution module is running through the refresh flag; if it is not running, store the newly added activity in the database and register it in the cache; if it is running, after registering the newly added activity in the cache, assign a value to the refresh flag.

[0034] When receiving an instruction to end all activities, the following operations are performed: Determine whether the scheduler execution module is running through the refresh flag; if it is not running, directly return (i.e., do nothing); if it is running, assign a value to the stop flag; when receiving a signal for the stop flag to be assigned, directly stop the operation of the scheduler execution module (stop the operation of the timer and release the channel resources occupied by the timer), and restore the refresh flag and the stop flag to nil.

[0035] Furthermore, to ensure that the operation of the activity is restricted by the subscription (License) status, this embodiment also includes real - time monitoring whether the subscription to the IPPBX service has expired. If it has expired, assign a value to the stop flag; when receiving a signal for the stop flag to be assigned, directly stop the operation of the scheduler execution module, and restore the refresh flag and the stop flag to nil.

[0036] The embodiments of the present invention have the following beneficial effects: (1) High flexibility: Through the combination of in - memory scheduling and dynamic timers, task scheduling control accurate to the second is achieved.

[0037] (2)High reliability: The License status is linked to the task status to avoid illegal execution.

[0038] (3)Resource saving: The timer thread is enabled only when a task needs to be scheduled, and only one coroutine and timer are running to avoid ineffective idling.

[0039] Embodiment 2: The present invention further provides an outbound activity scheduling control terminal device based on an IPPBX, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above method embodiment of Embodiment 1 of the present invention are implemented.

[0040] Further, as an executable solution, the outbound activity scheduling control terminal device based on an IPPBX may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The outbound activity scheduling control terminal device based on an IPPBX may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the composition structure of the outbound activity scheduling control terminal device based on an IPPBX described above is only an example of the outbound activity scheduling control terminal device based on an IPPBX, and does not constitute a limitation on the outbound activity scheduling control terminal device based on an IPPBX. It may include more or fewer components than those described above, or combine some components, or different components. For example, the outbound activity scheduling control terminal device based on an IPPBX may further include input / output devices, network access devices, a bus, etc. The embodiments of the present invention do not make any limitations in this regard.

[0041] Further, as an executable solution, the so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the outbound activity scheduling control terminal device based on an IPPBX, and connects various parts of the entire outbound activity scheduling control terminal device based on an IPPBX through various interfaces and lines.

[0042] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and by invoking the data stored in the memory, the processor realizes various functions of the outbound activity scheduling control terminal device based on IPPBX. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0043] The present invention also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the method in the above embodiments of the present invention are realized.

[0044] If the modules / units integrated in the outbound activity scheduling control terminal device based on IPPBX are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above embodiments of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be realized. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc.

[0045] Although the present invention is specifically shown and described in combination with preferred embodiments, those skilled in the art should understand that various changes can be made to the present invention in terms of form and details without departing from the spirit and scope of the present invention defined by the appended claims, and all are within the protection scope of the present invention.

Claims

1. A method for outbound call activity scheduling and control based on IPPBX, characterized in that, Including the following steps: After the IPPBX starts, perform the following initialization operations: clear all activities in the cache; correct the status of all activities with an expired period and a non-compliant status stored in the database; construct a refresh flag and a stop flag, and initialize them to nil; When a start activity instruction is received, register all activities with an expired period in the database to the cache. The registered content includes the unique code, status, start time, and end time of each activity; Determine whether the scheduler execution module is running by checking whether the refresh flag is nil. If it is not running, initialize the scheduler execution module. During this initialization process, declare a space with a length of 1 for both the refresh flag and the stop flag. If it is running, assign a value to the refresh flag; After the scheduler execution module receives the signal of the refresh flag assignment, clear the assignment of the refresh flag and perform the following operations: calculate the time point that should be triggered most recently based on the start time and end time of all activities in the cache; Use a timer to time according to this most recently triggered time point, and trigger the operation on the corresponding activity when the timing ends; When it is necessary to stop the scheduler execution module, assign a value to the stop flag. When the signal of the stop flag assignment is received, directly stop the operation of the scheduler execution module, and restore the refresh flag and the stop flag to nil.

2. The outbound call activity scheduling control method based on IPPBX according to claim 1, wherein: When an instruction to delete an activity with an expired period is received, perform the following operations: determine whether the scheduler execution module is running by checking the refresh flag. If it is not running, directly delete the corresponding activity in the database and the cache. If it is running, after deleting the corresponding activity in the database and the cache, assign a value to the refresh flag; 3. The outbound call activity scheduling and control method based on IPPBX according to claim 1, characterized in that: When an instruction to add a new activity is received, perform the following operations: determine whether the scheduler execution module is running by checking the refresh flag. If it is not running, store the new activity in the database and register it to the cache; If it is running, after registering the new activity to the cache, assign a value to the refresh flag; 4. The outbound call activity scheduling control method based on IPPBX according to claim 1, characterized in that: When an instruction to end all activities is received, perform the following operations: determine whether the scheduler execution module is running by checking the refresh flag. If it is not running, directly return. If it is running, perform the operation to stop the scheduler execution module; 5. The outbound call activity scheduling and control method based on IPPBX according to claim 1, characterized in that: It also includes real-time monitoring of whether the subscription has expired. If it has expired, perform the operation to stop the scheduler execution module; 6. The outbound call activity scheduling control method based on IPPBX according to claim 1, characterized in that: The status includes import, waiting, running, paused, and ended.

7. The outbound call activity scheduling control method based on IPPBX according to claim 6, characterized in that: The method for correcting the status of an activity with a non-compliant status includes: modifying the import status to the waiting status, and modifying the running and waiting statuses to the paused status.

8. An outbound call activity scheduling and control terminal device based on an IPPBX, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method of implementing detection mechanism of digital cluster dispatching desk

    CN101159925A

  • Outbound task execution method and device and electronic equipment

    CN115866142A

  • Method for scheduling timed tasks in IP-PBX, IP-PBX and storage medium

    CN116954854A

  • Task execution method of cloud supercomputing platform, multi-scheduler management system and medium

    CN119960961A

  • Performant runtime pause with no CPU utilization

    US20130347002A1