Information processing method, device and storage medium
By using an event bus in the information processing device to subscribe to task completion events, the problem of delayed task processing result notification in the prior art is solved, enabling immediate notification of task completion and improving the efficiency of sending task processing results.
Patent Information
- Application Number
- CN202111222091.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-10-20
AI Technical Summary
In existing technologies, when the task processing time is shorter than the time interval between two adjacent time nodes, it is necessary to wait until the time node is reached before notifying the caller that the task is complete, which reduces the efficiency of sending the task processing result.
By subscribing to task completion events using an event bus in the information processing device, and immediately transmitting and sending the execution results upon task completion, the execution results are sent to the sending device using the event bus.
This feature enables immediate notification to the caller upon task completion, improving the efficiency of sending task processing results.
Smart Images

Figure CN113962650B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to an information processing method and device, and a storage medium. Background Art
[0002] With the continuous development of Internet technology, the functions of the network are becoming more and more powerful, and the corresponding tasks that the network needs to handle are also increasing. In the process of processing tasks, a series of problems have also arisen.
[0003] In the prior art, time nodes with the same time interval are set, and whether the task is processed is checked at each time node. If the task is processed, the caller of the task is notified at the time node that the task has been processed. If the task is not processed, it is checked again at the next time node whether the task is processed, until the caller of the task is notified that the task has been processed at the first time node after the task is processed. In this way, when the task processing time period is less than the time period between two adjacent time nodes, it is still necessary to wait for a period of time until the time node is reached before the caller is notified that the task has been processed, which reduces the efficiency of sending the task processing results to the caller. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present application hope to provide an information processing method and device, and a storage medium, which can improve the efficiency of sending task processing results.
[0005] The technical solution of this application is implemented as follows:
[0006] The present application provides an information processing method, which is applied to an information processing device. The information processing method includes:
[0007] When receiving a task to be executed, subscribing to a task execution completion event corresponding to the task to be executed in the event bus;
[0008] When the execution of the task to be executed is completed, transmitting the execution result corresponding to the task to be executed to the event bus based on the task execution completion event;
[0009] The execution result is sent to a sending device corresponding to the task to be executed by utilizing the event bus.
[0010] An embodiment of the present application provides an information processing device, the information processing device comprising an event bus, the device comprising:
[0011] A subscription unit, configured to, upon receiving a task to be executed, subscribe to a task execution completion event corresponding to the task to be executed in the event bus;
[0012] A transmission unit, configured to transmit, when the execution of the task to be executed is completed, an execution result corresponding to the task to be executed to the event bus based on the task execution completion event;
[0013] The sending unit is used to send the execution result to the sending device corresponding to the task to be executed by using the event bus.
[0014] The present application provides an information processing device, the device comprising:
[0015] A memory, a processor and a communication bus, wherein the memory communicates with the processor via the communication bus, and the memory stores an information processing program executable by the processor. When the information processing program is executed, the information processing method described above is executed by the processor.
[0016] An embodiment of the present application provides a storage medium having a computer program stored thereon, which is applied to an information processing device, and is characterized in that the computer program implements the above-mentioned information processing method when executed by a processor.
[0017] The embodiment of the present application provides an information processing method and device, and a storage medium. The information processing method is applied to an information processing device, and the information processing device includes an event bus. The information processing method includes: when receiving a task to be executed, subscribing to a task execution completion event corresponding to the task to be executed in the event bus; when the task to be executed is completed, transmitting the execution result corresponding to the task to be executed to the event bus based on the task execution completion event; and using the event bus to send the execution result to the sending device corresponding to the task to be executed. The above method is implemented. When the information processing device receives a task to be executed, it subscribes to the task execution completion event corresponding to the task to be executed in the event bus, so that the information processing device determines that the task to be executed is completed, that is, at the moment when the task to be executed is completed, the execution result corresponding to the task to be executed can be immediately transmitted to the event bus according to the task execution completion event, so that the execution result can be immediately sent to the sending device corresponding to the task to be executed by using the event bus, thereby improving the efficiency of sending the task processing result. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of an information processing method in the prior art provided in an embodiment of the present application Figure 1 ;
[0019] Figure 2 A schematic diagram of an information processing method in the prior art provided in an embodiment of the present application Figure 2 ;
[0020] Figure 3 A flow chart of an information processing method provided in an embodiment of the present application;
[0021] Figure 4 An exemplary anti-shake task execution flow chart provided for an embodiment of the present application;
[0022] Figure 5 An exemplary information processing block diagram provided for an embodiment of the present application;
[0023] Figure 6 A flowchart of an exemplary information processing method provided in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of an information processing device provided in an embodiment of the present application Figure 1 ;
[0025] Figure 8 A schematic diagram of the structure of an information processing device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0027] There are usually two solutions to solve the problem of deduplication of multiple asynchronous tasks, but their implementation has disadvantages such as low efficiency and failure to obtain task execution results in a timely manner. The specific analysis is as follows:
[0028] Method 1: System polling and waiting. Figure 1 As shown: when task T3 ends, other tasks have also been completed. Therefore, task completion prompt information will be sent to the callers corresponding to task T1, task T2, task T3, and task T4 respectively. Since it is necessary to poll and wait for the last task to be completed before sending the task completion prompt information corresponding to the task to the caller, and duplicate tasks cannot be excluded, the efficiency of sending task processing results to the caller is reduced.
[0029] Method 2: Add an anti-shake device, such as Figure 2As shown in the figure: from the moment when task T1 is received, the time length of one time slice is delayed to the moment when the task starts to execute. After the execution of tasks T1, T2, and T3 is completed, the waiting time begins until the start of time slice 2. At this time, if the task execution is determined to be completed, the execution completion prompt information corresponding to the task is sent to the corresponding caller. Since the execution completion prompt information can only be sent after the task is completed, the efficiency of sending the task processing results to the caller is reduced.
[0030] The technical problems existing in the prior art can be solved by using the method in Example 1.
[0031] Embodiment 1
[0032] The embodiment of the present application provides an information processing method, which is applied to an information processing device, wherein the information processing device includes an event bus, Figure 3 A flow chart of an information processing method provided in an embodiment of the present application, such as Figure 3 As shown, the information processing method may include:
[0033] S101. When a task to be executed is received, a task execution completion event corresponding to the task to be executed is subscribed to in an event bus.
[0034] An information processing method provided in an embodiment of the present application is suitable for a scenario in which execution completion information of a task to be executed is sent to a device corresponding to the task to be executed.
[0035] In the embodiments of the present application, the information processing device can be implemented in various forms. For example, the information processing device described in the present application may include devices such as mobile phones, cameras, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and devices such as digital TVs, desktop computers, and servers.
[0036] In an embodiment of the present application, the task to be executed may be a page access task transmitted by the client, or an order processing task generated after a user purchases goods on a shopping platform, or other tasks; the specific tasks may be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0037] It should be noted that the task to be executed may be a task sent by the caller.
[0038] In an embodiment of the present application, the number of tasks to be executed may be one; the number of tasks to be executed may also be two; the number of tasks to be executed may also be multiple; the specific number of tasks to be executed may be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0039] In an embodiment of the present application, if there are multiple tasks to be executed, the same tasks may exist among the tasks to be executed, that is, the same caller sends the same task to be executed to the information processing device twice or more, resulting in the information processing device receiving the tasks to be executed including the same tasks, so that the information processing device needs to deduplicate the tasks to be executed first, that is, remove the duplicate tasks in the tasks to be executed.
[0040] In an embodiment of the present application, if the tasks to be executed include the same tasks, when the information processing device subscribes to the task execution completion event corresponding to the task to be executed in the time bus, the same task execution completion event will also exist, and the information processing device also needs to deduplicate the same task execution completion event, that is, remove the duplicate task execution completion events in the event bus.
[0041] In an embodiment of the present application, the tasks to be executed include multiple tasks to be executed; the process of the information processing device subscribing to the task execution completion event corresponding to the tasks to be executed in the event bus includes: the information processing device subscribes to multiple task execution completion events corresponding to the multiple tasks to be executed in the event bus in turn; the information processing device deduplicates the multiple task execution completion events to obtain the task execution completion event.
[0042] It should be noted that the number of task execution completion events is at least one.
[0043] In the embodiment of the present application, a plurality of tasks to be executed correspond one-to-one to a plurality of task execution completion events. Specifically, one task to be executed corresponds to one task execution completion event.
[0044] In an embodiment of the present application, the number of task execution completion events can be one, or the number of task execution completion events can be two; the number of task execution completion events can also be multiple, and the specific number of task completion events can be determined based on actual conditions, and the embodiment of the present application does not limit this.
[0045] In an embodiment of the present application, when the information processing device receives a task to be executed, before subscribing to the task execution completion event corresponding to the task to be executed in the event bus, the information processing device will also use a time slicer to slice time to obtain multiple slice time periods; accordingly, when the information processing device receives a task to be executed, the process of subscribing to the task execution completion event corresponding to the task to be executed in the event bus includes: when the task to be executed is received within the first slice time period, the information processing device subscribes to the task execution completion event corresponding to the task to be executed in the event bus.
[0046] It should be noted that the first shard time period is any shard time period among the multiple shard time periods.
[0047] In an embodiment of the present application, the time slicer can slice time according to a preset time length to obtain multiple slice time periods; the time slicer can also slice time according to random time intervals to obtain multiple slice time periods; the specific information processing device uses the time slicer to slice time to obtain a plurality of slice time periods. The process can be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0048] In an embodiment of the present application, if the time slicer can slice time according to a preset time length to obtain multiple sliced time periods; the preset time length can be the time length configured in the information processing device, and the preset time length can also be the time length received by the information processing device before the information processing device uses the time slicer to slice time to obtain multiple sliced time periods; the preset time length can also be the time length information obtained by the information processing device in other ways; the specific time length can be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0049] It should be noted that the preset time length can be 50ms; the preset time length can also be 2s; the preset time length can also be 1min. The preset time length can be determined according to actual conditions, and the embodiments of the present application do not limit this.
[0050] In the embodiment of the present application, the time slicer may be an anti-shake device, or other device capable of time slicing. The specific time slicer may be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0051] In the embodiment of the present application, the time slicer (anti-shake device) is a device that can merge different tasks received by time period and execute only the last task. Figure 4As shown: If the anti-shake time slice of the anti-shake device is 100ms, and the interval between task b and task c is less than 100ms, the final execution order of the tasks after anti-bounce is task a, task b, task d and the maximum interval between them is 100ms.
[0052] S102: When the task to be executed is completed, the execution result corresponding to the task to be executed is transmitted to the event bus based on the task execution completion event.
[0053] In an embodiment of the present application, after the information processing device subscribes to the task execution completion event corresponding to the task to be executed in the event bus, when the execution of the task to be executed is completed, the information processing device can transmit the execution result corresponding to the task to be executed to the event bus based on the task execution completion event.
[0054] In the embodiment of the present application, the execution result includes a prompt message that the task to be executed has been completed and a result obtained after the task to be executed has been completed.
[0055] In an embodiment of the present application, the execution result includes multiple execution results; when the information processing device receives a task to be executed, after subscribing to a task execution completion event corresponding to the task to be executed in the event bus, when the information processing device completes the execution of the task to be executed, before transmitting the execution result corresponding to the task to be executed to the event bus based on the task execution completion event, the information processing device will also perform task deduplication processing on the multiple tasks to be executed to obtain multiple deduplicated tasks to be executed; the information processing device uses a task processor to process the multiple tasks to be executed to obtain multiple execution results.
[0056] It should be noted that a plurality of tasks to be executed correspond to a plurality of execution results one by one. Specifically, one task to be executed corresponds to one execution result.
[0057] In an embodiment of the present application, each task to be executed corresponds to a unique task identifier; the information processing device can perform task deduplication processing on multiple tasks to be executed according to the task identifier to obtain multiple deduplicated tasks to be executed; the information processing device can also use other methods to perform task deduplication processing on multiple tasks to be executed to obtain multiple deduplicated tasks to be executed; the specific information processing device performs task deduplication processing on multiple tasks to be executed to obtain multiple deduplicated tasks to be executed can be determined according to actual conditions, and the embodiment of the present application does not limit this.
[0058] It should be noted that the multiple execution results include multiple prompt information that the multiple tasks to be executed after deduplication have been completed and multiple results obtained after the multiple tasks to be executed after deduplication have been completed.
[0059] In an embodiment of the present application, an information processing device performs task deduplication processing on multiple tasks to be executed to obtain multiple deduplicated tasks to be executed, including: the information processing device performs task deduplication processing on multiple tasks to be executed at the end of the first slice time period to obtain multiple deduplicated tasks to be executed; correspondingly, the information processing device uses a task processor to process the multiple tasks to be executed to obtain multiple execution results, including: the information processing device determines a first time point corresponding to a first task to be executed received within the first slice time period; the information processing device postpones the first time point by one slice time period to obtain a second time point; the information processing device uses the task processor to process the multiple tasks to be executed at the second time point to obtain multiple execution results.
[0060] It should be noted that the first task to be executed is the first task received in the first sharding time period, and the first task to be executed is one of the multiple tasks to be executed.
[0061] S103: Using the event bus, send the execution result to the sending device corresponding to the task to be executed.
[0062] In an embodiment of the present application, after the information processing device transmits the execution result corresponding to the task to be executed to the event bus based on the task execution completion event, the information processing device can use the event bus to send the execution result to the sending device corresponding to the task to be executed.
[0063] It should be noted that the sending device is a device that sends a task to be executed to the information processing apparatus. Exemplarily, if the caller sends a task to be executed to the information processing apparatus, the device of the caller is the sending device.
[0064] In an embodiment of the present application, the process of an information processing device using an event bus to send an execution result to a sending device corresponding to a task to be executed includes: the information processing device uses the event bus to transmit the execution result to a time slicer; the information processing device uses the time slicer to determine the sending device corresponding to the task to be executed; and sends the execution result to the sending device.
[0065] For example, Figure 5As shown: the sending device generates tasks to be executed and continuously sends the tasks to be executed to the information processing device. Time slicer (anti-shake device) in the information processing device. After the anti-shake device is started, the information processing device collects multiple tasks to be executed in the task collection stage, and subscribes to multiple task execution completion events corresponding to the multiple tasks to be executed in the event bus, and deduplicates the multiple task execution completion events to obtain task execution completion events. After that, the information processing device will deduplicate the multiple tasks to be executed at the end of the task collection stage, that is, the end of the first slicing time period, to obtain multiple deduplicated tasks to be executed, deduplicate the received tasks, determine the first time point corresponding to the first task to be executed among the multiple deduplicated tasks to be executed received in the first slicing time period; postpone one slicing time period from the first time point to obtain a second time point; at the second time point, use the task processor to process the multiple deduplicated tasks to be executed to obtain multiple execution results. When the task to be executed is completed, the information processing device transmits multiple execution results corresponding to the task to be executed to the event bus based on the task execution completion event; the information processing device uses the event bus to transmit the multiple execution results to the time slicer; uses the time slicer to determine the sending device corresponding to the task to be executed; and sends the multiple execution results to the sending device.
[0066] In the embodiment of the present application, an exemplary information processing method is provided. Figure 6 As shown:
[0067] S60: The information processing device uses a time slicer to slice time to obtain multiple slice time periods.
[0068] S61. When a plurality of tasks to be executed are received within a first segment time period, the information processing device sequentially subscribes to a plurality of task execution completion events corresponding to the plurality of tasks to be executed in the event bus.
[0069] S62: The information processing device deduplicates multiple task execution completion events to obtain a task execution completion event.
[0070] S63. At the end of the first shard time period, the information processing device performs a task deduplication process on the multiple tasks to be executed to obtain multiple deduplicated tasks to be executed.
[0071] S64. The information processing device determines a first time point corresponding to a first task to be executed received within a first segment time period.
[0072] It should be noted that the first task to be executed is the first task received in the first sharding time period, and the first task to be executed is one of the multiple tasks to be executed.
[0073] S65. The information processing device extends the first time point by one segment time period to obtain a second time point.
[0074] S66: At the second time point, the information processing device uses the task processor to process the multiple tasks to be executed to obtain multiple execution results.
[0075] S67: When the execution of multiple tasks to be executed is completed, the information processing device transmits multiple execution results to the event bus based on the task execution completion event.
[0076] S68. The information processing device transmits multiple execution results to the time slicer using the event bus.
[0077] S69. The information processing device uses a time slicer to determine at least one sending device corresponding to multiple tasks to be executed; and sends multiple execution results to the at least one sending device.
[0078] It can be understood that when the information processing device receives a task to be executed, it subscribes to the task execution completion event corresponding to the task to be executed in the event bus, so that when the information processing device determines that the task to be executed is completed, that is, at the moment when the task to be executed is completed, it can immediately transmit the execution result corresponding to the task to be executed to the event bus according to the task execution completion event, so as to use the event bus to immediately send the execution result to the sending device corresponding to the task to be executed, thereby improving the efficiency of sending task processing results.
[0079] Embodiment 2
[0080] Based on the same inventive concept of the first embodiment, the embodiment of the present application provides an information processing device 1, the information processing device 1 includes an event bus, corresponding to an information processing method; Figure 7 A schematic diagram of the structure of an information processing device provided in an embodiment of the present application Figure 1 , the information processing device 1 may include:
[0081] A subscription unit 11 is used for, when receiving a task to be executed, subscribing to a task execution completion event corresponding to the task to be executed in the event bus;
[0082] A transmission unit 12, configured to transmit, when the execution of the task to be executed is completed, an execution result corresponding to the task to be executed to the event bus based on the task execution completion event;
[0083] The sending unit 13 is used to send the execution result to the sending device corresponding to the task to be executed by using the event bus.
[0084] In some embodiments of the present application, the task to be executed includes a plurality of tasks to be executed; the device further includes a deduplication unit;
[0085] The subscription unit 11 is used to sequentially subscribe to multiple task execution completion events corresponding to the multiple tasks to be executed in the event bus;
[0086] The deduplication unit is used to perform event deduplication on the multiple task execution completion events to obtain the task execution completion event, and the number of the task execution completion event is at least one.
[0087] In some embodiments of the present application, the apparatus further comprises a slicing unit;
[0088] The slicing unit is used to slice time using a time slicer to obtain multiple slicing time periods;
[0089] Correspondingly, the subscription unit 11 is used to subscribe to the task execution completion event corresponding to the task to be executed in the event bus when the task to be executed is received within the first shard time period, and the first shard time period is any one of the multiple shard time periods.
[0090] In some embodiments of the present application, the execution result includes multiple execution results; the device also includes a processing unit;
[0091] The deduplication unit is used to perform task deduplication processing on the multiple tasks to be executed to obtain multiple deduplicated tasks to be executed;
[0092] The processing unit is used to process the multiple tasks to be executed using a task processor to obtain multiple execution results, and the multiple tasks to be executed correspond to the multiple execution results one by one.
[0093] In some embodiments of the present application, the deduplication unit is used to perform task deduplication processing on the multiple tasks to be executed at the end of the first sharding time period to obtain the multiple deduplicated tasks to be executed;
[0094] Accordingly, the device further includes a determination unit and a postponement unit;
[0095] The determining unit is used to determine a first time point corresponding to a first task to be executed received within a first slice time period; the first task to be executed is the first task received within the first slice time period, and the first task to be executed is one of the multiple tasks to be executed;
[0096] The extension unit is used to extend a slice time period from the first time point to obtain a second time point;
[0097] The processing unit is used to process the multiple tasks to be executed by using the task processor at the second time point to obtain the multiple execution results.
[0098] In some embodiments of the present application, the transmission unit 12 is used to transmit the execution result to the time slicer by using the event bus;
[0099] The determining unit is used to determine the sending device corresponding to the task to be executed by using the time slicer;
[0100] The sending unit 13 is used to send the execution result to the sending device.
[0101] It should be noted that, in actual applications, the above-mentioned subscription unit 11, transmission unit 12 and sending unit 13 can be implemented by a processor 14 on the information processing device 1, specifically a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing) or a field programmable gate array (FPGA); the above-mentioned data storage can be implemented by a memory 15 on the information processing device 1.
[0102] The present application also provides an information processing device 1, such as Figure 8 As shown, the information processing device 1 includes: a processor 14, a memory 15 and a communication bus 16. The memory 15 communicates with the processor 14 via the communication bus 16. The memory 15 stores a program executable by the processor 14. When the program is executed, the information processing method described above is executed by the processor 14.
[0103] In practical applications, the memory 15 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 14.
[0104] An embodiment of the present application provides a computer-readable storage medium having a computer program thereon, and when the program is executed by the processor 14, the information processing method as described above is implemented.
[0105] It can be understood that when the information processing device receives a task to be executed, it subscribes to the task execution completion event corresponding to the task to be executed in the event bus, so that when the information processing device determines that the task to be executed is completed, that is, at the moment when the task to be executed is completed, it can immediately transmit the execution result corresponding to the task to be executed to the event bus according to the task execution completion event, so as to use the event bus to immediately send the execution result to the sending device corresponding to the task to be executed, thereby improving the efficiency of sending task processing results.
[0106] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0107] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0110] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. An information processing method, characterized in that: Applied to an information processing device, the information processing device includes an event bus, and the method includes: In the case of receiving a task to be executed, subscribing to a task execution completion event corresponding to the task to be executed in the event bus; the task to be executed includes a plurality of tasks to be executed; At the end of the first sharding time period, performing task deduplication processing on the multiple tasks to be executed to obtain multiple deduplicated tasks to be executed; Determine a first time point corresponding to a first task to be executed received within a first slicing time period; the first task to be executed is the first task received within the first slicing time period, and the first task to be executed is one of the multiple tasks to be executed; Extending the first time point by one segment time period to obtain a second time point; At the second time point, the plurality of tasks to be executed are processed by a task processor to obtain a plurality of execution results; the plurality of tasks to be executed correspond to the plurality of execution results one by one; When the execution of the task to be executed is completed, transmitting the execution result corresponding to the task to be executed to the event bus based on the task execution completion event; The execution result is sent to a sending device corresponding to the task to be executed by utilizing the event bus.
2. The method according to claim 1, characterized in that Subscribing to the task execution completion event corresponding to the task to be executed in the event bus includes: Subscribing to multiple task execution completion events corresponding to the multiple tasks to be executed in the event bus in sequence; Deduplication is performed on the multiple task execution completion events to obtain the task execution completion event, where the number of the task execution completion event is at least one.
3. The method according to claim 1, characterized in that In the case where a task to be executed is received, before subscribing to a task execution completion event corresponding to the task to be executed in the event bus, the method further includes: Use the time slicer to slice the time to obtain multiple slice time periods; Accordingly, when receiving a task to be executed, subscribing to a task execution completion event corresponding to the task to be executed in the event bus includes: When the task to be executed is received within a first slicing time period, a task execution completion event corresponding to the task to be executed is subscribed to in the event bus, and the first slicing time period is any one of the multiple slicing time periods.
4. The method according to claim 1, characterized in that: The using the event bus to send the execution result to the sending device corresponding to the task to be executed includes: Transmitting the execution result to the time slicer using the event bus; The time slicer is used to determine the sending device corresponding to the task to be executed; and the execution result is sent to the sending device.
5. An information processing device, characterized in that: The information processing device comprises an event bus, and the device comprises: A subscription unit, configured to, upon receiving a task to be executed, subscribe to a task execution completion event corresponding to the task to be executed in the event bus; the task to be executed includes a plurality of tasks to be executed; A deduplication unit is used to perform task deduplication processing on the multiple tasks to be executed at the end of the first sharding time period to obtain multiple deduplicated tasks to be executed; A determination unit, configured to determine a first time point corresponding to a first task to be executed received within a first slicing time period; the first task to be executed is the first task received within the first slicing time period, and the first task to be executed is one of the multiple tasks to be executed; A postponing unit, configured to postponing a slice time period from the first time point to obtain a second time point; a processing unit, configured to process the plurality of tasks to be executed using a task processor at the second time point to obtain a plurality of execution results; the plurality of tasks to be executed correspond to the plurality of execution results in a one-to-one manner; A transmission unit, configured to transmit, when the execution of the task to be executed is completed, an execution result corresponding to the task to be executed to the event bus based on the task execution completion event; The sending unit is used to send the execution result to the sending device corresponding to the task to be executed by using the event bus.
6. The device according to claim 5, characterized in that The subscription unit is used to sequentially subscribe to multiple task execution completion events corresponding to the multiple tasks to be executed in the event bus; The deduplication unit is used to perform event deduplication on the multiple task execution completion events to obtain the task execution completion event, and the number of the task execution completion event is at least one.
7. An information processing device, characterized in that: The device comprises: A memory, a processor and a communication bus, wherein the memory communicates with the processor via the communication bus, the memory stores an information processing program executable by the processor, and when the information processing program is executed, the method according to any one of claims 1 to 4 is performed by the processor.
8. A storage medium having a computer program stored thereon, applied to an information processing device, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Distributed transaction processing method and device
CN110968586A
Data service processing method, device and equipment
CN112416980A