An outbound call activity scheduling control method, device and medium based on IPPBX

By introducing activity scheduling control methods in the IPPBX system, clearing caches, correcting status, building identifiers, and using timers to manage activities, the scheduling conflicts and crash problems of the IPPBX system are solved, and efficient and robust scheduling control and resource management are achieved.

CN120390054BActive Publication Date: 2025-08-29XIAMEN XINGZONG DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510885909.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-08-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 clearing the cache after IPPBX is started, the database activity status is corrected, refresh and stop flags are built, and activity scheduling is managed using timers and coroutines to realize the registration of activities, status change perception and scheduling execution, and combining License status monitoring to ensure the efficient operation of the scheduler.

Benefits of technology

It realizes efficient registration and scheduling control of active states, improves the robustness and easy maintenance of the system, avoids scheduling conflicts and system crashes, and makes resource utilization more efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120390054B_ABST
    Figure CN120390054B_ABST
Patent Text Reader

Abstract

The present invention relates to an IPPBX-based outbound call activity scheduling control method, device, and medium. The method comprises: performing initialization operations after the IPPBX is started; upon receiving a start activity instruction, registering all active activities in a database into a cache; constructing a refresh flag and a stop flag; the refresh flag is used to control the time refresh of the most recent triggering time point in a scheduler execution module and to determine whether the scheduler execution module is running; and the stop flag is used to control the stop of the scheduler execution module. The present invention implements activity status registration, state change perception, scheduling execution, and recovery control, and is characterized by high efficiency, strong robustness, and ease of maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to an IPPBX-based outbound call activity scheduling control method, device and medium. Background Art

[0002] Call center automation platforms within IPPBX systems contain numerous active tasks that require scheduled start and end times. Traditional systems typically rely on external schedulers (such as Cron) or complex task queue systems for control. These systems lack flexible state awareness and resource adaptation mechanisms. This makes scheduling conflicts and system crashes more likely, especially when license status changes, activities are temporarily suspended, or resources compete for concurrent resources. Summary of the Invention

[0003] In order to solve the above problems, the present invention proposes an IPPBX-based outbound call activity scheduling control method, device and medium.

[0004] The specific plan is as follows:

[0005] An outbound call activity scheduling control method based on IPPBX, comprising the following steps:

[0006] After the IPPBX is started, the following initialization operations are performed: clear all cached activities; correct the status of all valid activities stored in the database that are in a non-compliant state; construct a refresh flag and a stop flag and initialize them to nil;

[0007] When receiving the start activity instruction, all valid activities in the database are registered in the cache. The registration content includes the unique code, status, start time and end time of each activity;

[0008] Whether the scheduler execution module is running is determined by whether the refresh flag is nil; if not, the scheduler execution module is initialized, and a space of length 1 is declared for both the refresh flag and the stop flag during the initialization process; if it is running, the refresh flag is assigned a value;

[0009] After receiving the signal for refreshing the flag, the scheduler execution module clears the flag and performs the following operations: calculating the most recent triggering time based on the start and end times of all activities in the cache; using a timer to set a time based on the most recent triggering time, and triggering the operation for the corresponding activity when the timer ends;

[0010] When the scheduler execution module needs to be stopped, the stop flag is assigned a value; when a signal indicating the stop flag assignment is received, the scheduler execution module is directly stopped, and the refresh flag and the stop flag are restored to nil.

[0011] Furthermore, when an instruction to delete an activity that is valid is received, 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, assign a value to the refresh flag after deleting the corresponding activity in the database and cache.

[0012] Furthermore, when an instruction to add a new activity is received, the following operations are performed: the scheduler execution module is judged by the refresh flag whether it is running; if it is not running, the new activity is stored in the database and registered to the cache; if it is running, the refresh flag is assigned after the new activity is registered to the cache.

[0013] Furthermore, when an instruction to end all activities is received, the following operations are performed: determine whether the scheduler execution module is running by refreshing the flag; if not running, return directly; if running, perform operations required to stop the scheduler execution module.

[0014] Furthermore, it also includes: real-time monitoring of whether the subscription is expired, and if expired, executing an operation that requires stopping the scheduler execution module.

[0015] Furthermore, the status includes importing, waiting, running, paused and finished.

[0016] Furthermore, the method for correcting the status of an activity in a non-compliant state includes: changing the importing state to the waiting state, and changing the running and waiting states to the paused state.

[0017] An IPPBX-based outbound call activity scheduling control terminal device 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, the steps of the method described above are implemented.

[0018] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described above in an embodiment of the present invention.

[0019] The present invention adopts the above technical solution to realize the registration of activity status, state change perception, scheduling execution and recovery control, and has the characteristics of high efficiency, strong robustness and easy maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 Shown is a flow chart of a method according to a first embodiment of the present invention. DETAILED DESCRIPTION

[0021] To further illustrate various embodiments, the present invention provides accompanying drawings. These drawings form part of the present disclosure and are primarily used to illustrate the embodiments and, in conjunction with the relevant description in the specification, to explain the operating principles of the embodiments. By referring to these drawings, those skilled in the art will be able to understand other possible implementations and the advantages of the present invention.

[0022] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.

[0023] Example 1:

[0024] The embodiment of the present invention provides an outbound call activity scheduling control method based on IPPBX, such as Figure 1 As shown, the method includes the following steps:

[0025] S1: After the IPPBX is started, the following initialization operations are performed: clear all activities in the cache; correct the status of all activities stored in the database that are in a non-compliant state and within the validity period; construct a refresh flag and a stop flag, and initialize them to nil (empty).

[0026] In this embodiment, the activities 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, run, pause and end. Import is the state of importing the activity into the database, wait is the state of waiting for the activity to start running, run is the state of the activity running, pause is the state of the activity being paused after running, and end is the state of the activity running. It should be noted that the start time is the time when the status changes to running (that is, the activity starts running), and the end time is the time when the status changes to ending (the activity ends).

[0027] An activity that is in its effective period is one whose end time is later than the current time.

[0028] An incompatible state occurs when the actual status of an activity is inconsistent with the status recorded in the database. For example, if the IPPBX is forcibly shut down midway through an activity, the status of the running activity should be Paused, but the status stored in the database is still Running. Due to the status inconsistency, a correction is required. In this embodiment, the methods for correcting the status of an incompatible activity include: changing the Importing state to the Waiting state, and changing the Running or Waiting state to the Paused state.

[0029] In this embodiment, the refresh flag refreshChannel and the stop flag stopChannel both have three states: initially nil; when the scheduler execution module runs, a space of length 1 is declared for them; at a specific moment, they are assigned a value, that is, a random number is written into the space of length 1.

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

[0031] S2: After receiving the start activity instruction, all valid activities in the database are registered in the cache.

[0032] The start activity command and the following commands can be sent by clicking the buttons in the interface.

[0033] S3: Determine whether the scheduler execution module is running by checking whether the refresh flag is nil (if it is not nil, it means it is running); if it is not running, initialize the scheduler execution module, and 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.

[0034] S4: After the scheduler execution module receives the signal of the refresh flag assignment, it clears the refresh flag assignment (reserves a space of length 1) and performs the following operations: calculates the time point when the most recent trigger should be made based on the start time and end time of all activities in the cache; uses a timer to set timing based on the time point when the most recent trigger should be made, and triggers the operation of the corresponding activity when the timing ends.

[0035] In this embodiment, the scheduler execution module is implemented by the run function. When the scheduler execution module is executed, the internal timer uses a single channel to run. When the scheduler execution module stops running, the timer is turned off and the channel resources occupied by the timer are released.

[0036] When calculating the most recent triggering time based on the start and end times of all activities in the cache, all start and end times are arranged in chronological order, and the start or end time closest to the current time is used as the most recent triggering time.

[0037] When the operation of the corresponding activity is triggered at the end of the timing, if the time point when the timer should be triggered the most recently is the start time, the operation of the corresponding activity is run (that is, the control activity starts running); if the time point when the timer should be triggered the most recently is the end time, the operation of the corresponding activity is stop (that is, the control activity stops running).

[0038] It should be noted that the above steps S3-S4 are for activities in the waiting and running states. 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 manually started. Each activity in the paused state has its corresponding start button, and the corresponding activity can be started by clicking the corresponding start button. When the activity is manually started, its state changes to running, and it can be automatically ended according to its end time through the above steps.

[0039] The above describes the execution process when the activity is not modified. The following describes the corresponding execution process when the activity is added, deleted, or ended.

[0040] When an instruction to delete an activity that is valid is received, the following operations are performed: the refresh flag is used to determine whether the scheduler execution module is running; if it is not running, the corresponding activity in the database and cache is directly deleted; if it is running, the refresh flag is assigned after deleting the corresponding activity in the database and cache.

[0041] 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 not, store the new activity in the database and register it to the cache; if it is running, assign a value to the refresh flag after registering the new activity to the cache.

[0042] When an instruction to end all activities is received, the following operations are performed: the refresh flag is used to determine whether the scheduler execution module is running; if it is not running, it returns directly (i.e., no operation is performed); if it is running, the stop flag is assigned a value; when a signal to assign a stop flag is received, the scheduler execution module is stopped directly (the timer is stopped and the channel resources occupied by the timer are released), and the refresh flag and stop flag are restored to nil.

[0043] Furthermore, to ensure that the operation of the activity is subject to the constraints of the subscription (License) status, this embodiment also includes real-time monitoring of whether the subscription to the IPPBX service has expired. If expired, a stop flag is assigned a value; when a signal indicating the stop flag assignment is received, the operation of the scheduler execution module is directly stopped, and the refresh flag and the stop flag are restored to nil.

[0044] The embodiments of the present invention have the following beneficial effects:

[0045] (1) High flexibility: Through the combination of memory scheduling and dynamic timers, task scheduling control with precision to the second is achieved.

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

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

[0048] Example 2:

[0049] The present invention also provides an IPPBX-based outbound call activity scheduling control terminal device, comprising 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-mentioned method embodiment of the first embodiment of the present invention are implemented.

[0050] Furthermore, as an executable solution, the IPPBX-based outbound call activity scheduling and control terminal device can be a computing device such as a desktop computer, a laptop, a PDA, or a cloud server. The IPPBX-based outbound call activity scheduling and control terminal device can include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above-mentioned component structure of the IPPBX-based outbound call activity scheduling and control terminal device is merely an example of an IPPBX-based outbound call activity scheduling and control terminal device and does not constitute a limitation on the IPPBX-based outbound call activity scheduling and control terminal device. The device can include more or fewer components than those described above, or a combination of certain components, or different components. For example, the IPPBX-based outbound call activity scheduling and control terminal device can also include input and output devices, network access devices, buses, etc., which are not limited in this embodiment of the present invention.

[0051] Furthermore, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices. The general-purpose processor may be a microprocessor or any conventional processor. The processor serves as the control center of the IPPBX-based outbound call activity scheduling and control terminal device, connecting various components of the entire IPPBX-based outbound call activity scheduling and control terminal device using various interfaces and lines.

[0052] The memory can be used to store the computer programs and / or modules. The processor implements the various functions of the IPPBX-based outbound call activity scheduling and control terminal device by running or executing the computer programs and / or modules stored in the memory and accessing the data stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the mobile phone. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0053] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.

[0054] If the module / unit integrated into the IPPBX-based outbound call activity scheduling and control terminal device is implemented as a software functional unit and sold or used as a standalone product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. 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 drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium.

[0055] Although the present invention has been particularly shown and described in conjunction with preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made to the present invention without departing from the spirit and scope of the invention as defined in the appended claims, and all such changes are within the scope of protection of the present invention.

Claims

1. A method for controlling outbound call activity scheduling based on IPPBX, characterized in that: The following steps are involved: After the IPPBX is started, the following initialization operations are performed: clear all cached activities; correct the status of all valid activities stored in the database that are in a non-compliant state; construct a refresh flag and a stop flag and initialize them to nil; When receiving the start activity instruction, all valid activities in the database are registered in the cache. The registration content includes the unique code, status, start time and end time of each activity; Whether the scheduler execution module is running is determined by whether the refresh flag is nil; if not, the scheduler execution module is initialized, and a space of length 1 is declared for both the refresh flag and the stop flag during the initialization process; if it is running, the refresh flag is assigned a value; After receiving the signal of refreshing the flag assignment, the scheduler execution module clears the refresh flag assignment and performs the following operations: calculates the time point when the latest trigger should be made based on the start time and end time of all activities in the cache; Use a timer to set a time based on the most recent triggering time point, and trigger the operation of the corresponding activity when the timer ends; When the scheduler execution module needs to be stopped, the stop flag is assigned a value; when a signal indicating the stop flag assignment is received, the scheduler execution module is directly stopped, and the refresh flag and the stop flag are restored to nil.

2. The IPPBX-based outbound call activity scheduling control method according to claim 1, characterized in that: When an instruction to delete an activity that is valid is received, the following operations are performed: the refresh flag is used to determine whether the scheduler execution module is running; if it is not running, the corresponding activity in the database and cache is directly deleted; if it is running, the refresh flag is assigned after deleting the corresponding activity in the database and cache.

3. The outbound call activity scheduling control method based on IPPBX according to claim 1, characterized in that: When receiving an instruction to add a new activity, the following operations are performed: the scheduler execution module is determined to be running by refreshing the flag; if not, the new activity is stored in the database and registered in the cache; If it is running, the refresh flag is assigned after the new activity is registered to the cache.

4. The outbound call activity scheduling control method based on IPPBX according to claim 1, characterized in that: When receiving the instruction to end all activities, the following operations are performed: determine whether the scheduler execution module is running by refreshing the flag; if not running, return directly; if running, perform the operation required to stop the scheduler execution module.

5. The outbound call activity scheduling 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, the operation of stopping the scheduler execution module is performed.

6. The outbound call activity scheduling control method based on IPPBX according to claim 1, characterized in that: The statuses include Importing, Waiting, Running, Paused, and Finished.

7. The IPPBX-based outbound call activity scheduling control method according to claim 6, characterized in that: Methods for correcting the status of an activity in a non-compliant state include: changing the import status to the waiting status, and changing the running and waiting status to the paused status.

8. An IPPBX-based outbound call activity scheduling and control terminal device, characterized by: The method comprises a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.

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

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