Multi-thread processing method and device, equipment, medium and computer program product

By receiving business messages in multi-threaded processing technology, determining the target thread and selecting processing strategies based on business attributes, the existing multi-threaded processing problem is solved and more efficient data processing is achieved.

CN119718558APending Publication Date: 2025-03-28INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411517244.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing multi-threaded processing technology has low processing efficiency, which cannot meet the rapidly growing data processing needs, and is not efficient when processing multiple business messages.

Method used

By receiving target events containing business messages, multiple target threads of the target event are determined, and thread processing policies of the target thread pool are determined based on the business attributes of the target event, including sequential processing policies, managed processing policies and cancel processing policies, and multi-threading is performed to improve efficiency.

Benefits of technology

It improves the efficiency of multi-threaded processing, can process multiple business messages more effectively, and meets the rapidly growing data processing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718558A_ABST
    Figure CN119718558A_ABST
Patent Text Reader

Abstract

The invention provides a multi-thread processing method, device and equipment, a medium and a computer program product. The method comprises the following steps: receiving a target event containing a service message; determining a plurality of target threads of the target event based on the service message; determining a thread processing strategy of a target thread pool based on the service attribute of the target event; the target thread pool is determined based on the target thread; and performing multi-thread processing on a plurality of target threads based on the thread processing strategy to obtain an event processing result. According to the method and the device, the multi-thread processing efficiency is improved by performing corresponding strategy processing on the multiple threads for processing the target event.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a multi-thread processing method, device, equipment, medium and computer program product. Background Art

[0002] As communication devices increase, the data (such as alarm information) generated by communication devices also increases. Data processing capabilities have gradually become a bottleneck in system development. Existing data processing solutions cannot meet the data processing needs of all businesses. If stream processing or batch processing is introduced, this will increase the complexity of the technical solution and increase the cost of development and maintenance.

[0003] At the same time, the same business event can have a variety of messages, such as activity, clearing, and updating. How to process this data and improve processing efficiency has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a multi-thread processing method, device, equipment, medium and computer program product, which are used to solve the defect of low processing efficiency in the existing multi-thread processing technology and improve the multi-thread processing efficiency.

[0005] The present invention provides a multi-thread processing method, comprising the following steps.

[0006] Receive target events containing business messages; Based on the service message, determining multiple target threads of the target event; Determine a thread processing strategy of a target thread pool based on the business attribute of the target event; the target thread pool is determined based on the target thread; Based on the thread processing strategy, multi-thread processing is performed on multiple target threads to obtain event processing results.

[0007] According to a multi-thread processing method provided by the present invention, determining multiple target threads of the target event based on the service message includes: Performing field detection on the to-be-processed data corresponding to the target event to obtain a target program field for executing the service message; Based on the target program field, a plurality of target threads for processing the target event are determined.

[0008] According to a multi-thread processing method provided by the present invention, the multi-thread processing method further includes: Determining an event identifier of the target event; Based on the event identifier, determining a field identifier of the target program field; Based on the field identifier, determining a thread identifier of each of the target threads; The event identifier, the field identifier and the thread identifier are bound and stored.

[0009] According to a multi-thread processing method provided by the present invention, the multi-thread processing method further includes: Determine the thread capacity of the thread queue; When the total number of target threads is less than or equal to the thread capacity, there are managed threads other than target threads in the thread queue, and the priority of the target event is greater than the event corresponding to the managed thread, the managed thread will be replaced by the target thread pool that is not in the thread queue.

[0010] According to a multi-thread processing method provided by the present invention, determining the thread processing strategy of the target thread pool based on the business attribute of the target event includes: Get the data queue to be processed; Comparing the thread queue with the data queue to obtain multiple thread data matching results; Determine the priority of each thread data matching result based on the business attribute of the target event; Based on the priority of each thread data matching result, the thread processing strategy of the target thread pool is determined.

[0011] According to a multi-thread processing method provided by the present invention, the thread processing strategy includes a sequential processing strategy, a managed processing strategy and a cancellation processing strategy; performing multi-thread processing on multiple target threads based on the thread processing strategy to obtain an event processing result includes: In the case of the sequential processing strategy, the processing order of each target thread in the thread queue is adjusted by the target thread pool, and multi-thread processing is performed on multiple target threads based on the processing order to obtain an event processing result; In the case of the managed processing strategy, the threads to be managed in the thread queue are moved to the managed queue through the target thread pool, and multiple target threads in the moved thread queue are multi-threaded to obtain event processing results; In the case of the cancellation processing strategy, the threads to be removed in the thread queue are removed through the target thread pool, and multi-thread processing is performed on multiple target threads in the removed thread queue to obtain an event processing result.

[0012] The present invention also provides a multi-thread processing device, comprising the following modules: A target event receiving module, used for receiving a target event containing a business message; A target thread determination module, used to determine multiple target threads of the target event based on the service message; A thread processing strategy determination module, used to determine the thread processing strategy of a target thread pool based on the business attributes of the target event; the target thread pool is determined based on the target thread; The multi-thread processing module is used to perform multi-thread processing on multiple target threads based on the thread processing strategy to obtain event processing results.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the multi-thread processing methods described above when executing the computer program.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the multi-thread processing method described above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the multi-thread processing methods described above.

[0016] The multithread processing method, device, equipment, medium and computer program product provided by the present invention receive a target event containing a business message, determine multiple target threads for processing the target event through the business message; then determine the thread processing strategy of the target thread pool based on the business attribute of the target event, wherein the target thread pool is determined based on the target thread; finally, perform multithread processing on the multiple target threads through the thread processing strategy to obtain an event processing result. The present invention improves the multithread processing efficiency by performing corresponding strategy processing on the multiple threads for processing the target event. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 This is one of the flow charts of the multi-thread processing method provided by the present invention.

[0019] Figure 2 This is the second flowchart of the multi-thread processing method provided by the present invention.

[0020] Figure 3 It is a structural schematic diagram of the multi-thread processing device provided by the present invention.

[0021] Figure 4It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] Combine the following Figure 1-Figure 4 The present invention describes a multi-thread processing method, apparatus, device, medium and computer program product.

[0024] Figure 1 It is one of the flowcharts of the multi-thread processing method provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 100: Receive a target event including a business message; Specifically, for the received target event, the target event is first routed, and the processing path of the target event can be determined. Generally, the target event includes at least two types of business messages, such as activity, clearing, and updating. If the target event has an associated business, there may be more associated business messages. After receiving the data (of the target event), the unique identifier of the target event is obtained, and the hash value of the unique identifier is calculated. Based on the hash value, the total number of threads of the target event is modulo operation to ensure that the identifier of the same target event is processed on the same thread.

[0025] Step 200: Determine multiple target threads of the target event based on the service message; Specifically, the business message of the target event is analyzed to determine the number of threads required to process the target event, that is, to determine a plurality of target threads for processing the target event.

[0026] Step 300: Determine a thread processing strategy of a target thread pool based on the business attribute of the target event; the target thread pool is determined based on the target thread; Specifically, manage the target thread pool to ensure that the threads in the target thread pool can be created and destroyed in an orderly manner, set a reasonable life cycle for each thread, and ensure that each thread is available. At the same time, set different blocking queues for different business scenarios. For business scenarios with low requirements for data accuracy, the latest or oldest (pending) data can be discarded. For business scenarios with high requirements for data accuracy, the main thread can be blocked when the data cache queue is full to ensure that each pending data is processed normally and the data is accurately processed.

[0027] Step 400: Perform multi-thread processing on multiple target threads based on the thread processing strategy to obtain event processing results.

[0028] Specifically, based on the target thread and the data to be processed corresponding to each thread, a thread processing strategy is determined, including the processing priority of the data to be processed corresponding to the thread. The thread processing strategy includes the processing logic (such as the processing order) of the data corresponding to the thread. Finally, the multiple target threads are multi-threaded processed by the thread processing strategy to obtain the processing result of the target event.

[0029] This embodiment receives a target event including a business message, determines multiple target threads for processing the target event through the business message; then determines the thread processing strategy of the target thread pool based on the business attribute of the target event, wherein the target thread pool is determined based on the target thread; finally, multi-thread processing is performed on the multiple target threads through the thread processing strategy to obtain an event processing result. The present invention improves the multi-thread processing efficiency by performing corresponding strategy processing on the multiple threads for processing the target event.

[0030] In one embodiment, the multi-thread processing method provided in the embodiment of the present application may further include: Step 210: Perform field detection on the to-be-processed data corresponding to the target event to obtain the target program field for executing the service message; Step 220: Based on the target program field, determine multiple target threads for processing the target event.

[0031] Specifically, when starting the program corresponding to the target event, first set the number of threads to be started. Each thread corresponds to a thread pool, which are uniformly placed in the thread pool Map, and the thread pool Map is initialized. For the data of the received target event, the specific fields of the data are detected, and the keyBy operation (that is, the modulus operation on the number of threads) is performed to ensure that the result of the keyBy operation for each data is within the range of the total number of threads. This ensures that each program can find the corresponding thread. In general, the program field of keyBy selects the event unique identifier, which can ensure the timing of program field processing and ensure that the target events can be evenly distributed on the thread pool Map.

[0032] This embodiment accurately determines the number of target threads that process the target event by performing field detection on the to-be-processed data corresponding to the target event.

[0033] In one embodiment, the multi-thread processing method provided in the embodiment of the present application may further include: Step 10: determining the event identifier of the target event; Step 20: Determine the field identifier of the target program field based on the event identifier; Step 30: Determine the thread identifier of each target thread based on the field identifier; Step 40: Bind and store the event identifier, the field identifier, and the thread identifier.

[0034] Specifically, before determining the thread processing strategy, it is necessary to perform binding processing on the target event and the corresponding thread. First, determine the unique event identifier of the target event. Under the event identifier, perform field detection on the program data corresponding to the target event to determine all executable program fields corresponding to the target event (i.e., the target program fields in this embodiment). Each program field may correspond to a business message, or multiple program fields may correspond to a business message. The field identifier of the target program field has a corresponding relationship with the event identifier of the target event. It can be known that a thread can process a target program field, or a thread can process multiple target program fields at the same time. Based on the correspondence between the program field and the target thread, the thread identifier of each target thread is determined on the basis of the field identifier. Through the correspondence between the event identifier, the field identifier, and the thread identifier, the three are bound and stored, and are used to determine the execution relationship between the thread and the program field through multiple identifiers.

[0035] This embodiment determines the execution relationship between the thread and the program field by pre-storing the correspondence between the event identifier, the field identifier and the thread identifier, so as to facilitate the execution of the thread.

[0036] In one embodiment, the multi-thread processing method provided in the embodiment of the present application may further include: Step 500: Determine the thread capacity of the thread queue; Step 600: When the total number of target threads is less than or equal to the thread capacity, there are managed threads other than target threads in the thread queue, and the priority of the target event is greater than the event corresponding to the managed thread, the managed thread is replaced by the target thread pool with a target thread that is not in the thread queue.

[0037] Specifically, the threads in the thread queue are threads to be scheduled, and the thread queue has a certain queue capacity, that is, the number of threads that can be placed in the thread queue. When the total number of target threads is less than or equal to the thread capacity of the thread queue, it means that all target threads can be placed in the thread queue. In this case, if there are managed threads that are not target threads in the thread queue, and the priority of the managed thread is greater than the event corresponding to the managed thread, it means that the managed thread in the thread queue can be replaced. Through the target thread pool that can schedule threads, the target thread that is not in the thread queue is replaced with the managed thread. The above thread replacement scheme is applicable to the target event as a whole, whose priority is higher than other events, but it is not applicable to the case where the target event can be split into multiple executable business messages with different priorities. The latter can execute the above thread replacement scheme for the threads corresponding to multiple business messages with the same priority as a whole.

[0038] This embodiment executes threads in different orders according to event priorities, thereby improving the flexibility of thread processing.

[0039] Figure 2 This is the second flow chart of the multi-thread processing method provided by the present invention. Figure 2 As shown, the method may also include: Step 310: Obtain a queue of data to be processed; Step 320: Compare the thread queue with the data queue to obtain multiple thread data matching results; Step 330: Determine the priority of each thread data matching result based on the business attribute of the target event; Step 340: Determine the thread processing strategy of the target thread pool based on the priority of each thread data matching result.

[0040] Specifically, there is a corresponding relationship between the data queue to be processed and the thread queue to be scheduled, and the threads in the thread queue correspond to the data to be processed in the data queue. The thread queue is compared with the data queue to obtain a variety of thread data matching results, and the number of thread data matching results is the same as the number of different priorities of the target thread. In the case where the threads in the thread queue have different priorities, the priority of each thread data matching result is determined based on the business attributes of the events corresponding to each priority. The business attributes here refer to the processing requirements of the business. For events with higher business processing requirements, their priority is higher. On the contrary, for events with lower business processing requirements, their priority is lower. Through this event priority determination method, the priorities of different threads in the thread queue are determined. On the basis of these different thread priorities, the thread processing strategy of the target thread pool for different threads in the thread queue is determined.

[0041] This embodiment implements different scheduling strategies for threads in a thread queue according to event priorities, thereby improving the flexibility of thread processing.

[0042] In one embodiment, the multi-thread processing method provided in the embodiment of the present application may further include: Step 410: In the case of the sequential processing strategy, the processing order of each target thread in the thread queue is adjusted by the target thread pool, and multi-thread processing is performed on multiple target threads based on the processing order to obtain an event processing result; Step 420: In the case of the managed processing strategy, the threads to be managed in the thread queue are moved to the managed queue through the target thread pool, and multiple target threads in the moved thread queue are multi-threaded to obtain event processing results; Step 430: In the case of the cancellation processing strategy, the threads to be removed in the thread queue are removed through the target thread pool, and multi-thread processing is performed on the multiple target threads in the removed thread queue to obtain an event processing result.

[0043] Specifically, the thread processing strategy determined based on the target thread may include a sequential processing strategy, a managed processing strategy, and a cancellation processing strategy. The sequential processing strategy refers to the processing order of different threads in the thread queue, which is determined based on the priority corresponding to the thread. The threads are scheduled and processed in order from high to low thread priority. Correspondingly, the threads are used to process the data to be processed in the data queue. The managed processing strategy refers to the managed processing of certain threads in the thread queue, which are generally threads with low time requirements, and the data to be processed by the managed thread is not in the data queue corresponding to the thread queue, that is, the managed thread is waiting for the data to be processed. In this case, the managed thread is moved to the queue corresponding to the managed thread, and the data corresponding to the managed thread arrives, and then the managed thread is moved to the thread queue. The cancellation processing strategy means that the data corresponding to certain threads in the thread queue does not need to be processed, and the thread corresponding to the data needs to be removed.

[0044] The above-mentioned managed processing strategy and cancel processing strategy can be coordinated with the sequential processing strategy. After the thread managed processing or cancel processing is performed, the remaining threads in the thread queue are sequentially processed.

[0045] This embodiment flexibly processes thread queues through a variety of thread processing strategies, thereby improving multi-thread processing efficiency.

[0046] The multi-thread processing device provided by the present invention is described below. The multi-thread processing device described below and the multi-thread processing method described above can be referred to each other.

[0047] Please refer to Figure 3 The present invention also provides a multi-thread processing device, comprising: The target event receiving module 301 is used to receive the target event including the business message; A target thread determination module 302, configured to determine multiple target threads of the target event based on the service message; A thread processing strategy determination module 303, used to determine a thread processing strategy of a target thread pool based on the business attributes of the target event; the target thread pool is determined based on the target thread; The multi-thread processing module 304 is used to perform multi-thread processing on multiple target threads based on the thread processing strategy to obtain event processing results.

[0048] Optionally, the target thread determination module includes: A field detection unit, used to perform field detection on the to-be-processed data corresponding to the target event, and obtain a target program field for executing the service message; The target thread determination unit is used to determine multiple target threads for processing the target event based on the target program field.

[0049] Optionally, the multi-thread processing device further includes: An event identifier determination module, used to determine the event identifier of the target event; A field identification determination module, used to determine the field identification of the target program field based on the event identification; A thread identification determination module, used to determine the thread identification of each target thread based on the field identification; The identifier binding storage module is used to bind and store the event identifier, the field identifier and the thread identifier.

[0050] Optionally, the multi-thread processing device further includes: A thread capacity determination module, used to determine the thread capacity of the thread queue; A thread replacement module is used to replace the managed thread with a target thread that is not in the thread queue through the target thread pool when the total number of target threads is less than or equal to the thread capacity, there are managed threads other than the target threads in the thread queue, and the priority of the target event is greater than the event corresponding to the managed thread.

[0051] Optionally, the thread processing strategy determination module includes: A data queue acquisition unit, used for acquiring a data queue to be processed; A thread data comparison unit, used for comparing the thread queue with the data queue to obtain a plurality of thread data matching results; A thread data matching result priority determination unit, configured to determine the priority of each thread data matching result based on the business attribute of the target event; The thread processing strategy determination unit is used to determine the thread processing strategy of the target thread pool based on the priority of each thread data matching result.

[0052] Optionally, the thread processing strategy includes a sequential processing strategy, a managed processing strategy and a cancellation processing strategy; and the multi-thread processing module includes: A sequential processing strategy execution unit, used for adjusting the processing order of each target thread in the thread queue through the target thread pool under the sequential processing strategy, performing multi-thread processing on multiple target threads based on the processing order, and obtaining an event processing result; A managed processing strategy execution unit, used for, in the case of the managed processing strategy, moving the threads to be managed in the thread queue to the managed queue through the target thread pool, performing multi-thread processing on the multiple target threads in the moved thread queue, and obtaining an event processing result; The cancellation processing strategy execution unit is used to remove the threads to be removed in the thread queue through the target thread pool under the cancellation processing strategy, and perform multi-thread processing on multiple target threads in the removed thread queue to obtain event processing results.

[0053] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a multithreading processing method, which includes: receiving a target event containing a business message; determining multiple target threads of the target event based on the business message; determining a thread processing strategy of a target thread pool based on the business attribute of the target event; the target thread pool is determined based on the target thread; and performing multithreading processing on multiple target threads based on the thread processing strategy to obtain an event processing result.

[0054] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0055] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multi-threaded processing method provided by the above-mentioned methods, which includes: receiving a target event containing a business message; based on the business message, determining multiple target threads of the target event; based on the business attributes of the target event, determining a thread processing strategy of a target thread pool; the target thread pool is determined based on the target thread; and multi-threading processing is performed on multiple target threads based on the thread processing strategy to obtain an event processing result.

[0056] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the multi-threaded processing method provided by the above-mentioned methods, the method comprising: receiving a target event containing a business message; based on the business message, determining multiple target threads of the target event; based on the business attributes of the target event, determining a thread processing strategy of a target thread pool; the target thread pool is determined based on the target thread; and multi-threading processing is performed on multiple target threads based on the thread processing strategy to obtain an event processing result.

[0057] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-thread processing method, characterized in that: include: Receive target events containing business messages; Based on the service message, determining multiple target threads of the target event; Determining a thread processing strategy of a target thread pool based on the business attributes of the target event; The target thread pool is determined based on the target thread; Based on the thread processing strategy, multi-thread processing is performed on multiple target threads to obtain event processing results.

2. The multi-thread processing method according to claim 1, characterized in that: The determining, based on the service message, a plurality of target threads of the target event comprises: Performing field detection on the to-be-processed data corresponding to the target event to obtain a target program field for executing the service message; Based on the target program field, a plurality of target threads for processing the target event are determined.

3. The multi-thread processing method according to claim 2, characterized in that: The multi-thread processing method further includes: Determining an event identifier of the target event; Based on the event identifier, determining a field identifier of the target program field; Based on the field identifier, determining a thread identifier of each of the target threads; The event identifier, the field identifier and the thread identifier are bound and stored.

4. The multi-thread processing method according to claim 3, characterized in that: The multi-thread processing method further includes: Determine the thread capacity of the thread queue; When the total number of target threads is less than or equal to the thread capacity, there are managed threads other than target threads in the thread queue, and the priority of the target event is greater than the event corresponding to the managed thread, the managed thread will be replaced by the target thread pool that is not in the thread queue.

5. The multi-thread processing method according to claim 4, characterized in that: Determining the thread processing strategy of the target thread pool based on the business attribute of the target event includes: Get the data queue to be processed; Comparing the thread queue with the data queue to obtain multiple thread data matching results; Determine the priority of each thread data matching result based on the business attribute of the target event; Based on the priority of each thread data matching result, the thread processing strategy of the target thread pool is determined.

6. The multi-thread processing method according to claim 4, characterized in that: The thread processing strategy includes a sequential processing strategy, a managed processing strategy and a cancellation processing strategy; the multi-thread processing of multiple target threads based on the thread processing strategy to obtain an event processing result includes: In the case of the sequential processing strategy, the processing order of each target thread in the thread queue is adjusted by the target thread pool, and multi-thread processing is performed on multiple target threads based on the processing order to obtain an event processing result; In the case of the managed processing strategy, the threads to be managed in the thread queue are moved to the managed queue through the target thread pool, and multiple target threads in the moved thread queue are multi-threaded to obtain event processing results; In the case of the cancellation processing strategy, the threads to be removed in the thread queue are removed through the target thread pool, and multi-thread processing is performed on multiple target threads in the removed thread queue to obtain an event processing result.

7. A multi-thread processing device, characterized in that: include: A target event receiving module, used for receiving a target event containing a business message; A target thread determination module, used to determine multiple target threads of the target event based on the service message; A thread processing strategy determination module, used to determine the thread processing strategy of the target thread pool based on the business attributes of the target event; The target thread pool is determined based on the target thread; The multithread processing module is used to perform multithread processing on multiple target threads based on the thread processing strategy to obtain event processing results.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the multi-thread processing method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-thread processing method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multi-thread processing method according to any one of claims 1 to 6 is implemented.