Thread pool scheduling method and device, electronic equipment and readable storage medium

By identifying and deleting false data and prioritizing it, the problem of resource waste in the thread pool when processing business data is solved, and more efficient resource utilization is achieved.

CN118550693APending Publication Date: 2024-08-27CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410600964.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

The existing thread pool scheduling method has the problem of wasting resources when processing business data because false data needs to be processed.

Method used

By obtaining the word vector information of the business data to be processed, false data is identified and deleted from the preset database, the data queue to be processed is updated, and priority is sorted according to the business type information, thereby optimizing thread scheduling.

Benefits of technology

It reduces the processing of false data by the thread pool, improves resource utilization, and avoids waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550693A
    Figure CN118550693A
Patent Text Reader

Abstract

The invention discloses a thread pool scheduling method and device, electronic equipment and a readable storage medium, and belongs to the technical field of communication. The method comprises the steps of obtaining word vector information of each piece of business data in a to-be-processed business data queue in a thread pool; based on the word vector information, obtaining second business data associated with the first business data in the to-be-processed business data queue from a preset database; when the second business data is false business data, deleting the first business data from the to-be-processed business data queue to obtain an updated to-be-processed business data queue; performing priority ranking on the business data in the updated to-be-processed business data queue based on the business type information of each piece of business data in the updated to-be-processed business data queue to obtain a ranking relationship of the business data in the updated to-be-processed business data queue; and performing thread scheduling on the business data in the updated to-be-processed business data queue according to the sorting relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a thread pool scheduling method, device, electronic device and readable storage medium. Background Art

[0002] When processing business in the business field of enterprise services, public services, and commercial fields, it is necessary to process a variety of business data, such as identity cards, social security certificates, dates, amounts, and other information. Each type of business data requires scheduling a thread in the thread pool to verify and compare the data.

[0003] In the existing thread pool scheduling method, threads are scheduled in sequence to verify all business data entering the thread pool. However, in the actual working process, some business data is false data. The thread pool processes the false data, which will lead to a waste of thread pool resources. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a thread pool scheduling method, device, electronic device and readable storage medium, which can solve the problem of resource waste in the existing thread pool scheduling method.

[0005] In a first aspect, the present application provides a thread pool scheduling method, the method comprising:

[0006] Obtain the word vector information of each business data in the business data queue to be processed in the thread pool;

[0007] Based on the word vector information, obtaining second business data associated with the first business data in the to-be-processed business data queue from a preset database;

[0008] In the case where the second service data is false service data, deleting the first service data from the queue of service data to be processed to obtain an updated queue of service data to be processed;

[0009] Based on the updated service type information of each service data in the queue of service data to be processed, the service data in the queue of service data to be processed are prioritized to obtain an updated sorting relationship of the service data in the queue of service data to be processed;

[0010] According to the sorting relationship, thread scheduling is performed on the updated business data in the queue of pending business data.

[0011] In a second aspect, the present application provides a thread pool scheduling device, the device comprising:

[0012] The first acquisition module is used to obtain the word vector information of each business data in the business data queue to be processed in the thread pool;

[0013] A second acquisition module, configured to acquire, from a preset database based on the word vector information, second business data associated with the first business data in the to-be-processed business data queue;

[0014] An updating module, configured to delete the first service data from the queue of service data to be processed, and obtain an updated queue of service data to be processed, when the second service data is false service data;

[0015] A sorting module, used to sort the service data in the updated queue of service data to be processed based on the service type information of each service data in the updated queue of service data to be processed, so as to obtain the sorting relationship of the service data in the updated queue of service data to be processed;

[0016] The scheduling module is used to perform thread scheduling on the updated business data in the to-be-processed business data queue according to the sorting relationship.

[0017] In a third aspect, the present application provides an electronic device comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the thread pool scheduling method as described in the first aspect.

[0018] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the thread pool scheduling method described in the first aspect are implemented.

[0019] In a fifth aspect, the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the thread pool scheduling method as described in the first aspect.

[0020] In an embodiment of the present application, based on the word vector information of the business data in the business data queue to be processed, the second business data associated with each business data is found from a preset database. When the second business data is false business data, the first business data in the business data queue to be processed associated with the second business data is deleted to obtain an updated business data queue to be processed, and then the business data in the updated business data queue to be processed is sorted to obtain a sorting relationship between the business data in the updated business data queue to be processed, and the threads in the thread pool are called in sequence according to the sorting relationship to process the business data. In the above process, since the first business data associated with the false business data in the business data queue to be processed is removed, the thread pool does not need to process the false data, thereby reducing the waste of resources of the thread pool. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 A flowchart of a thread pool scheduling method provided in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of the structure of a thread pool scheduling device provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0027] The present application embodiment provides a thread pool scheduling method, such as Figure 1 As shown, the method comprises the following steps:

[0028] Step 101, obtain the word vector information of each business data in the queue of business data to be processed in the thread pool.

[0029] In this step, the business data in the queue of pending business data may be various business data such as identity card, social security certificate, date, amount, etc.

[0030] The way to obtain word vector information of business data is as follows:

[0031] Extracting the data to be verified from the business data through optical character recognition (OCR);

[0032] Performing data preprocessing on the data to be verified to obtain processed data;

[0033] Based on the processed data, word vector information of the initial business data is determined.

[0034] Among them, the following explanation is made for "data to be verified of business data": the materials submitted by users to reflect business data can be diverse. For example, for an ID card, the user can send the name, gender, and ID card number, then the data to be verified is the sent name, gender, and ID card number; for the same ID card, the user can also send a picture of the ID card, then OCR can be used to extract the name, gender, and ID card number from the picture of the ID card to wait for verification data.

[0035] The above data preprocessing can be processing missing values, deleting duplicates, etc., to improve the accuracy of the data to be verified extracted by OCR. After obtaining the data to be verified, the words contained in the data to be verified are represented in the form of numerical vectors by querying the vocabulary table, so that the computer can recognize and process them. It can be understood that the word vector information of the business data is a numerical vector used to represent the content of the corresponding business data.

[0036] Step 102: Based on the word vector information, obtain second business data associated with the first business data in the to-be-processed business data queue from a preset database.

[0037] In this step, the first service data is any service data contained in the queue of service data to be processed.

[0038] The second business data is the business data included in the preset database. The business data processed in the historical business processing process is collected, and the word vector information of the processed business data and the label information of the processed business data are obtained. Among them, the label information is used to indicate that the corresponding business data is real business data or false business data. The label information can be manually assigned. The preset database includes processed business data, word vector information of processed business data, and label information of the processed business data.

[0039] According to the similarity between the word vector information corresponding to the first business data and the word vector information corresponding to the business data in the preset database, when the similarity is greater than a certain preset value, the business data in the preset database can be confirmed as the second business data associated with the first business data.

[0040] Step 103: In the case where the second service data is false service data, the first service data is deleted from the queue of service data to be processed to obtain an updated queue of service data to be processed.

[0041] In this step, if the second business data is false business data, it means that the first business data associated with the second business data is also false business data. The first business data is deleted from the queue of business data to be processed, and an updated queue of business data to be processed is obtained, thereby reducing the amount of business data to be processed in the queue of business data to be processed.

[0042] Step 104 , based on the updated service type information of each service data in the service data queue to be processed, prioritize the service data in the updated service data queue to be processed to obtain the updated sorting relationship of the service data in the service data queue to be processed.

[0043] After the false business data in the queue of pending business data is removed in step 103, the remaining business data, that is, the business data in the updated queue of pending business data is prioritized. Priority sorting can be random or can be sorted by business type information. It should be noted that the business type information includes multiple categories, such as the access type of the business, the verification channel of the business. For example, the third business data is obtained by accessing a national database, and the fourth business data is obtained by accessing a local database. Then the business type information of the third business data and the fourth business data is national and local respectively; for example, the fifth business data needs to be verified with the first department, and the sixth business data needs to be verified with the second department. Then the business type information of the fifth business data and the sixth business data is the first department and the second department respectively. It should be noted that when prioritizing according to the business type information, the specific type of the business data in the same category is referenced.

[0044] The method of priority sorting according to business type information can be: first randomly sort different business type information, and then randomly sort at least one business data belonging to the same business type, so as to form a processing method of first processing the business data of the same business type and then processing other business data of the same type. For example, the first type, the second type and the third type are randomly sorted as 1, 2, and 3. The first type includes data 1 and data 2, the second type includes data 3, and the third type includes data 4 and data 5. The random sorting result of the first type of data is data 2 and data 1, and the random sorting result of the third type of data is data 4 and data 5. Then the final sorting relationship is data 2, data 1, data 3, data 4 and data 5.

[0045] Step 105 , performing thread scheduling on the updated service data in the to-be-processed service data queue according to the sorting relationship.

[0046] After obtaining the updated sorting relationship of the business data in the pending business data queue, the corresponding threads in the thread pool are called in sequence for processing according to the sorting relationship. It should be noted that the thread pool includes multiple threads, and the priority levels of the threads can be set in advance, such as Y1, Y2, Y3, and Y4. When calling the threads, they are called in order from high to low priority.

[0047] In the method of the embodiment of the present application, based on the word vector information of the business data in the business data queue to be processed, the second business data associated with each business data is found from the preset database. When the second business data is false business data, the first business data in the business data queue to be processed associated with the second business data is deleted to obtain an updated business data queue to be processed, and then the business data in the updated business data queue to be processed is sorted to obtain the sorting relationship of the business data in the updated business data queue to be processed, and the threads in the thread pool are called in sequence according to the sorting relationship to process the business data. In the above process, since the first business data associated with the false business data in the business data queue to be processed is removed, the thread pool does not need to process the false data, thereby reducing the waste of resources of the thread pool.

[0048] Optionally, step 102, based on the word vector information, obtaining second business data associated with the first business data in the to-be-processed business data queue from a preset database includes:

[0049] Inputting the word vector information of the first business data into a word vector type classifier to obtain a word vector type of the first business data, wherein the word vector type includes at least one of the following: number, text, and picture;

[0050] Based on the word vector type of the first business data, determine N data to be compared from the preset database, where the word vector type of the N data to be compared is consistent with the word vector type of the first business data, and N is a positive integer;

[0051] Based on the word vector information, second business data associated with the first business data is obtained from the N data to be compared.

[0052] Since the words contained in the business data may exist in the form of multiple segments, for example, the business data of the ID card information includes name, gender, ID card number, etc., then the word vector information corresponding to the business data is actually multiple word vectors, rather than a single word vector. The multiple word vectors are weighted averaged and unit vectorized to obtain the mean unit word vector, which represents the business data in a more concise form. Therefore, in this embodiment, the word vector information of the first business data can also be the mean unit word vector of the multiple word vectors corresponding to the first business data.

[0053] For the word vector type classifier, the K-Nearest Neighbors algorithm (KNN algorithm) can be used for training. The training data is the mean unit word vector, and the label is the manually marked word vector type. The training data is input into the model to be trained (the model to be trained uses the K-Nearest Neighbors algorithm) for iterative training. The output data of the model to be trained is compared with the label to obtain the loss value. The model parameters of the model to be trained are adjusted according to the loss value. When the number of training iterations reaches the preset number or the loss value is less than the preset value, the model to be trained is determined as a word vector type classifier.

[0054] Regarding the word vector type of the first business data, it should be noted that when obtaining the first business data, the first business data may be expressed in the form of numbers, text, letters, pictures, etc., and the word vector type is used to indicate the expression form of the first business data.

[0055] According to the word vector type of the first business data, N data to be compared whose word vector types are consistent with the word vector type of the first business data are determined from a preset database, and then the word vector information of the first business data is compared with the word vector information of the N data to be compared to obtain the similarity, and the data to be compared whose similarity is greater than a preset threshold is confirmed as the second business data associated with the first business data.

[0056] In this embodiment, the word vector type of the first business data is first used to find data to be compared that has the same word vector type from a preset database, and then the second business data is determined from the data to be compared. This avoids comparing the first business data with all business data in the preset database to find the second business data, reduces the amount of data required to be processed to confirm the second business data, and improves efficiency.

[0057] Optionally, in step 102, acquiring second business data associated with the first business data from the N to-be-compared data based on the word vector information includes:

[0058] Performing a similarity comparison between the word vector information of the first business data and the N word vector information of the N data to be compared, to obtain N vector cosine similarity values, wherein the N vector cosine similarity values ​​correspond one-to-one to the N data to be compared;

[0059] Determine a target vector cosine similarity value from the N vector cosine similarity values, wherein the target vector cosine similarity value is greater than a preset threshold;

[0060] The data to be compared corresponding to the cosine similarity value of the target vector is determined as the second business data.

[0061] In this embodiment, the vector cosine similarity values ​​between the mean unit word vector of the first business data and the mean unit word vector of the data to be compared are calculated in sequence. It can be understood that the larger the vector cosine similarity value, the more similar the two word vectors are. The data to be compared whose vector cosine similarity is greater than a preset threshold is confirmed as the second business data. Optionally, the preset threshold can be 0.85. By setting a preset threshold, the second business data with a high similarity to the first business data can be quickly confirmed. In the case where the second business data is false business data, the first business data can be considered to be false business data.

[0062] In another optional embodiment, the acquiring, based on the word vector information, second business data associated with the first business data from the N to-be-compared data includes:

[0063] Performing a similarity comparison between the word vector information of the first business data and the N word vector information of the N data to be compared, to obtain N vector cosine similarity values, wherein the N vector cosine similarity values ​​correspond one-to-one to the N data to be compared;

[0064] Selecting a target vector cosine similarity value from the N vector cosine similarity values ​​in descending order, wherein the number of the target vector cosine similarity values ​​is consistent with a preset number;

[0065] The data to be compared corresponding to the cosine similarity value of the target vector is determined as the second business data.

[0066] In this embodiment, the N vector cosine similarity values ​​are sorted, and the M vector cosine similarity values ​​with the highest values ​​are selected, and the data to be compared corresponding to the M vector cosine similarity values ​​are determined as the second business data, and the value of M is consistent with the preset number. In the M second business data, if the number of false business data is greater than the real business data, it can be considered that the first business data is also false business data, and the first business data is deleted from the queue of business data to be processed.

[0067] In another optional embodiment, based on the above-mentioned sorting of the N vector cosine similarity values ​​and selecting M vector cosine similarity values ​​therefrom, the M vector cosine similarity values ​​also need to be greater than a preset threshold, so as to avoid the situation where the similarity between the second business data corresponding to the selected M vector cosine similarity values ​​and the first business data is too low.

[0068] Optionally, step 104, based on the updated service type information of each service data in the service data queue to be processed, prioritizes the service data in the updated service data queue to be processed to obtain the updated sorting relationship of the service data in the service data queue to be processed, including:

[0069] Determining the importance of each service data in the updated service data queue to be processed based on the service type information of each service data in the service data queue to be processed;

[0070] Based on the importance of each business data in the updated business data queue to be processed and the time order in which each business data in the updated business data queue to be processed enters the thread pool, the business data in the updated business data queue to be processed are prioritized to obtain the sorting relationship of the business data in the updated business data queue to be processed.

[0071] Among them, the business type information can be the access type of the business, the verification channel of the business, etc. Take the verification channel as an example of business type information, for example, the verification channels are sorted by priority as the first channel, the second channel, and the third channel. The importance of the business data in the updated pending business data queue is determined by the verification channel described by the business data. The higher the priority of the verification channel, the higher the importance of the corresponding business data. After determining the importance of each business data, the sorting relationship between two business data at the same importance is determined according to the time order of the two business data entering the thread pool. The earlier the time order, the higher the sorting relationship.

[0072] In this embodiment, it is considered that different business data have different priorities when being processed. For example, business data involving unique identification, such as ID number, social security number, social unified credit code, etc., must have a higher priority than business data such as name, gender, name, registered address, etc. Therefore, when the resources of the thread pool are limited, priority resources are used to process the business data with high priority first, and then the business data with lower importance. Even when there is a problem in the operation of the thread pool, the remaining unprocessed business data is of lower importance, which can be processed later, thereby improving resource utilization to a certain extent.

[0073] Optionally, in step 105, after thread scheduling is performed on the updated service data in the queue of service data to be processed according to the sorting relationship, the method further includes:

[0074] Obtaining operation data of the thread pool, the operation data including at least one of the following: activity, capacity utilization, number of cycle rejections, service queuing time, and service execution time;

[0075] When the operating data exceeds the corresponding operating data threshold, an early warning message is issued.

[0076] Specifically, the activity of the thread pool can be calculated based on the number of active threads and the maximum number of threads in the thread pool; the capacity utilization rate of the thread pool can be calculated based on the business data in the queue of the thread pool and the queue capacity; the periodic rejection number of the thread pool can be calculated based on the maximum number of rejections and the minimum number of rejections in the thread pool within a specified time period. It should be noted that the rejection of the thread pool means that when the number of threads in the thread pool has reached the maximum limit and the task queue is full, the thread pool cannot accept new tasks, then the thread pool will reject the task; the business queuing time of the thread pool can be calculated based on the system current time of the thread pool and the business submission time; the business execution time of the thread pool can be calculated based on the system current time of the thread pool and the time when the business starts processing.

[0077] The triggering conditions of the warning information include at least one of the following:

[0078] During a certain duration, the activity of the thread pool exceeds the preset activity threshold;

[0079] During a certain period of time, the capacity utilization of the thread pool exceeds the preset capacity utilization threshold;

[0080] During a certain duration, the number of cycle rejections of the thread pool exceeds the preset cycle rejection threshold;

[0081] During a certain duration, the service queue time of the thread pool exceeds the preset service queue time threshold;

[0082] During a certain duration, the business execution time of the thread pool exceeds the preset business execution time threshold.

[0083] In this embodiment, by obtaining the running data of the thread pool and comparing the running data with the preset running data threshold, an early warning message can be triggered under certain conditions. The triggered early warning message can promptly remind relevant personnel to manage the thread pool, thereby ensuring the running stability of the thread pool.

[0084] like Figure 2 As shown, the embodiment of the present application also provides a thread pool scheduling device 200, including:

[0085] The first acquisition module 201 is used to obtain word vector information of each business data in the business data queue to be processed in the thread pool;

[0086] A second acquisition module 202 is used to acquire, from a preset database based on the word vector information, second business data associated with the first business data in the to-be-processed business data queue;

[0087] An updating module 203, configured to delete the first service data from the queue of service data to be processed, and obtain an updated queue of service data to be processed, when the second service data is false service data;

[0088] A sorting module 204 is used to sort the service data in the updated service data queue to be processed based on the service type information of each service data in the updated service data queue to be processed, so as to obtain the sorting relationship of the service data in the updated service data queue to be processed;

[0089] The scheduling module 205 is used to perform thread scheduling on the updated business data in the to-be-processed business data queue according to the sorting relationship.

[0090] Optionally, the second acquisition module 202 includes:

[0091] A classification submodule, configured to input the word vector information of the first business data into a word vector type classifier to obtain a word vector type of the first business data, wherein the word vector type includes at least one of the following: number, text, and picture;

[0092] A first determination submodule is used to determine N to-be-compared data from the preset database based on the word vector type of the first business data, where the word vector type of the N to-be-compared data is consistent with the word vector type of the first business data, and N is a positive integer;

[0093] The first acquisition submodule is used to acquire second business data associated with the first business data from the N data to be compared based on the word vector information.

[0094] Optionally, the first acquisition submodule includes:

[0095] A comparison unit, used for performing similarity comparison between the word vector information of the first business data and the N word vector information of the N data to be compared, to obtain N vector cosine similarity values, wherein the N vector cosine similarity values ​​correspond one-to-one to the N data to be compared;

[0096] A first determining unit, configured to determine a target vector cosine similarity value from the N vector cosine similarity values, wherein the target vector cosine similarity value is greater than a preset threshold;

[0097] The second determining unit is used to determine the to-be-compared data corresponding to the cosine similarity value of the target vector as the second business data.

[0098] Optionally, the first acquisition submodule includes:

[0099] A comparison unit, used for performing similarity comparison between the word vector information of the first business data and the N word vector information of the N data to be compared, to obtain N vector cosine similarity values, wherein the N vector cosine similarity values ​​correspond one-to-one to the N data to be compared;

[0100] A selection unit, configured to select a target vector cosine similarity value from the N vector cosine similarity values ​​in descending order of values, wherein the number of the target vector cosine similarity values ​​is consistent with a preset number;

[0101] The third determining unit is used to determine the to-be-compared data corresponding to the cosine similarity value of the target vector as the second business data.

[0102] Optionally, the sorting module 204 includes:

[0103] A second determination submodule, configured to determine the importance of each service data in the updated service data queue to be processed based on the service type information of each service data in the service data queue to be processed;

[0104] The sorting submodule is used to prioritize the business data in the updated business data queue to be processed based on the importance of each business data in the updated business data queue to be processed and the time order in which each business data in the updated business data queue to be processed enters the thread pool, so as to obtain the sorting relationship of the business data in the updated business data queue to be processed.

[0105] Optionally, the thread pool scheduling device 200 further includes:

[0106] A third acquisition module is used to obtain the operation data of the thread pool, wherein the operation data includes at least one of the following: activity, capacity utilization, number of cycle rejections, service queuing time, and service execution time;

[0107] The early warning module is used to issue an early warning message when the operating data exceeds the corresponding operating data threshold.

[0108] It should be noted that the thread pool scheduling device 200 provided in the embodiment of the present application can implement the following Figure 1 The entire technical process of the thread pool scheduling method shown in the embodiment achieves the same technical effect, and will not be repeated here to avoid repetition.

[0109] The embodiment of the present application also provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program is executed by the processor to implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0110] For details, see Figure 3 As shown, an embodiment of the present application further provides an electronic device, including a bus 301 , a transceiver 302 , an antenna 303 , a bus interface 304 , a processor 305 and a memory 306 .

[0111] In this embodiment, the electronic device further includes: a computer program stored in the memory 306 and executable on the processor 305. When the computer program is executed by the processor 305, the following can be achieved: Figure 1 The various processes of the thread pool scheduling method shown in the embodiment can achieve the same technical effect. To avoid repetition, they will not be described here.

[0112] exist Figure 3 In the embodiment, the bus architecture (represented by bus 301) is shown, and bus 301 may include any number of interconnected buses and bridges, and bus 301 links various circuits including one or more processors represented by processor 305 and memory represented by memory 306. Bus 301 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 304 provides an interface between bus 301 and transceiver 302. Transceiver 302 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 305 is transmitted on a wireless medium via antenna 303, and further, antenna 303 also receives data and transmits the data to processor 305.

[0113] The processor 305 is responsible for managing the bus 301 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 306 can be used to store data used by the processor 305 when performing operations.

[0114] Optionally, the processor 305 may be a CPU, an ASIC, an FPGA or a CPLD.

[0115] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned thread pool scheduling method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, ROM, RAM, a magnetic disk or an optical disk.

[0116] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the thread pool scheduling method embodiment shown in the figure can achieve the same technical effect. To avoid repetition, they will not be described here.

[0117] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0119] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A thread pool scheduling method, characterized in that: The method comprises: Obtain the word vector information of each business data in the business data queue to be processed in the thread pool; Based on the word vector information, obtaining second business data associated with the first business data in the to-be-processed business data queue from a preset database; In the case where the second service data is false service data, deleting the first service data from the queue of service data to be processed to obtain an updated queue of service data to be processed; Based on the updated service type information of each service data in the queue of service data to be processed, the service data in the queue of service data to be processed are prioritized to obtain an updated sorting relationship of the service data in the queue of service data to be processed; According to the sorting relationship, thread scheduling is performed on the updated business data in the queue of pending business data.

2. The method according to claim 1, characterized in that The acquiring, based on the word vector information, second business data associated with the first business data in the to-be-processed business data queue from a preset database includes: Inputting the word vector information of the first business data into a word vector type classifier to obtain a word vector type of the first business data, wherein the word vector type includes at least one of the following: number, text, and picture; Based on the word vector type of the first business data, determine N data to be compared from the preset database, where the word vector type of the N data to be compared is consistent with the word vector type of the first business data, and N is a positive integer; Based on the word vector information, second business data associated with the first business data is obtained from the N data to be compared.

3. The method according to claim 2, characterized in that The acquiring, based on the word vector information, second business data associated with the first business data from the N to-be-compared data includes: Performing a similarity comparison between the word vector information of the first business data and the N word vector information of the N data to be compared, to obtain N vector cosine similarity values, wherein the N vector cosine similarity values ​​correspond one-to-one to the N data to be compared; Determine a target vector cosine similarity value from the N vector cosine similarity values, wherein the target vector cosine similarity value is greater than a preset threshold; The data to be compared corresponding to the cosine similarity value of the target vector is determined as the second business data.

4. The method according to claim 2, characterized in that The acquiring, based on the word vector information, second business data associated with the first business data from the N to-be-compared data includes: Performing a similarity comparison between the word vector information of the first business data and the N word vector information of the N data to be compared, to obtain N vector cosine similarity values, wherein the N vector cosine similarity values ​​correspond one-to-one to the N data to be compared; Selecting a target vector cosine similarity value from the N vector cosine similarity values ​​in descending order, wherein the number of the target vector cosine similarity values ​​is consistent with a preset number; The data to be compared corresponding to the cosine similarity value of the target vector is determined as the second business data.

5. The method according to any one of claims 1 to 4, characterized in that The step of prioritizing the service data in the updated service data queue to be processed based on the service type information of each service data in the updated service data queue to be processed to obtain the updated sorting relationship of the service data in the updated service data queue to be processed includes: Determining the importance of each service data in the queue of service data to be processed after update based on the service type information of each service data in the queue of service data to be processed; Based on the importance of each business data in the updated business data queue to be processed and the time order in which each business data in the updated business data queue to be processed enters the thread pool, the business data in the updated business data queue to be processed are prioritized to obtain the sorting relationship of the business data in the updated business data queue to be processed.

6. The method according to any one of claims 1 to 4, characterized in that After thread scheduling is performed on the updated service data in the queue of service data to be processed according to the sorting relationship, the method further includes: Obtaining operation data of the thread pool, the operation data including at least one of the following: activity, capacity utilization, number of cycle rejections, service queuing time, and service execution time; When the operating data exceeds the corresponding operating data threshold, an early warning message is issued.

7. A thread pool scheduling device, characterized in that: The device comprises: The first acquisition module is used to obtain the word vector information of each business data in the business data queue to be processed in the thread pool; A second acquisition module, configured to acquire, from a preset database based on the word vector information, second business data associated with the first business data in the to-be-processed business data queue; An updating module, configured to delete the first service data from the queue of service data to be processed, and obtain an updated queue of service data to be processed, when the second service data is false service data; A sorting module, used to sort the service data in the updated queue of service data to be processed based on the service type information of each service data in the updated queue of service data to be processed, so as to obtain the sorting relationship of the service data in the updated queue of service data to be processed; The scheduling module is used to perform thread scheduling on the updated business data in the to-be-processed business data queue according to the sorting relationship.

8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the thread pool scheduling method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the thread pool scheduling method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the thread pool scheduling method as described in any one of claims 1 to 6.