CN115061824A - Method and device for sending name list and electronic equipment - Google Patents

Method and device for sending name list and electronic equipment Download PDF

Info

Publication number
CN115061824A
CN115061824A CN202210771796.5A CN202210771796A CN115061824A CN 115061824 A CN115061824 A CN 115061824A CN 202210771796 A CN202210771796 A CN 202210771796A CN 115061824 A CN115061824 A CN 115061824A
Authority
CN
China
Prior art keywords
semaphore
dispatching
thread
list
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210771796.5A
Other languages
Chinese (zh)
Inventor
许炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210771796.5A priority Critical patent/CN115061824A/en
Publication of CN115061824A publication Critical patent/CN115061824A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for dispatching a name list and electronic equipment, wherein the method comprises the following steps: when the instruction sent by the list is detected, reading the total number of the semaphore; judging whether data is to be distributed or not; if the data are to be dispatched, calling a thread according to the semaphore, dispatching a list based on the thread, and releasing the thread after the dispatching is finished; if no data to be dispatched exists, all the semaphores are recovered, and the dispatching state is updated. The embodiment of the invention realizes the limitation of the number of threads executed by multiple threads through the control of the semaphore, and simultaneously finishes the execution result waiting processing of the multiple threads after the semaphore is recovered. Within the range of machine performance, the dispatching rate can be rapidly expanded only by configuring the number of semaphores, and the dispatching rate is linearly increased. When the performance of the machine reaches the bottleneck, the performance can be improved in a semaphore sharing mode.

Description

Business form distribution method and device and electronic equipment
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for dispatching a name list and electronic equipment.
Background
When financial institutions such as banks, securities, insurance and the like promote financial products or other businesses, telephone sales is a common sales promotion method. The first financial product may have a list of about 10 ten thousand every month and is handed to a platform for AI outbound, telemarketing, short message and the like for user touch, and the business needs to be subjected to list competition selection at the beginning of the month and distributed to a corresponding telemarketing channel. The business person has more than 5 ten thousand lists per month for number 1 and needs to be dispatched in 4 hours.
The existing dispatch is a single-machine single-thread dispatch and is a synchronous process. The average single-stroke distribution time is 300ms, if 5 ten thousand lists need to be distributed in a single day, the required time is 4.16 hours, the distribution time is long, the requirement of service on distribution timeliness cannot be basically met, and the list distribution efficiency is low.
Accordingly, there is a need for improvements and developments in the art.
Disclosure of Invention
In view of the above deficiencies of the prior art, the present invention provides a method, an apparatus and an electronic device for name list distribution, which aim to solve the problems of long distribution time and low distribution efficiency of the name list distribution method in the prior art.
The technical scheme of the invention is as follows:
the first embodiment of the invention provides a method for dispatching a name list, which comprises the following steps:
when the instruction sent by the list is detected, reading the total number of the semaphore;
judging whether data is to be distributed or not;
if the data are to be dispatched, calling a thread according to the semaphore, dispatching a list based on the thread, and releasing the thread after the dispatching is finished;
if no data to be dispatched exists, all the semaphores are recovered, and the dispatching state is updated.
Further, the detecting that the list is sent the instruction includes, before reading the total number of the semaphores:
and acquiring a dispatching parameter set by a service worker, and triggering a list dispatching instruction according to the dispatching parameter.
Further, the obtaining of the dispatch parameter set by the service staff and dispatching the instruction according to the dispatch parameter triggering list includes:
acquiring a distribution list and a distribution channel set by a service worker, and entering a corresponding distribution page according to the distribution list and the distribution channel;
and detecting the click operation of a dispatching button of a service worker on the dispatching page, and triggering a list dispatching instruction.
Further, if the instruction is sent by the detected list, reading the total number of the semaphores, including:
when the instruction sent by the list is detected, reading the total number of the semaphore;
and determining the number of the dispatch total threads according to the total number of the semaphores.
Further, if data is to be dispatched, invoking a thread according to the semaphore, dispatching a list based on the thread, and releasing the thread after the dispatching is completed, including:
if the data is to be dispatched, taking out a semaphore, and taking out a thread in the thread pool according to the semaphore;
performing list dispatching according to the thread, and calling a dispatching interface dispatching list;
and after the completion of the list distribution is detected, releasing the semaphore, releasing the thread and returning the thread to the thread pool.
Further, if there is no data to be dispatched, recovering all semaphores and updating the dispatching state, including:
if no data to be dispatched exists, recovering all the semaphore;
detecting the release condition of the semaphore;
and if all the semaphores are released, updating the dispatching state.
Further, the taking out a semaphore if data is to be dispatched, and taking out a thread in the thread pool according to the semaphore comprises:
if the data is to be dispatched, sending a semaphore output instruction and judging whether the semaphore is successfully taken out;
if the extraction is successful, extracting a thread from the thread pool according to a semaphore;
and if the extraction fails, after the semaphore is released, carrying out semaphore extraction operation.
Another embodiment of the present invention provides a device for sending a business form, including:
the semaphore reading module is used for reading the total number of the semaphores when the semaphore sending instruction is detected;
the judging module is used for judging whether the data is to be distributed or not;
the thread calling and dispatching module is used for calling a thread according to the semaphore if data are to be dispatched, dispatching a list based on the thread, and releasing the thread after the dispatching is finished;
and the signal recovery module is used for recovering all the semaphore and updating the dispatching state if the data to be dispatched does not exist.
Another embodiment of the present invention provides an electronic device comprising at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described roster assignment method.
Yet another embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the above-described roster assignment method.
Has the advantages that: the list dispatching method of the embodiment of the invention realizes the limitation of the number of threads executed in multiple threads through the control of the semaphore, and simultaneously, the recovery of the semaphore completes the waiting processing of the execution result of the multiple threads. Within the range of machine performance, the dispatching rate can be rapidly expanded only by configuring the number of semaphores, and the dispatching rate is linearly increased. When the performance of the machine reaches the bottleneck, the performance can be improved in a semaphore sharing mode. That is to say, in the future continuous promotion of the number of business tickets, the performance can be promoted by times only by changing the number of the semaphore, and the requirement of the business on the performance is completed.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a preferred embodiment of a method for forwarding a business form of the present invention;
FIG. 2 is a functional block diagram of a preferred embodiment of a business form distribution apparatus according to the present invention;
fig. 3 is a schematic diagram of a hardware structure of an electronic device according to a preferred embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is described in further detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The list assignment method in the prior art is as follows: screening a list by service personnel; the service personnel select a distribution channel; clicking to dispatch; judging whether data is to be distributed or not; if so, calling a dispatcher interface to dispatch, finishing data dispatching, and continuously judging data to be dispatched; if no data to be dispatched exists; the dispatch state is updated, the dispatch time is long, and in order to overcome the defects of the prior art, the embodiment of the invention provides a name list dispatch method, which realizes the limitation of the number of threads executed in multiple threads through the control of the semaphore, and simultaneously recovers the semaphore to finish the waiting processing of the execution result of the multiple threads. Within the range of machine performance, the dispatching rate can be rapidly expanded only by configuring the number of semaphores.
Embodiments of the present invention will be described below with reference to the accompanying drawings.
To address the above problems, an embodiment of the present invention provides a method for sending a business form, please refer to fig. 1, where fig. 1 is a flowchart of a preferred embodiment of the method for sending a business form according to the present invention. As shown in fig. 1, it includes:
s100, reading the total number of the semaphore when a list dispatching instruction is detected;
step S200, judging whether data are to be distributed, if so, executing step S300, otherwise, executing step S400;
step S300, calling a thread according to the semaphore, performing list distribution based on the thread, and releasing the thread after the distribution is completed;
and S400, recovering all the semaphores and updating the dispatching state.
In specific implementation, the embodiment of the invention aims at the existing single-machine single thread, and the scheme can realize rapid configuration of the quantity of the semaphores within the range of the performance of the machine and linearly improve dispatching efficiency by controlling the semaphores under the condition of not changing the original service interaction logic. By sharing the semaphore, the stand-alone limitation can be broken through, and the theoretical infinite dispatch rate can be improved.
The embodiment of the invention is mainly used for dispatching the list, and the signal quantity is controlled, so that the signal quantity is rapidly configured, and the dispatching efficiency is improved. When a service person needs to distribute the list, the list distribution instruction is triggered, and after the system detects that the list distribution instruction is triggered, the total number of the semaphore in the distributed system is read. Preferably, after the total number of the semaphores is obtained, the total number of the semaphores can be configured as required, so that the dispatching efficiency is improved. Semaphore, sometimes referred to as Semaphore, is a facility used in a multithreaded environment, and is used to ensure that two or more critical code segments are not called concurrently. Before entering a critical code segment, a thread must acquire a semaphore; once the critical code segment is complete, the thread must release the semaphore. Other threads that want to enter the critical code section must wait until the first thread releases the semaphore. To complete this process, a Semaphore VI is created, and then Acquire Semaphore VI and Release Semaphore VI are respectively placed at the beginning and end of each key code segment. It is confirmed that these semaphores VI refer to originally created semaphores.
After receiving the list dispatching instruction, further judging whether the data are to be dispatched or not, if the data are to be dispatched, taking the semaphore, taking the thread out of the thread pool according to the semaphore, dispatching the list according to the thread, and releasing the thread pool after the dispatching is finished.
If the data to be dispatched does not exist, all the semaphores are recovered, the dispatching state is updated to be the dispatching completion, and all the operations are finished.
In one embodiment, detecting that the list is dispatching the instruction before reading the total number of the semaphores comprises:
and acquiring a dispatching parameter set by a service worker, and triggering a list dispatching instruction according to the dispatching parameter.
In specific implementation, the embodiment of the invention sets the distribution parameters in advance through the service, and after the setting is finished, the distribution parameters are sent to the list distribution system.
In one embodiment, obtaining a dispatch parameter set by a service person, and dispatching an instruction according to a trigger list of the dispatch parameter includes:
acquiring a distribution list and a distribution channel set by a service worker, and entering a corresponding distribution page according to the distribution list and the distribution channel;
and detecting the click operation of a dispatching button of a service worker on the dispatching page, and triggering a list dispatching instruction.
During specific implementation, a service person screens a list to be distributed according to a service scene, selects a distribution channel, the distribution channel comprises but is not limited to short messages, WeChat and telephone notifications, enters a corresponding distribution page according to the distribution list and the distribution channel, and clicks a distribution button on the distribution page to trigger a list distribution instruction.
In one embodiment, when the list dispatch instruction is detected, reading the total number of semaphores comprises:
when the instruction sent by the list is detected, reading the total number of the semaphore;
and determining the total dispatching thread number according to the total semaphore.
In specific implementation, after a list dispatch instruction is detected, the current total number of semaphores is read, wherein the semaphores are used for dispatching the list, and the number of dispatch total threads available for dispatching the list can be determined through the total number of the semaphores.
In one embodiment, if data is to be dispatched, invoking a thread according to a semaphore, performing list dispatch based on the thread, and releasing the thread after dispatch is completed, includes:
if the data are to be dispatched, taking out a semaphore, and taking out a thread in the thread pool according to the semaphore;
carrying out list dispatching according to the thread, and calling a dispatching interface to dispatch a list;
and after the completion of the list distribution is detected, releasing the semaphore, releasing the thread and returning the thread to the thread pool.
During specific implementation, if data is to be dispatched, a semaphore is taken out to prove that an available thread exists currently, the thread is taken out at the moment, a dispatching process is carried out according to the taken-out thread, a dispatcher interface is called to dispatch, the completion of the dispatch of the list is detected, a signal number is released, the thread is returned to a thread pool, and whether the data is to be dispatched or not is continuously judged.
In one embodiment, if there is no data to be dispatched, recovering all the semaphores and updating the dispatching status includes:
if no data to be dispatched exists, recovering all the semaphore;
detecting the release condition of the semaphore;
and if all the semaphores are released, updating the dispatching state.
In the specific implementation, if no data to be distributed is detected, the distribution of the description list is completed. At this time, all the semaphores are recovered, thread calling is not performed any more, and after all the semaphores are released, recovery is completed. And updating the dispatching state to be the completion of the dispatching, and completing the list dispatching operation.
In one embodiment, fetching a semaphore if data is to be dispatched, fetching a thread in the thread pool based on a semaphore, comprising:
if the data is to be dispatched, sending a semaphore output instruction and judging whether the semaphore is successfully taken out;
if the extraction is successful, extracting a thread from the thread pool according to a semaphore;
and if the extraction fails, after the semaphore is released, carrying out semaphore extraction operation.
In specific implementation, when the semaphore is taken out, the taking-out state of the semaphore needs to be judged, when the semaphore is occupied, the semaphore cannot be taken out, the taking-out state of the semaphore is taking-out failure, and after the semaphore needs to be released, the semaphore is taken out again until the semaphore is taken out successfully; and if the semaphore is successfully taken out, taking out the thread from the thread pool for the dispatch list.
The invention also provides a concrete application embodiment of the business card distribution method, which comprises the following concrete steps:
starting;
screening a list by service personnel;
the service personnel select a distribution channel;
clicking to dispatch;
reading the total number of the semaphores, and determining the total number of dispatch threads;
judging whether data is to be distributed or not;
if the data to be dispatched is to be dispatched, taking out a semaphore, if the semaphore is successfully taken out, taking out a thread from the thread pool, dispatching, calling a dispatcher interface to dispatch, completing dispatching of the data, releasing the thread, and returning to the thread pool;
if the semaphore fails to be taken out, waiting for release of the semaphore;
if no data to be dispatched exists, recovering all the semaphores, waiting for all the semaphores to be released, updating the dispatching state, and ending.
The list dispatching method of the embodiment of the invention realizes the limitation of the number of threads executed in multiple threads through the control of the semaphore, and simultaneously, the recovery of the semaphore completes the waiting processing of the execution result of the multiple threads. Within the range of machine performance, the dispatching speed can be rapidly expanded only by configuring the number of semaphores, and the dispatching speed is linearly improved. When the performance of the machine reaches the bottleneck, the performance can be improved in a semaphore sharing mode. That is to say, in the future continuous promotion of the number of business tickets, the performance can be promoted by times only by changing the number of the semaphore, and the requirement of the business on the performance is completed.
It should be noted that, a certain order does not necessarily exist between the above steps, and those skilled in the art can understand, according to the description of the embodiments of the present invention, that in different embodiments, the above steps may have different execution orders, that is, may be executed in parallel, may also be executed interchangeably, and the like.
Another embodiment of the present invention provides a device for distributing a business form, as shown in fig. 2, the device 1 includes:
the semaphore reading module 11 is configured to read a total semaphore when detecting that the list is sent with the command;
the judging module 12 is configured to judge whether data is to be distributed;
the thread calling and dispatching module 13 is used for calling a thread according to the semaphore if data are to be dispatched, carrying out list dispatching based on the thread, and releasing the thread after the dispatching is finished;
and the signal recovery module 14 is configured to recover all the semaphores and update the dispatch status if there is no data to be dispatched.
The specific implementation is shown in the method embodiment, and is not described herein again.
In one embodiment, the apparatus further includes a dispatch instruction triggering module, where the dispatch instruction triggering module is specifically configured to:
and acquiring a dispatching parameter set by a service worker, and triggering a list dispatching instruction according to the dispatching parameter.
The specific implementation is shown in the method embodiment, and is not described herein again.
In one embodiment, the dispatch instruction trigger module is further configured to:
acquiring a distribution list and a distribution channel set by a service worker, and entering a corresponding distribution page according to the distribution list and the distribution channel;
and detecting the click operation of a dispatching button of a service worker on the dispatching page, and triggering a list dispatching instruction.
The specific implementation is shown in the method embodiment, and is not described herein again.
In one embodiment, the semaphore reading module 11 is specifically configured to:
when the instruction sent by the list is detected, reading the total number of the semaphore;
and determining the total dispatching thread number according to the total semaphore.
The specific implementation is shown in the method embodiment, and is not described herein again.
In one embodiment, the thread invoking and dispatching module 13 is specifically configured to:
if the data is to be dispatched, taking out a semaphore, and taking out a thread in the thread pool according to the semaphore;
carrying out list dispatching according to the thread, and calling a dispatching interface to dispatch a list;
and after the completion of the list distribution is detected, releasing the semaphore, releasing the thread and returning the thread to the thread pool.
The specific implementation is shown in the method embodiment, and is not described herein again.
In one embodiment, the signal recovery module 14 is specifically configured to:
if no data to be dispatched exists, recovering all the semaphore;
detecting the release condition of the semaphore;
and if all the semaphores are released, updating the dispatching state.
The detailed description of the embodiments is omitted here for the embodiments of the method.
In one embodiment, the thread invoking and dispatching module 13 is further configured to:
if the data is to be dispatched, sending a semaphore output instruction and judging whether the semaphore is successfully taken out;
if the extraction is successful, extracting a thread from the thread pool according to a semaphore;
and if the extraction fails, after the semaphore is released, carrying out semaphore extraction operation.
The specific implementation is shown in the method embodiment, and is not described herein again.
Another embodiment of the present invention provides an electronic device, as shown in fig. 3, an electronic device 10 includes:
one or more processors 110 and a memory 120, where one processor 110 is illustrated in fig. 3, the processor 110 and the memory 120 may be connected by a bus or other means, and the connection by the bus is illustrated in fig. 3.
The processor 110 is used to implement various control logic for the electronic device 10, which may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a single chip, an ARM (Acorn RISC machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware controls, or any combination of these components. Also, the processor 110 may be any conventional processor, microprocessor, or state machine. Processor 110 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The memory 120 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the roster dispatch method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the device 10, i.e. implementing the roster dispatch method in the above-described method embodiments, by executing non-volatile software programs, instructions and units stored in the memory 120.
The memory 120 may include a storage program area and a storage data area, wherein the storage program area may store an application program required for operating the device, at least one function; the storage data area may store data created according to the use of the device 10, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 120 optionally includes memory located remotely from processor 110, which may be connected to device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more units are stored in the memory 120, which when executed by the one or more processors 110, perform the roster distribution method in any of the above-described method embodiments, e.g., performing the above-described method steps S100 to S400 in fig. 1.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, e.g., to perform method steps S100-S400 of fig. 1 described above.
By way of example, non-volatile storage media can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Synchronous RAM (SRAM), dynamic RAM, (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The disclosed memory controls or memories of the operating environments described herein are intended to comprise one or more of these and/or any other suitable types of memory.
Another embodiment of the invention provides a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of rosting of the above-described method embodiment. For example, the method steps S100 to S400 in fig. 1 described above are performed.
The above-described embodiments are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment.
Through the above description of the embodiments, it is clear to those skilled in the art that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions essentially or contributing to the related art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Conditional language such as "can," "might," or "may" is generally intended to convey that a particular embodiment can include (yet other embodiments do not include) particular features, elements, and/or operations, among others, unless specifically stated otherwise or otherwise understood within the context as used. Thus, such conditional language is also generally intended to imply that features, elements, and/or operations are in any way required for one or more embodiments or that one or more embodiments must include logic for deciding, with or without input or prompting, whether such features, elements, and/or operations are included or are to be performed in any particular embodiment.
What has been described herein in the specification and drawings includes examples that can provide a list serving method and apparatus. It will, of course, not be possible to describe every conceivable combination of components and/or methodologies for purposes of describing the various features of the disclosure, but it can be appreciated that many further combinations and permutations of the disclosed features are possible. It is therefore evident that various modifications can be made to the disclosure without departing from the scope or spirit thereof. In addition, or in the alternative, other embodiments of the disclosure may be apparent from consideration of the specification and drawings and from practice of the disclosure as presented herein. It is intended that the examples set forth in this specification and the drawings be considered in all respects as illustrative and not restrictive. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.

Claims (10)

1. A method for roster assignment, the method comprising:
when the instruction sent by the list is detected, reading the total number of the semaphore;
judging whether data is to be distributed or not;
if the data to be dispatched are to be dispatched, a thread is called according to the semaphore, the list dispatching is carried out based on the thread, and the thread is released after the dispatching is finished;
if no data to be dispatched exists, all the semaphores are recovered, and the dispatching state is updated.
2. The method of claim 1, wherein detecting that the list dispatches the instruction before reading the total number of semaphores comprises:
and acquiring a dispatching parameter set by a service worker, and triggering a list dispatching instruction according to the dispatching parameter.
3. The method of claim 2, wherein the obtaining of the dispatch parameters set by the service personnel and dispatching the instructions according to the dispatch parameter trigger list comprises:
acquiring a distribution list and a distribution channel set by a service worker, and entering a corresponding distribution page according to the distribution list and the distribution channel;
and detecting the click operation of a dispatching button of a service worker on the dispatching page, and triggering a list dispatching instruction.
4. The method of claim 1, wherein detecting that the list dispatches an instruction reads the total number of semaphores, comprising:
when the instruction sent by the list is detected, reading the total number of the semaphore;
and determining the total dispatching thread number according to the total semaphore.
5. The method of claim 4, wherein if data is to be dispatched, invoking a thread according to a semaphore, dispatching a list based on the thread, and releasing the thread after dispatching is completed comprises:
if the data is to be dispatched, taking out a semaphore, and taking out a thread in the thread pool according to the semaphore;
carrying out list dispatching according to the thread, and calling a dispatching interface to dispatch a list;
and after the completion of the list distribution is detected, releasing the semaphore, releasing the thread and returning the thread to the thread pool.
6. The method of claim 5, wherein if there is no data to be served, then recovering all semaphores and updating the serving status, comprises:
if no data to be dispatched exists, recovering all the semaphore;
detecting the release condition of the semaphore;
and if all the semaphores are released, updating the dispatching state.
7. The method of claim 5, wherein fetching a semaphore if data is to be dispatched, and fetching a thread in the thread pool based on a semaphore comprises:
if the data is to be dispatched, sending a semaphore output instruction and judging whether the semaphore is successfully taken out;
if the extraction is successful, extracting a thread from the thread pool according to a semaphore;
and if the taking out fails, waiting for the release of the semaphore and then carrying out semaphore taking-out operation.
8. An apparatus for business form distribution, the apparatus comprising:
the semaphore reading module is used for reading the total number of the semaphores when the semaphore sending instruction is detected;
the judging module is used for judging whether the data is to be distributed or not;
the thread calling and dispatching module is used for calling a thread according to the semaphore if the data is to be dispatched, dispatching a list based on the thread, and releasing the thread after the dispatching is finished;
and the signal recovery module is used for recovering all the semaphore and updating the dispatching state if the data to be dispatched does not exist.
9. An electronic device, characterized in that the electronic device comprises at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the roster dispatch method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the roster assignment method of any one of claims 1-7.
CN202210771796.5A 2022-06-30 2022-06-30 Method and device for sending name list and electronic equipment Pending CN115061824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210771796.5A CN115061824A (en) 2022-06-30 2022-06-30 Method and device for sending name list and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210771796.5A CN115061824A (en) 2022-06-30 2022-06-30 Method and device for sending name list and electronic equipment

Publications (1)

Publication Number Publication Date
CN115061824A true CN115061824A (en) 2022-09-16

Family

ID=83204791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210771796.5A Pending CN115061824A (en) 2022-06-30 2022-06-30 Method and device for sending name list and electronic equipment

Country Status (1)

Country Link
CN (1) CN115061824A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116521351A (en) * 2023-07-03 2023-08-01 建信金融科技有限责任公司 Multithreading task scheduling method and device, storage medium and processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116521351A (en) * 2023-07-03 2023-08-01 建信金融科技有限责任公司 Multithreading task scheduling method and device, storage medium and processor
CN116521351B (en) * 2023-07-03 2023-09-05 建信金融科技有限责任公司 Multithreading task scheduling method and device, storage medium and processor

Similar Documents

Publication Publication Date Title
CN107038645B (en) Service processing method, device and system and server
CN101882089A (en) Method for processing business conversational application with multi-thread and device thereof
CN107450971A (en) Task processing method and device
US9686134B2 (en) Method and configuration center server for configuring server cluster
CN115061824A (en) Method and device for sending name list and electronic equipment
CN113971519B (en) Robot scheduling method and device, electronic equipment and storage medium
CN113760611B (en) System site switching method and device, electronic equipment and storage medium
CN111784292A (en) Electronic passenger ticket refunding method and device, airline department system and payment system
CN110795166A (en) Data processing method and device
CN111338775B (en) Method and equipment for executing timing task
CN112667651A (en) Data communication method and device
CN111178568A (en) Service reservation request processing method, device, server and storage medium
CN115113939A (en) Exception handling method and device and electronic equipment
US20150120607A1 (en) System and method for customer event email consolidation and delivery
CN112995982B (en) Method, device, server and storage medium for scheduling cloud SIM card
CN112732819A (en) ETL-based data processing method, device, equipment and storage medium
CN113419829A (en) Job scheduling method, device, scheduling platform and storage medium
CN112446697A (en) Account checking method and device, computer equipment and storage medium
CN112667338A (en) Business line display control method and device, electronic equipment and storage medium
CN107402752B (en) Timing triggering method and device for application
CN117994015B (en) Bank job batch scheduling method and device, electronic equipment and storage medium
CN111163124B (en) Data synchronization method, data synchronization device, computer device and storage medium
CN109165200B (en) Data synchronization method and device, computing equipment and computer storage medium
CN116596540A (en) Information processing method and device and electronic equipment
CN113852686A (en) Block chain network communication method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination