Method and device for generating scalable signal sources
By automatically judging and adjusting the status of the number source during the business processing period, the problem of unstable number source processing capabilities is solved, and the automatic increase and decrease of number source is realized, business efficiency and user experience are improved, and uniformity between number sources is ensured. and stability of business processing.
Patent Information
- Application Number
- CN202210100896.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-01-27
AI Technical Summary
In business scenarios where advance reservations are required, the number source processing capacity of the business department is unstable, resulting in fluctuations in the number of appointments. It is difficult for the existing technology to effectively increase and decrease the number source without affecting the number source that has been booked, and there is a lack of automated number source generation methods. , affect user experience and business efficiency.
By judging the source status of the number in the service processing period, finding the idle period between adjacent source sources that meet specific conditions, inserting or deleting the source, adjusting the source status to meet the needs, and adopting automated methods to improve the source generation efficiency.
The automated increase and decrease of number sources is realized, the efficiency of business processing and user experience is improved, the time interval uniformity between number sources is ensured, and the pressure on business personnel is reduced.
Smart Images

Figure CN114492887B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the technical field of signal source generation, and in particular to methods and devices for generating signal sources that can be increased or decreased, computing devices, and computer-readable media. Background Art
[0002] There are many business scenarios that require advance reservations. Especially affected by the recent epidemic, in order to reduce the gathering of people, relevant businesses need to be booked in advance. Users only need to go to the relevant business department to handle the business according to the appointment time, such as hospital outpatient appointments, bank business appointments, provident fund business, social security business, etc. For scheduled businesses, the business department releases the number in advance to facilitate user appointments, improves the user experience, and at the same time increases the business processing speed of relevant departments.
[0003] But the actual situation is that the processing capacity of the business department is fixed, while the number of appointments in each business period is not fixed. The business department may increase or decrease the number of numbers at any time, and the increased or decreased number of numbers must be distributed as evenly as possible during the business hours. However, some numbers have already been reserved, and increasing or decreasing the number of numbers cannot affect the numbers that have already been reserved. Summary of the invention
[0004] One or more embodiments of this specification describe a method and apparatus for generating a signal source that can be increased or decreased, a computing device, and a computer-readable medium.
[0005] According to a first aspect, an embodiment of the present invention provides a method for generating a signal source that can be increased or decreased, comprising:
[0006] When a number source needs to be inserted, it is determined whether the current state is in a first state, wherein the first state is that the service processing period has not yet arrived, and each number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state;
[0007] If it is in the first condition, perform the following steps:
[0008] S11. Find two adjacent number sources that meet the first condition among the number sources in the non-temporary state, wherein the first condition is that the idle time period between the two adjacent number sources is the largest; the non-temporary state includes the reserved state and the unreserved state, and if the time interval between the two number sources is greater than or equal to twice the single service processing time, there is an idle time period between the two number sources, otherwise there is no idle time period between the two number sources;
[0009] S12, inserting a number source between two adjacent number sources that meet the first condition, changing the states of the two adjacent number sources that meet the first condition and the inserted number source to temporary states, and calculating the time interval between each two adjacent number sources in the two adjacent number sources that meet the first condition and the inserted number source;
[0010] S13, determining whether the number of inserted number sources reaches the number of number sources to be added;
[0011] If yes, then all the first number sources in the temporary state are changed to the reserved state, all the second number sources in the temporary state are changed to the unreserved state, the new number source in the temporary state is changed to the unreserved state, and the method ends;
[0012] Otherwise, it is determined whether there is an idle period between the number sources currently in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state. If so, the process returns to S11.
[0013] In some embodiments, S11 searches for two adjacent number sources that meet the first condition among each number source in a non-temporary state, including: if the lengths of the idle periods between each adjacent number source within the service processing period are not equal, then searches for two adjacent number sources that meet the first condition among each number source in a non-temporary state.
[0014] In some embodiments, the method also includes: if the lengths of the idle periods between adjacent number sources within the service processing period are equal, then a number source is inserted between every two adjacent number sources in the back-to-front direction until the number of inserted number sources reaches the number of number sources that need to be added.
[0015] In some embodiments, the method also includes: if there is no idle period between the number sources currently in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state, then a number source is inserted between two adjacent number sources in the order of the time intervals between adjacent number sources from large to small, until the number of inserted number sources reaches the number of number sources that need to be added.
[0016] In some embodiments, the number of number sources to be added is less than the maximum number of inserted number sources, which is predetermined based on the size of the business processing period, the time required to process a single business, and the preset number of issued number sources.
[0017] In some embodiments, the method further comprises:
[0018] When it is necessary to delete a number source, determine whether it is in the second state; the second state includes: the current service processing period has not yet arrived, the current number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state, and the number of number sources to be deleted is less than or equal to the number of second number sources in an unreserved state;
[0019] If it is in the second situation, perform the following steps:
[0020] S21, searching for two adjacent number sources that meet a second condition among the number sources; the second condition includes: the idle period between the two adjacent number sources is the largest, and the two adjacent number sources include at least one second number source that is in an unreserved state;
[0021] S22, deleting a second source among the two adjacent source numbers that meet the second condition, and calculating the time interval between the left adjacent source and the right adjacent source of the deleted second source number;
[0022] S23, determining whether the number of deleted number sources reaches the number of number sources to be deleted;
[0023] If yes, then end this method;
[0024] Otherwise, it is determined whether there is an idle period between two adjacent signal sources including at least one second signal source. If so, the process returns to S21.
[0025] In some embodiments, searching for two adjacent number sources satisfying the second condition among the number sources includes: if the lengths of the idle periods between the two adjacent number sources including the second number source within the service processing period are not equal, searching for two adjacent number sources satisfying the second condition among the number sources.
[0026] In some embodiments, the method further includes: if the lengths of the idle periods between two adjacent signal sources including the second signal source within the service processing period are equal, then deleting the signal sources in the direction from back to front until the number of deleted signal sources reaches the number of signal sources to be deleted.
[0027] In some embodiments, the method also includes: if there is no idle period between two adjacent signal sources including at least one second signal source, the signal sources are deleted in order from small to large according to the time interval between two adjacent signal sources including at least one second signal source, until the number of deleted signal sources reaches the number of signal sources to be deleted.
[0028] In a second aspect, an embodiment of the present invention provides an increaseable and decreaseable signal source generating device, comprising:
[0029] A first judgment module is used to judge whether the current state is in a first state when a number source needs to be inserted, wherein the first state is that the service processing period has not yet arrived, and each number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state;
[0030] The first execution module is configured to execute the following steps if the first condition occurs:
[0031] S11. Find two adjacent number sources that meet the first condition among the number sources in the non-temporary state, wherein the first condition is that the idle time period between the two adjacent number sources is the largest; the non-temporary state includes the reserved state and the unreserved state; if the time interval between the two number sources is greater than or equal to 2 times the single service processing time, there is an idle time period between the two number sources, otherwise there is no idle time period between the two number sources;
[0032] S12, inserting a number source between two adjacent number sources that meet the first condition, changing the states of the two adjacent number sources that meet the first condition and the inserted number source to temporary states, and calculating the time interval between each two adjacent number sources in the two adjacent number sources that meet the first condition and the inserted number source;
[0033] S13, determining whether the number of inserted number sources reaches the number of number sources to be added;
[0034] If yes, then all the first number sources in the temporary state are changed to the reserved state, all the second number sources in the temporary state are changed to the unreserved state, the new number source in the temporary state is changed to the unreserved state, and the method ends;
[0035] Otherwise, it is determined whether there is an idle period between the number sources currently in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state. If so, the process returns to S11.
[0036] According to a third aspect, an embodiment of the present invention provides a computing device, comprising: at least one memory and at least one processor;
[0037] The at least one memory is used to store a machine-readable program;
[0038] The at least one processor is used to call the machine-readable program to execute the above method.
[0039] According to a fourth aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the above method.
[0040] The method and device for generating a number source that can be increased or decreased provided by the embodiment of the present invention, when it is necessary to increase a number source, two adjacent number sources that meet the first condition are found in each number source in a non-temporary state, a number source is inserted between the two adjacent number sources that meet the first condition, the states of the two adjacent number sources that meet the first condition and the inserted number source are changed to a temporary state, and it is judged whether the number of inserted number sources reaches the number of number sources that need to be increased, if so, all the first number sources in the temporary state are changed to a reserved state, all the second number sources in the temporary state are changed to an unreserved state, and the new number source in the temporary state is changed to an unreserved state, and the method is terminated; otherwise, it is judged whether there is an idle period between each number source in a non-temporary state and between the number source in the temporary state and the number source in the non-temporary state, if so, the previous step is returned to continue to find the largest idle period to increase the number source. The method provided by the embodiment of the present invention does not require manual participation, has a high number source generation efficiency, and can take into account the time interval between the number sources when inserting the number source, and first inserts between the two number sources with the largest idle period, so that the number sources after the number source is added are relatively uniform, and the service processing time of each number source is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A schematic diagram of a flow chart of a method for generating a signal source that can be increased or decreased provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a scenario in which a signal source needs to be added in one embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a scenario currently in a business processing period in one embodiment of the present invention;
[0045] Figure 4 The figure is a structural block diagram of an increase-decrease signal source generating device in one embodiment of the present invention. DETAILED DESCRIPTION
[0046] The solution provided in this specification is described below in conjunction with the accompanying drawings.
[0047] In a first aspect, an embodiment of the present invention provides a method for generating a signal source that can be increased or decreased.
[0048] In actual business scenarios, initial setting values are required: business processing period, processing time of a single business. Under normal circumstances, a fixed number of numbers will be set for users to make reservations within a certain business processing period. For ease of understanding, 09:00-10:00 is used as an example of a business processing period, and the processing time of a single business is 5 minutes. Under normal circumstances, when a business unit releases a reservable number, it will basically be 10-15 minutes as a number. Assuming 10 minutes is used as an example, under normal circumstances, the business unit will release 6 numbers for users to make reservations within the business processing period of 09:00-10:00.
[0049] Of course, it is not ruled out that some business units use 5 minutes as a number source, but this may exceed the maximum load of business processing, and the embodiment of the present invention does not discuss specific business in this regard.
[0050] In actual scenarios, it is expected that a large number of users may make reservations in a certain service processing period, and the number of required numbers is expected to be greater than the number of available numbers released in this service processing period, so some numbers need to be inserted in this service processing period. In view of this situation, the number source can be inserted by the method provided in the embodiment of the present invention.
[0051] The method provided in the embodiment of the present invention comprises the following steps:
[0052] S0. When a number source needs to be inserted, determining whether the current state is in a first state, wherein the first state is that the service processing period has not yet arrived, and each number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state;
[0053] That is to say, the service processing period has not yet arrived, and some of the number sources in the service processing period have been reserved. Such number sources are in the reserved state, so such number sources are called the first number sources in the reserved state. Some number sources have not been reserved yet. Such number sources are in the unreserved state, so such number sources are called the second number sources in the unreserved state. The first number source and the second number source are distinguished for the convenience of description.
[0054] In actual scenarios, if all the numbers are reserved, it still cannot meet the demand. Therefore, it is necessary to add more numbers. The specific method is to insert them one by one. See Figure 1 , see the following process for details.
[0055] S1. If the first condition occurs, perform the following steps:
[0056] S11, searching for two adjacent number sources that meet a first condition among the number sources in a non-temporary state, wherein the first condition is that the idle period between the two adjacent number sources is the largest;
[0057] Among them, the non-temporary state includes a reserved state and an unreserved state; if the time interval between two number sources is greater than or equal to twice the single service processing time, there is an idle period between the two number sources, otherwise there is no idle period between the two number sources.
[0058] For example, if the time interval between two number sources is 10 minutes, and the service processing time of one number source is 5 minutes, then a number source can be inserted between the two number sources, and at this time there is an idle period between the two number sources. For another example, if the time interval between two number sources is 15 minutes, and the service processing time of one number source is still 5 minutes, then two number sources can be inserted between the two number sources, and at this time there is also an idle period between the two number sources. However, if the time interval between the two number sources is less than 10 minutes, it is considered that there is no idle period between the two number sources. Because in this case, after inserting a number source, it may happen that the service of the inserted number source has not been processed yet and the next number source needs to be processed. Of course, this situation may not necessarily happen, because not all services will take 5 minutes.
[0059] It is understandable that the time interval between two number sources can be considered as the time interval between the two number sources' available reservation time points. For example, the available reservation time point of the first number source is 1:15, and the service processing time of the first number source is 1:15 to 1:20. The available reservation time point of the second number source is 1:25, and the service processing time of the second number source is 1:25 to 1:30. The time interval between the two number sources is 10 minutes. If it is idle at 1:20 to 1:25, you can add a number source at 1:20, and the processing time of the added number source is 1:20 to 1:25.
[0060] In S11, the time interval between each adjacent two signal sources is first calculated, and based on the size of the time interval, it is determined whether there is an idle period between each adjacent two signal sources and the size of the idle period, and the two signal sources with the largest idle period are selected.
[0061] It is understandable that if the idle periods are not equal, the two signal sources with the largest idle periods can be selected. If the idle periods between adjacent signal sources are equal, there is no way to select the two signal sources with the largest idle periods, so other methods need to be used for insertion.
[0062] That is to say, in S11 in the embodiment of the present invention, searching for two adjacent number sources that meet the first condition among each number source in a non-temporary state may specifically include: if the lengths of the idle time periods between each adjacent number source within the service processing time period are not equal, then searching for two adjacent number sources that meet the first condition among each number source in a non-temporary state.
[0063] Furthermore, the method provided by the embodiment of the present invention may also include:
[0064] If the lengths of the idle periods between adjacent signal sources within the service processing period are equal, a signal source is inserted between every two adjacent signal sources in the direction from back to front until the number of inserted signal sources reaches the number of signal sources to be added.
[0065] It is understandable that if the lengths of the idle periods between adjacent numbers are equal, for example, the time intervals between two adjacent numbers are all 15 minutes, then the lengths of the idle periods between adjacent numbers are considered equal. At this time, the method of inserting from the back to the front can protect the interests of the previous reservations to the greatest extent. That is, first insert a number source between the last number source and the second last number source, then insert a number source between the second last number source and the third last number source, and so on, until the number of inserted number sources reaches the number of number sources that need to be increased.
[0066] S12, inserting a number source between two adjacent number sources that meet the first condition, changing the states of the two adjacent number sources that meet the first condition and the inserted number source to temporary states, and calculating the time interval between each two adjacent number sources in the two adjacent number sources that meet the first condition and the inserted number source;
[0067] It is understandable that a signal source is inserted between the two signal sources with the largest idle time period, so that the two signal sources become three signal sources. Then the status of the three signal sources is modified to a temporary status. The time interval between the inserted signal source and the adjacent signal sources on both sides is calculated after inserting a signal source.
[0068] For example, the time interval between two signal sources is 15 minutes. After a signal source is inserted, the time interval between the inserted signal source and the two signal sources is 7.5 minutes.
[0069] S13, determining whether the number of inserted number sources reaches the number of number sources that need to be added;
[0070] If yes, then all the first number sources in the temporary state are changed to the reserved state, all the second number sources in the temporary state are changed to the unreserved state, the new number source in the temporary state is changed to the unreserved state, and the method ends;
[0071] Otherwise, it is determined whether there is an idle period between the number sources currently in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state. If so, the process returns to S11.
[0072] It is understandable that after each number source is inserted, it is determined whether the number of inserted number sources has reached the number of number sources to be added. If the number of number sources to be added has been reached, it means that the insertion work can be completed and no more number source insertion operation is required. At this time, all temporary states can be modified. Specifically, the first number source in the temporary state is changed to the previous reserved state, the second number source in the temporary state is changed to the previous unreserved state, and the new number source in the temporary state is changed to the unreserved state.
[0073] If the number of new numbers is not reached, it is necessary to continue inserting. At this time, the next two numbers with the largest idle time period should be found for insertion, but they cannot be inserted between numbers in temporary state. Therefore, it is judged whether there is an idle time period between two numbers in non-temporary state, and whether there is an idle time period between a number in temporary state and a number in non-temporary state. If there is an idle time period, it returns to S11 to continue inserting in the idle time period.
[0074] In specific implementation, after multiple rounds of insertion operations, all idle time periods are inserted with number sources, but the number of inserted number sources still does not meet the demand. The method for generating number sources that can be increased or decreased provided by the embodiment of the present invention may also include the following steps:
[0075] If there is no idle time between the number sources in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state, then a number source is inserted between two adjacent number sources in the order of the time intervals between adjacent number sources from large to small until the number of inserted number sources reaches the number of number sources that need to be added.
[0076] For example, there are 10 current number sources (including temporary number sources, reserved number sources, and unreserved number sources), so there are 9 time intervals. Sort these 9 time intervals from large to small, and then insert a number source in the largest time interval, and then insert a number source in the second largest time interval, and then insert a number source in the third largest time interval, and so on, until the number of inserted number sources reaches the number of number sources that need to be added. This can minimize the situation where the business of one number source has not been processed yet and the business needs to enter the next number source for processing. This method can be understood as a secondary average division method.
[0077] In specific implementation, when setting the number of number sources to be added, the number of number sources to be added cannot exceed the maximum number of inserted number sources, so as to avoid the situation where the number sources are unable to be processed due to unlimited increase, and avoid unnecessary trouble. The maximum number of inserted number sources can be determined in advance according to the size of the business processing period, the time required to process a single business, and the number of preset issued number sources.
[0078] That is, when setting the maximum number of inserted number sources, the length of the service processing period, the processing time of each service, and the number of pre-issued number sources can be considered. The longer the service processing period, the shorter the processing time of each service, and the fewer the number sources pre-issued, the greater the maximum number of inserted number sources.
[0079] The above are the steps that can be performed when adding appointments. In actual scenarios, it is also possible to delete appointments. For example, a doctor needs to deal with something during a certain business processing period and is unable to see patients. In this case, some appointments are deleted.
[0080] In this regard, the method provided by the embodiment of the present invention may further include:
[0081] S2. When it is necessary to delete a number source, determine whether it is in the second state; the second state includes: the current service processing period has not yet arrived, the current number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state, and the number of number sources to be deleted is less than or equal to the number of second number sources in an unreserved state;
[0082] It is understandable that when deleting a number source, only the second number source in the unreserved state can be deleted, and the first number source in the reserved state cannot be deleted, so the number of number sources to be deleted must be less than or equal to the number of second number sources in the unreserved state.
[0083] If it is in the second situation, perform the following steps:
[0084] S21, searching for two adjacent number sources that meet a second condition among the number sources; the second condition includes: the idle period between the two adjacent number sources is the largest, and the two adjacent number sources include at least one second number source that is in an unreserved state;
[0085] It is understandable that when deleting number sources, the number sources with relatively large idle time should be deleted first. In this way, the available space and time will be larger after the deletion, which is convenient for the business unit to arrange other things.
[0086] It is understandable that, since only the number sources in the unreserved state can be deleted during deletion, the two adjacent number sources found in the second condition include at least one second number source in the unreserved state. That is, one of the two number sources may be the second number source in the unreserved state, or both number sources may be the second number source in the unreserved state.
[0087] It is understandable that if the lengths of the idle periods between two adjacent signal sources including at least one second signal source are unequal, then two adjacent signal sources with the largest idle periods can be selected, at least one of which is a second signal source.
[0088] That is to say, the specific process of searching for two adjacent number sources satisfying the second condition among various number sources in S21 may include: if the lengths of the idle periods between two adjacent number sources including the second number source within the service processing period are not equal, then searching for two adjacent number sources satisfying the second condition among various number sources.
[0089] For example, the time interval between the first and second signal sources is 20 minutes, the time interval between the fourth and fifth signal sources is 10 minutes, and the time interval between the seventh and eighth signal sources is 25 minutes. Among them, the second signal source is the second signal source, the fourth and fifth signal sources are both the second signal sources, and the seventh signal source is the second signal source. It can be seen that the idle period between the seventh and eighth signal sources is the longest, and the seventh signal source can be deleted.
[0090] However, if the lengths of the idle periods between two adjacent signal sources including the second signal source are equal, other processing methods need to be adopted. In specific implementation, the method provided by the embodiment of the present invention may also include the following steps: if the lengths of the idle periods between two adjacent signal sources including the second signal source in the business processing period are equal, then the signal sources are deleted in the direction from back to front until the number of deleted signal sources reaches the number of signal sources to be deleted.
[0091] For example, the time interval between the first and second signal sources is 20 minutes, the time interval between the fourth and fifth signal sources is 20 minutes, and the time interval between the seventh and eighth signal sources is 20 minutes. Among them, the second signal source is the second signal source, the fourth and fifth signal sources are both the second signal sources, and the seventh signal source is the second signal source. At this time, the seventh signal source, the fifth signal source, the fourth signal source, and the second signal source can be deleted in sequence until the number of deleted signal sources reaches the number of signal sources to be deleted.
[0092] The above processes are all processing methods when there are idle periods. In specific implementations, the method provided by the embodiments of the present invention may also include: if there is no idle period between two adjacent number sources including at least one second number source, the number sources are deleted in order from small to large according to the time interval between the two adjacent number sources including at least one second number source, until the number of deleted number sources reaches the number of number sources to be deleted.
[0093] For example, the time interval between the first source and the second source is 5 minutes, the time interval between the fourth source and the fifth source is 6 minutes, and the time interval between the seventh source and the eighth source is 8 minutes. Among them, the second source is the second source, the fourth source and the fifth source are both the second source, and the seventh source is the second source. The single service processing time is 5 minutes, which shows that each adjacent source including the second source does not include an idle period. At this time, the three time intervals are sorted from small to large, and then deleted in the order of deleting the second source between the first source and the second source, the fourth source between the fourth source and the fifth source, the fifth source between the fourth source and the fifth source, and the seventh source between the seventh source and the eighth source, until the number of deleted sources reaches the number of sources to be deleted.
[0094] S22, deleting a second source among the two adjacent source numbers that meet the second condition, and calculating the time interval between the left adjacent source and the right adjacent source of the deleted second source number;
[0095] After two adjacent number sources satisfying the second condition are found, one of the two adjacent number sources may be deleted. In specific implementation, the latter number source may be deleted first.
[0096] For example, see Figure 2 , the first and fourth number sources are in the reserved state, and the second and third number sources are in the unreserved state. After calculating the time intervals between each adjacent number source, it is known that the idle period between the second and third number sources is the largest, so the third number source can be deleted. After deleting the third number source, the time interval between adjacent number sources changes and needs to be updated. Therefore, the time interval between the left adjacent number source and the right adjacent number source of the third number source is calculated, that is, the time interval between the second and fourth number sources.
[0097] S23, determining whether the number of deleted number sources reaches the number of number sources to be deleted;
[0098] If yes, then end this method;
[0099] Otherwise, it is determined whether there is an idle period between two adjacent signal sources including at least one second signal source. If so, the process returns to S21.
[0100] It is understandable that after deleting a number source, it is determined whether the number of deleted number sources reaches the number of number sources to be deleted. If it reaches, the method can be terminated. If it does not reach, it is necessary to continue to delete. Specifically, it is necessary to continue to find two number sources that meet the second condition. Before continuing to find two number sources that meet the second condition, it is necessary to determine whether there is an idle period between two adjacent number sources including at least one second number source. Since only the second number source can be deleted during deletion, when determining whether there is an idle period, only the adjacent number sources including the second number source need to be considered.
[0101] For example, after deleting the third number source, there is an idle period between the second number source and the original fourth number source, there is an idle period between the original sixth number source and the seventh number source (the seventh number source is the second number source), and there is an idle period between the original tenth number source and the ninth number source, then return to S21 to find the two number sources with the largest idle periods. If it is found by comparison that the idle period between the second number source and the original fourth number source is the largest, then the second number source can be deleted. And so on, until the number of deleted number sources reaches the number of number sources to be deleted.
[0102] The above processing method is for the case where the service processing period has not yet arrived. For the case where the service processing period has already arrived, the current time is used as the starting time, and only the remaining numbers are considered, ignoring the expired numbers, and then the above situation can be handled. For example, see Figure 3 .
[0103] It can be understood that the embodiment of the present invention sets the normal business processing time period and the processing time of a single business according to the actual business scenario. The subsequent increase or decrease of number sources must be inserted and deleted according to the set values, while ensuring the business processing time of each number source. When the number of business reservations increases sharply and the number source needs to be increased, it is necessary to insert relatively evenly according to the idle time periods between the number sources and the reserved number sources. When the number source needs to be deleted due to the small number of reservations, the number sources that have not been reserved are deleted, and the number sources of the reserved users are not affected. It can be seen that the embodiment of the present invention can perform relatively uniform and reasonable insertion and deletion, reduce the pressure on business personnel, and improve user satisfaction.
[0104] The method for generating a number source that can be increased or decreased provided by the embodiment of the present invention, when it is necessary to increase the number source, two adjacent number sources that meet the first condition are found in each number source in a non-temporary state, a number source is inserted between the two adjacent number sources that meet the first condition, the states of the two adjacent number sources that meet the first condition and the inserted number source are changed to a temporary state, and it is judged whether the number of inserted number sources reaches the number of number sources that need to be increased, if so, all the first number sources in the temporary state are changed to a reserved state, all the second number sources in the temporary state are changed to an unreserved state, and the new number source in the temporary state is changed to an unreserved state, and the method is terminated; otherwise, it is judged whether there is an idle period between each number source in the current non-temporary state and between the number source in the temporary state and the number source in the non-temporary state, if so, the previous step is returned to continue to find the largest idle period to increase the number source. The method provided by the embodiment of the present invention does not require manual participation, has a high number source generation efficiency, and can take into account the time interval between the number sources when inserting the number source, and first inserts between the two number sources with the largest idle period, so that the number sources after the number source is added are relatively uniform, the service processing time of each number source is guaranteed, and the satisfaction of the appointment person is improved.
[0105] In a second aspect, an embodiment of the present invention provides a signal source generating device that can be increased or decreased. Figure 4 , the signal source generating devices that can be increased or decreased include:
[0106] A first judgment module is used to judge whether the current state is in a first state when a number source needs to be inserted, wherein the first state is that the service processing period has not yet arrived, and each number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state;
[0107] The first execution module is configured to execute the following steps if the first condition occurs:
[0108] S11. Find two adjacent number sources that meet the first condition among the number sources in the non-temporary state, wherein the first condition is that the idle time period between the two adjacent number sources is the largest; the non-temporary state includes the reserved state and the unreserved state; if the time interval between the two number sources is greater than or equal to 2 times the single service processing time, there is an idle time period between the two number sources, otherwise there is no idle time period between the two number sources;
[0109] S12, inserting a number source between two adjacent number sources that meet the first condition, changing the states of the two adjacent number sources that meet the first condition and the inserted number source to temporary states, and calculating the time interval between each two adjacent number sources in the two adjacent number sources that meet the first condition and the inserted number source;
[0110] S13, determining whether the number of inserted number sources reaches the number of number sources to be added;
[0111] If yes, then all the first number sources in the temporary state are changed to the reserved state, all the second number sources in the temporary state are changed to the unreserved state, the new number source in the temporary state is changed to the unreserved state, and the method ends;
[0112] Otherwise, it is determined whether there is an idle period between the number sources currently in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state. If so, the process returns to S11.
[0113] In a specific implementation, the first execution module executes S11 to search for two adjacent number sources that meet the first condition among the number sources in a non-temporary state, including: if the lengths of the idle time periods between the adjacent number sources within the service processing time period are not equal, then search for two adjacent number sources that meet the first condition among the number sources in a non-temporary state.
[0114] In the specific implementation, S11 executed by the first execution module also includes: if the lengths of the idle periods between each adjacent number source within the business processing period are equal, then a number source is inserted between every two adjacent number sources along the back-to-front direction until the number of inserted number sources reaches the number of number sources that need to be added.
[0115] In the specific implementation, the first execution module is also used to execute: if there is no idle period between the number sources currently in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state, then insert a number source between two adjacent number sources in the order of the time intervals between adjacent number sources from large to small, until the number of inserted number sources reaches the number of number sources that need to be added.
[0116] In specific implementation, the number of number sources to be added is less than the maximum number of inserted number sources, which is predetermined based on the size of the business processing period, the time required to process a single business, and the number of preset issued number sources.
[0117] In a specific implementation, the device provided by the embodiment of the present invention may further include:
[0118] The second judgment module is used to execute: when it is necessary to delete the number source, determine whether it is in the second state; the second state includes: the current service processing period has not yet arrived, the current number source in the service processing period includes the first number source in the reserved state and the second number source in the unreserved state, and the number of number sources to be deleted is less than or equal to the number of second number sources in the unreserved state;
[0119] The second execution module is used to: if in the second condition, execute the following steps:
[0120] S21, searching for two adjacent number sources that meet a second condition among the number sources; the second condition includes: the idle period between the two adjacent number sources is the largest, and the two adjacent number sources include at least one second number source that is in an unreserved state;
[0121] S22, deleting a second source among the two adjacent source numbers that meet the second condition, and calculating the time interval between the left adjacent source and the right adjacent source of the deleted second source number;
[0122] S23, determining whether the number of deleted number sources reaches the number of number sources to be deleted;
[0123] If yes, then end this method;
[0124] Otherwise, it is determined whether there is an idle period between two adjacent signal sources including at least one second signal source. If so, the process returns to S21.
[0125] In specific implementation, the process of searching for two adjacent number sources satisfying the second condition in each number source in S21 executed by the second execution module includes: if the lengths of the idle periods between two adjacent number sources including the second number source within the service processing period are not equal, then searching for two adjacent number sources satisfying the second condition in each number source.
[0126] In specific implementation, the second execution module is also used to execute: if the lengths of the idle periods between two adjacent number sources including the second number source within the business processing period are equal, the number sources are deleted from back to front until the number of deleted number sources reaches the number of number sources to be deleted.
[0127] In specific implementation, the second execution module is also used to execute: if there is no idle period between two adjacent number sources including at least one second number source, the number sources are deleted in order from small to large according to the time interval between two adjacent number sources including at least one second number source, until the number of deleted number sources reaches the number of number sources to be deleted.
[0128] It is understandable that the explanation, specific implementation, beneficial effects, examples and the like of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the above method and will not be repeated here.
[0129] In a third aspect, an embodiment of the present invention provides a computing device, including: at least one memory and at least one processor;
[0130] The at least one memory is used to store a machine-readable program;
[0131] The at least one processor is used to call the machine-readable program to execute the method provided by the first aspect.
[0132] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided by the embodiment of the present invention can be found in the corresponding parts of the above method and will not be repeated here.
[0133] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium, on which a computer instruction is stored, and when the computer instruction is executed by a processor, the processor executes the above method. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0134] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0135] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0136] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0137] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0138] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the above method and will not be repeated here.
[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0140] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0141] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for generating a signal source that can be increased or decreased, characterized in that: include: When a number source needs to be inserted, it is determined whether the current state is in a first state, wherein the first state is that the service processing period has not yet arrived, and each number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state; If it is in the first condition, perform the following steps: S11. Find two adjacent number sources that meet the first condition among the number sources in the non-temporary state, wherein the first condition is that the idle time period between the two adjacent number sources is the largest; the non-temporary state includes the reserved state and the unreserved state, and if the time interval between the two number sources is greater than or equal to twice the single service processing time, there is an idle time period between the two number sources, otherwise there is no idle time period between the two number sources; S12, inserting a number source between two adjacent number sources that meet the first condition, changing the states of the two adjacent number sources that meet the first condition and the inserted number source to temporary states, and calculating the time interval between each two adjacent number sources in the two adjacent number sources that meet the first condition and the inserted number source; S13, determining whether the number of inserted number sources reaches the number of number sources that need to be added; If yes, then all the first number sources in the temporary state are changed to the reserved state, all the second number sources in the temporary state are changed to the unreserved state, the new number source in the temporary state is changed to the unreserved state, and the method ends; Otherwise, determine whether there is an idle period between the number sources in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state. If so, return to S11; When the number source needs to be deleted, determine whether it is in the second state; The second condition includes: the current service processing period has not yet arrived, the current number sources in the service processing period include the first number source in the reserved state and the second number source in the unreserved state, and the number of number sources to be deleted is less than or equal to the number of the second number sources in the unreserved state; If it is in the second situation, perform the following steps: S21, searching for two adjacent number sources that meet a second condition among the number sources; the second condition includes: the idle period between the two adjacent number sources is the largest, and the two adjacent number sources include at least one second number source that is in an unreserved state; S22, deleting a second source among the two adjacent source numbers that meet the second condition, and calculating the time interval between the left adjacent source and the right adjacent source of the deleted second source number; S23, determining whether the number of deleted number sources reaches the number of number sources to be deleted; If yes, then end this method; Otherwise, it is determined whether there is an idle period between two adjacent signal sources including at least one second signal source. If so, the process returns to S21.
2. The method according to claim 1, characterized in that In S11, two adjacent signal sources satisfying the first condition are searched from signal sources in non-temporary states, including: If the lengths of the idle periods between adjacent number sources within the service processing period are not equal, two adjacent number sources that meet the first condition are searched for in the number sources that are in a non-temporary state.
3. The method according to claim 2, characterized in that Also includes: If the lengths of the idle periods between adjacent signal sources within the service processing period are equal, a signal source is inserted between every two adjacent signal sources in the direction from back to front until the number of inserted signal sources reaches the number of signal sources to be added.
4. The method according to claim 1, characterized in that: The method further comprises: If there is no idle time between the number sources in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state, then a number source is inserted between two adjacent number sources in the order of the time intervals between adjacent number sources from large to small until the number of inserted number sources reaches the number of number sources that need to be added.
5. The method according to claim 1, characterized in that: The number of number sources to be added is less than the maximum number of inserted number sources, which is determined in advance based on the size of the business processing period, the time required to process a single business, and the number of preset issued number sources.
6. The method according to claim 5, characterized in that The step of searching for two adjacent signal sources satisfying the second condition in each signal source includes: If the lengths of the idle periods between two adjacent signal sources including the second signal source within the service processing period are not equal, two adjacent signal sources that meet the second condition are searched for in each signal source.
7. The method according to claim 6, characterized in that Also includes: If the lengths of the idle periods between two adjacent signal sources including the second signal source within the service processing period are equal, the signal sources are deleted in a direction from back to front until the number of deleted signal sources reaches the number of signal sources to be deleted.
8. The method according to claim 7, characterized in that Also includes: If there is no idle period between two adjacent signal sources including at least one second signal source, the signal sources are deleted in order from small to large according to the time interval between the two adjacent signal sources including at least one second signal source until the number of deleted signal sources reaches the number of signal sources to be deleted.
9. A signal source generating device capable of increasing or decreasing, characterized in that: include: A first judgment module is used to judge whether the current state is in a first state when a number source needs to be inserted, wherein the first state is that the service processing period has not yet arrived, and each number source in the service processing period includes a first number source in a reserved state and a second number source in an unreserved state; The first execution module is configured to execute the following steps if the first condition occurs: S11. Find two adjacent number sources that meet the first condition among the number sources in the non-temporary state, wherein the first condition is that the idle time period between the two adjacent number sources is the largest; the non-temporary state includes the reserved state and the unreserved state; if the time interval between the two number sources is greater than or equal to 2 times the single service processing time, there is an idle time period between the two number sources, otherwise there is no idle time period between the two number sources; S12, inserting a number source between two adjacent number sources that meet the first condition, changing the states of the two adjacent number sources that meet the first condition and the inserted number source to temporary states, and calculating the time interval between each two adjacent number sources in the two adjacent number sources that meet the first condition and the inserted number source; S13, determining whether the number of inserted number sources reaches the number of number sources that need to be added; If yes, then all the first number sources in the temporary state are changed to the reserved state, all the second number sources in the temporary state are changed to the unreserved state, the new number source in the temporary state is changed to the unreserved state, and the method ends; Otherwise, determine whether there is an idle period between the number sources in the non-temporary state and between the number sources in the temporary state and the number sources in the non-temporary state. If so, return to S11; When the number source needs to be deleted, determine whether it is in the second state; The second condition includes: the current service processing period has not yet arrived, the current number sources in the service processing period include the first number source in the reserved state and the second number source in the unreserved state, and the number of number sources to be deleted is less than or equal to the number of the second number sources in the unreserved state; If it is in the second situation, perform the following steps: S21, searching for two adjacent number sources that meet a second condition among the number sources; the second condition includes: the idle period between the two adjacent number sources is the largest, and the two adjacent number sources include at least one second number source that is in an unreserved state; S22, deleting a second source among the two adjacent source numbers that meet the second condition, and calculating the time interval between the left adjacent source and the right adjacent source of the deleted second source number; S23, determining whether the number of deleted number sources reaches the number of number sources to be deleted; If yes, end this step; Otherwise, it is determined whether there is an idle period between two adjacent signal sources including at least one second signal source. If so, the process returns to S21.