Scheduling method and device for parallel events, computing equipment, storage medium and program product

By listening to the changes in the object value of parallel events in the blockchain, deciding whether to terminate the event execution, solving the problem of resource waste and inefficiency caused by parallel event conflicts, and achieving efficient and reliable event execution.

CN119149215APending Publication Date: 2024-12-17TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310717545.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When events executed in parallel in blockchain, the event execution is often slow or error due to conflicts in object values. It is difficult for the prior art to effectively schedule parallel events, resulting in waste of resources and inefficiency.

Method used

By obtaining tasks in parallel events, whether the value of the auditing object is changed by other events, and whether to terminate the execution event is determined based on the auditing result, the acquisition module, the auditing module and the execution module can be used to realize the effective scheduling of the event.

Benefits of technology

It realizes effective scheduling of parallel events, timely discovers and accurately terminates conflict events, reduces resource consumption, and improves event execution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149215A_ABST
    Figure CN119149215A_ABST
Patent Text Reader

Abstract

The invention discloses a scheduling method and device for parallel events, computing equipment, a storage medium and a program product. The scheduling method for the parallel events comprises the steps of obtaining a first event, wherein the first event comprises at least one task for a block; in response to a reading task for the first object contained in the first event, the value of the first object in the block is audited, and the reading task is used for reading the value of the first object in the block; it is determined whether to terminate execution of the first event based on the audiometry result. According to the method and the device, the events executed in parallel are effectively scheduled, especially when conflicts exist among the events executed in parallel, the conflicts can be found in time, and the conflicting events can be accurately terminated according to the conflicts, so that resource consumption is reduced, and event execution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a scheduling method, apparatus, computing device, computer-readable storage medium, and computer program product for parallel events. Background Art

[0002] The blockchain has multiple blockchain nodes, each of which will execute events according to instructions and synchronize event results between blockchain nodes through voting. Through this decentralized design, the blockchain has the characteristics of openness and transparency, and has also attracted more and more events to be completed through the blockchain (such as transfer transactions, contract amendments, etc.). In order to improve the efficiency of blockchain events, blockchain nodes allow multiple events to be executed in parallel (for example, by setting up multiple threads, etc.). However, when these parallel events involve the same object, conflicts often occur, causing slow event execution or even errors. For example, event 1 changes the value of the target object, but event 2 executed in parallel still uses the original value of the target object, causing errors in the execution result of event 2. To this end, this field has always hoped to propose a practical blockchain event scheduling method to achieve safe and efficient completion of blockchain events. Summary of the invention

[0003] In view of this, the present application provides a scheduling method and apparatus, system, computing device, computer-readable storage medium and computer program product for parallel events, which is expected to alleviate or overcome some or all of the above-mentioned deficiencies and other possible deficiencies.

[0004] According to one aspect of the present application, a scheduling method for parallel events is provided, the method comprising: obtaining a first event, the first event including at least one task for a block; in response to the first event including a read task for a first object, detecting whether the value of the first object in the block is changed by other events in parallel with the first event, the read task being used to read the value of the first object in the block; and, determining whether to terminate the execution of the first event based on the detection result.

[0005] According to another aspect of the present application, a scheduling device for parallel events is provided, comprising an acquisition module, an audiometry module and an execution module. The acquisition module is configured to acquire a first event, the first event comprising at least one task for a block. The audiometry module is configured to, in response to the first event comprising a read task for a first object, audiometry whether the value of the first object in the block is changed by other events in parallel with the first event, the read task being used to read the value of the first object in the block. The execution module is configured to determine whether to terminate the execution of the first event based on the audiometry result.

[0006] In a scheduling device for parallel events according to some embodiments of the present application, a reading task includes: determining whether an event database contains a value of a first object, the event database being used to store data of a first event; and, in response to the event database containing the value of the first object, reading the value of the first object from the event database.

[0007] In a scheduling device for parallel events according to some embodiments of the present application, detecting whether the value of a first object in a block is changed by other events parallel to the first event includes: detecting whether the value of the first object in a block database is changed by other events parallel to the first event, the block database being used to store data of the block; the reading task further includes: in response to the event database not containing the value of the first object, reading the value of the first object from the block database.

[0008] In a scheduling device for parallel events according to some embodiments of the present application, the event database includes a writing task sub-library and a reading task sub-library, the writing task sub-library is used to store historical data of the writing task, and the reading task sub-library is used to store historical data of the reading task. Reading the value of the first object from the event database includes: determining whether the writing task sub-library contains the value of the first object; in response to determining that the writing task sub-library contains the value of the first object, reading the value of the first object from the writing task sub-library; and, in response to determining that the writing task sub-library does not contain the value of the first object, determining whether the reading task sub-library contains the value of the first object; in response to determining that the reading task sub-library contains the value of the first object, reading the value of the first object from the reading task sub-library.

[0009] In a scheduling device for parallel events according to some embodiments of the present application, the value of a first object in a block is changed by a write task, and the write task includes: obtaining a write value of the first object; and writing the write value to a position corresponding to the first object in a block database, and the block database is used to store data of the block.

[0010] In a scheduling device for parallel events according to some embodiments of the present application, listening to whether the value of a first object in a block is changed by other events that are parallel to the first event includes: sending the first object to a listening task as an object to be managed, and the listening task is used to listen to the object to be managed. The listening task includes: obtaining the object to be managed and an event corresponding to the object to be managed, listening to whether the value of the object to be managed has changed, and in response to the change in the value of the object to be managed, reporting the event corresponding to the object to be managed as at least part of the listening result.

[0011] In a scheduling device for parallel events according to some embodiments of the present application, determining whether to terminate execution of a first event based on an audiometry result includes: terminating execution of the first event in response to the audiometry result including the first event and the first event has not been completed.

[0012] In a scheduling device for parallel events according to some embodiments of the present application, the scheduling device for parallel events further includes a second determination module and a notification module. The second determination module is configured to determine whether the second object is detected by the listening task in response to the event including a write task for the second object, and the write task is used to write the value of the second object in the block. The notification module is configured to notify the listening task that the value of the second object has changed in response to the second object being detected.

[0013] In a scheduling device for parallel events according to some embodiments of the present application, monitoring whether the value of a first object in a block is changed by other events in parallel with the first event includes: initiating a monitoring task for the first object. The monitoring task includes: monitoring whether the value of the first object is changed, and in response to the value of the first object being changed, reporting the change in the value of the first object to the first event.

[0014] In a scheduling device for parallel events according to some embodiments of the present application, determining whether to terminate execution of a first event based on an audiometry result includes: in response to a change in a value of a first object and the first event has not yet been completed, instructing the first event to terminate execution.

[0015] In the scheduling device for parallel events according to some embodiments of the present application, the scheduling device for parallel events further comprises a re-execution module. The re-execution module is configured to re-execute the first event in response to termination of execution of the first event.

[0016] In a scheduling device for parallel events according to some embodiments of the present application, the event includes a transaction.

[0017] According to another aspect of the present application, a computing device is provided, comprising: a processor; and a memory configured to store computer executable instructions thereon, which, when executed in the processor, implement a scheduling method for parallel events as in some embodiments of the present application.

[0018] According to another aspect of the present application, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When the computer-executable instructions are executed on a computer, the computer implements a scheduling method for parallel events as in some embodiments of the present application.

[0019] According to another aspect of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the scheduling method for parallel events as in some embodiments of the present application is implemented.

[0020] In the scheduling method and device for parallel events claimed in the present application, a first event is first obtained, and the first event includes at least one task for a block. Then, in response to the first event including a read task for a first object, it is detected whether the value of the first object in the block is changed by other events in parallel with the first event. Since the read task is used to read the value of the first object in the block, it may involve subsequent conflicts. Therefore, testing the first object at this time can achieve subsequent greater resource savings with less resource consumption. Finally, it is determined whether to terminate the execution of the first event based on the test result.

[0021] It can be seen that in the scheduling method for parallel events disclosed in the present application, effective scheduling of events executed in parallel is achieved. In particular, when there is a conflict between events executed in parallel, the conflict can be discovered in time and the conflicting event can be accurately terminated based on the conflict, thereby reducing resource consumption and improving event execution efficiency.

[0022] These and other advantages of the present application will become apparent from and be elucidated with reference to the embodiments described hereinafter. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments are 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 creative work, among which:

[0024] Figure 1 An exemplary application scenario of a scheduling method for parallel events according to some embodiments of the present application is shown;

[0025] Figure 2 A schematic diagram of the process of event scheduling in the related art is shown;

[0026] Figure 3 An exemplary flow chart of a scheduling method for parallel events according to some embodiments of the present application is shown;

[0027] Figure 4 A schematic diagram showing a scheduling method for parallel events according to some embodiments of the present application is shown;

[0028] Figure 5 An exemplary flow chart showing some steps of a method for scheduling parallel events according to some embodiments of the present application;

[0029] Figure 6 A schematic diagram showing a writing task according to some embodiments of the present application is shown;

[0030] Figure 7 A schematic diagram showing a scheduling method for parallel events according to some embodiments of the present application is shown;

[0031] Figure 8 An exemplary flow chart showing some steps of a method for scheduling parallel events according to some embodiments of the present application;

[0032] Fig. 9 A process schematic diagram of a scheduling method for parallel events according to some embodiments of the present application is shown;

[0033] Fig.10 An exemplary structural block diagram of a scheduling device for parallel events according to some embodiments of the present application is shown; and

[0034] Fig.11 An example system is shown that includes an example computing device that represents one or more systems and / or devices that may implement the various methods described herein. DETAILED DESCRIPTION

[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0036] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0038] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all information and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while some operations / steps may be combined or partially combined, so the actual execution order may change according to actual conditions.

[0039] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" and similar terms include all combinations of any, multiple, and all of the associated listed items.

[0040] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0041] Before introducing the embodiments of the present application in detail, relevant terms are first explained.

[0042] Blockchain: refers to a chain of blocks. Each block stores certain information, and they are connected into a chain in the order of their generation. This chain is stored in all servers. As long as there is one server in the entire system that can work, the entire blockchain is safe. These servers are called nodes in the blockchain system, and they provide storage space and computing power support for the entire blockchain system. If you want to modify the information in the blockchain, you must obtain the consent of more than half of the nodes and modify the information in all nodes. These nodes are usually in the hands of different entities, so it is extremely difficult to tamper with the information in the blockchain. Compared with traditional networks, blockchain has two core characteristics: one is that data is difficult to tamper with, and the other is decentralization. Based on these two characteristics, the information recorded in the blockchain is more authentic and reliable, which can help solve the problem of people's distrust.

[0043] Block: In blockchain technology, valuable information will be permanently stored in the form of data. The carriers used to store data information are called blocks. This valuable information can include transactions, etc.

[0044] Node: A node in this disclosure refers to a computing device in a blockchain network, such as a computer, server, mobile phone, mining machine, etc. In a distributed system, any machine such as a server or terminal can join the blockchain network and become a node. The node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.

[0045] Peer-to-Peer Protocol: Also known as P2P (Peer To Peer) protocol, it is used to form a peer-to-peer (P2P, Peer ToPeer) network. P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP, Transmission Control Protocol) protocol.

[0046] Transaction: All requests in the blockchain can become transactions, including but not limited to virtual currency transfer requests, traceability requests, and evidence storage requests.

[0047] Contract: Generally refers to smart contracts in blockchain. Smart contracts are computer protocols designed to disseminate, verify or execute contracts in an information-based manner. Smart contracts allow for trusted transactions without a third party, which are traceable and irreversible. The purpose of smart contracts is to provide a security method superior to traditional contracts and reduce other transaction costs associated with contracts. In blockchain, a corresponding function or function library is usually designed for each smart contract. When a transaction is executed, the smart contract function corresponding to the transaction is called for execution.

[0048] Thread: A thread is a basic unit of independent scheduling and dispatching. A thread can be a kernel thread scheduled by the operating system kernel, such as a Win32 thread; a user thread scheduled by a user process, such as a POSIXThread on the Linux platform; or a mixed scheduling by the kernel and user processes, such as Windows 7 threads. Multiple threads in the same process will share all system resources in the process, such as virtual address space, file descriptors, and signal processing, etc. However, multiple threads in the same process have their own call stack, their own register context, and their own thread-local storage. A process can have many threads, and multiple tasks can be executed serially on each thread.

[0049] Figure 1 An exemplary application scenario 100 of a scheduling method for parallel events according to some embodiments of the present application is shown. Optionally, the application scenario 100 may adopt a blockchain system consisting of a client and multiple nodes. The multiple nodes may be composed of any form of computing devices (such as servers, user terminals, etc.) accessing the network. In addition, the nodes may form a peer-to-peer network using a peer-to-peer protocol.

[0050] See also Figure 1The functions of each node in the blockchain system shown may include routing and application. The routing function is a basic function of the node, which is used to support communication between nodes. The application function is used to be deployed in the blockchain to implement specific services according to actual business needs. Specifically, it can record data related to the implementation function to form record data, carry a digital signature in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to the temporary block when the source and integrity of the record data are successfully verified. As an example, the services implemented by the application may include wallets, shared ledgers, smart contracts, and blockchains.

[0051] In the application scenario 100, the scheduling method for parallel events disclosed in the present application can be executed at any node in the figure (such as node 101, node 102, etc.). For example, the scheduling method for parallel events can be executed at node 107. First, a first event is obtained, and the first event includes at least one task for a block. Then, in response to the first event including a read task for a first object, the value of the first object in the block is detected, and the read task is used to read the value of the first object in the block. Finally, it is determined whether to terminate the execution of the first event based on the detection result.

[0052] It should be pointed out that in Figure 1 In the application scenario shown, each node in the system can execute the scheduling method for parallel events disclosed in this application, and there is no limitation here.

[0053] Figure 2 A process schematic diagram of an event scheduling method in related technology is shown. Figure 2 The following schematically shows a method for scheduling parallel events in the related art when conflicts occur between events. As an example, Figure 2 The events in can be transactions. Figure 2 As shown, event 1 includes a read task for the first object, and event 2 includes a write task for the first object. Event 1 first reads the value of the first object (value 1) and continues to execute. Before event 1 is completed, event 2 writes the value of the first object and updates the value of the first object to value 2. After event 1 is executed, a conflict occurs. For this reason, event 1 is executed again, and event 1 will read the first object (value 2) again. This time, event 1 does not generate a conflict after execution, so the execution is successful. It can be seen that in the related technical solution, since the conflict is not discovered in time, event 1 is still executed after the value of the first object is changed, which wastes resources and affects the efficiency of event execution.

[0054] Therefore, when dealing with conflicting events, the relevant technology usually finds that the value of the object is different when the later event is executed. At this time, the later event is re-executed according to the updated object value. If the execution time of the later event is long, it will affect the event execution efficiency of the blockchain. For example, the execution time of event 1 is 5s, and the execution time of event 2 is 3s. Due to the failure to terminate in time, it will eventually take 10s.

[0055] Figure 3 FIG. 3 shows an exemplary flow chart of a method 300 for scheduling parallel events according to some embodiments of the present application. Figure 3 As shown, method 300 may be executed on a blockchain node, for example, Figure 1 The method 300 is executed on the nodes in the application scenario 100. The method 300 includes step S310, step S320 and step S330.

[0056] In step S310, a first event is obtained, the first event including at least one task for a block. As an example, the event includes a transaction, such as a transfer transaction, a contract modification, etc. Also, the transaction may include one or more tasks, such as a read task, a write task, etc.

[0057] In step S320, in response to the first event including a read task for the first object, it is detected whether the value of the first object in the block is changed by other events in parallel with the first event, and the read task is used to read the value of the first object in the block. As an example, when the first event is a transfer transaction, the first object may be Zhang's account, and the value of the first object may be Zhang's account balance value.

[0058] In step S330, it is determined whether to terminate the execution of the first event based on the audiometry result. As an example, the audiometry result may be that the value of the first object has changed, or that the value of the first object has not changed. For example, in response to the value of the first object having changed, the execution of the first event is terminated. In response to the value of the first object not having changed, the execution of the first event continues.

[0059] Therefore, method 300 realizes effective scheduling of events executed in parallel, especially when there is a conflict between events executed in parallel, the conflict can be discovered in time and the conflicting event can be terminated accurately according to the conflict, which not only reduces resource consumption but also improves the execution efficiency of events.

[0060] In some embodiments, the reading task includes: determining whether an event database contains a value of a first object, the event database being used to store data of the first event; and, in response to the event database containing the value of the first object, reading the value of the first object from the event database. As an example, before each event is executed, a corresponding event database is created for it to store data involved in the process of executing the event. In some embodiments, the event database includes a writing task sub-library and a reading task sub-library, the writing task sub-library being used to store historical data of the writing task, and the reading task sub-library being used to store historical data of the reading task. For example, if the first event has read the value of the first object, the value is stored in its reading task sub-library.

[0061] In some embodiments, detecting whether the value of the first object in the block is changed by other events parallel to the first event includes: detecting whether the value of the first object in the block database is changed by other events parallel to the first event, the block database is used to store data of the block, for example, the block database can store the values ​​of all objects in the block. As an example, the reading task further includes: in response to the event database not containing the value of the first object, reading the value of the first object from the block database. For example, when the first event includes reading the value of Zhang's account balance, if the event database does not contain the value of Zhang's account balance, it is read from the block database.

[0062] In some embodiments, reading the value of the first object from the event database includes: determining whether the write task sub-library contains the value of the first object; in response to the write task sub-library containing the value of the first object, reading the value of the first object from the write task sub-library; and, in response to determining that the write task sub-library does not contain the value of the first object, determining whether the read task sub-library contains the value of the first object; in response to determining that the read task sub-library contains the value of the first object, reading the value of the first object from the read task sub-library. As an example, for example, when it is necessary to read the value of Zhang's account balance, if the write task sub-library of the event database contains the value of Zhang's account balance, read from the write task sub-library. If the write task sub-library of the event database does not contain the value of Zhang's account balance but the read task sub-library contains the value of Zhang's account balance, read from the read task sub-library.

[0063] In some embodiments, the value of the first object in the block is changed by a write task, and the write task includes: obtaining the write value of the first object; and writing the write value to the location corresponding to the first object in the block database. For example, the write task includes writing Zhang's latest account balance to the block, then first obtain the write value of Zhang's account balance; then, write the write value to the location corresponding to Zhang's account balance in the block database.

[0064] In some embodiments, there is an independent audiometric task to manage objects, for example, an audiometric task for audiometrically ...

[0065] In some embodiments, the value of an object is generally changed by a write task. Therefore, when executing a write task, some additional steps may be performed to ensure the smooth progress of the audiometry task. For example, the additional steps may include: in response to the event to be executed including a write task for a second object (the write task is used to write the value of the second object in the block), determining whether the second object is audiometrically audited by the audiometry task; and in response to the second object being audiometrically audited, notifying the audiometry task that the value of the second object has changed. As an example, when the write task is ready to write the value of object 2, it will determine whether object 2 is audiometrically audited by the audiometry task (for example, determining whether object 2 is listed as an object to be managed by the audiometry task), and in response to object 2 being audiometrically audited by the audiometry task, notifying the audiometry task that the value of object 2 has changed.

[0066] In some embodiments, the execution of events (such as transactions) can be scheduled by threads. For example, N threads can be set, and each thread will execute at least one event in series. When multiple of the N threads are executed simultaneously, multiple events are executed in parallel. As an example, the "there is an independent listening task to manage objects" in the previous text can be set on a dedicated thread. When events are running on other threads, the listening task on this thread will listen to the objects to be managed in real time. In some embodiments, a main thread with greater authority can be set to schedule other threads. As an example, a main thread with greater authority can terminate other threads. For example, a main thread can be set, and the main thread can initiate an event contract thread to execute the corresponding event according to the event to be executed, and initiate a listening thread to execute the listening task. The listening thread will report the thread where the event corresponding to the object whose value has changed is located. After receiving the report, the main thread will actively stop the thread to terminate the execution of the event on the thread.

[0067] As an example, Figure 4 FIG. 1 is a schematic diagram showing a method for scheduling parallel events when the main thread has greater authority. Figure 4 As shown, the main thread will initiate the listening thread and at least one event contract thread according to the event to be executed (such as a transaction, etc.). On each event contract thread, multiple events can be executed serially. For each event, the contract function corresponding to the contract of the event will be called for execution. Figure 4 In steps ① and ②), the main thread will register the event ID and the corresponding thread to be monitored to the monitoring thread (i.e. Figure 4 In step ③), the listening thread will maintain the listening list according to the received event ID and the corresponding thread. The listening list can be, for example, the "event ID and thread ID table" shown in the figure. This table is used to listen to the objects to be managed. Event contract threads usually contain read tasks or write tasks (i.e. Figure 4 In step ④), when the event contract thread executes the write task of an object, if the object is a managed object of the listening thread, it will trigger a report to the listening thread that the value of the object has changed, and the report content includes the event ID corresponding to the object (i.e. Figure 4 The listening thread then notifies the main thread of the thread ID to be stopped. The thread ID is the thread ID corresponding to the event ID in the report in the listening list (i.e. Figure 4 Then, the main thread will stop the thread corresponding to the thread ID, thereby terminating the execution of the corresponding event (i.e. Figure 4 Step ⑦ in the above code) and returns the event ID of the termination execution to the event manager (i.e. Figure 4 The event manager then instructs the event corresponding to the event ID to be re-executed (i.e. Figure 4Step ⑨ in the above description). After receiving the instruction to re-execute the event, the main thread will initiate the re-execution of the event according to the event ID. For example, after the event manager instructs to re-execute the event with event ID 2, the main thread can instruct to continue to re-execute the event on the thread with thread ID 2000, or put the event on other threads for re-execution. It should be noted that re-executing the event does not mean continuing to execute the event. The benefit of re-execution is that the reliability of the event execution result can be ensured. For example, the event with event ID 2 contains 30 tasks and is terminated when the 15th task is executed. When re-executing, it will not continue to execute from the 15th task, but will re-execute from the first task. Because the listening thread reports that the value of an object in the event has changed, the reliability of the execution results of the 15 tasks that have been completed at this time is questionable because they are executed based on the unupdated value of the object. Therefore, in this embodiment, the event is selected to be re-executed. It should be noted that the event manager is used to manage the events to be executed, which can be located on the blockchain node (such as each node in scenario 100). The event ID corresponds to the event one by one, and the thread ID corresponds to the thread one by one. For example, the thread ID corresponding to the event contract thread 1 is 1000, and the thread ID corresponding to the event contract thread 2 is 2000. It can be seen that in this embodiment, when the value of the test object changes, the conflict event (such as the conflicting transaction) is terminated in a timely and accurate manner, the corresponding resources are released, the waste of resources is reduced, and the execution efficiency of the event is improved. In addition, by re-executing the terminated event (such as the transaction), the reliability of the execution result is guaranteed.

[0068] Figure 5 An exemplary flow chart of some steps of a method for scheduling parallel events according to some embodiments of the present application is shown. In this embodiment, the main thread has greater authority. Figure 5As shown, the scheduling method for parallel events includes steps S510, S520, S530, S540, S550, S560, S570, S580, S590, S591, S592, and S593. In step S510, the main thread will initiate a listening thread for listening to the object to be managed. Subsequently, the contract installation will be performed. After the contract is successfully installed, the contract execution file is loaded and run (i.e., step S520). As an example, the contract execution file includes a contract corresponding to an event (such as a transaction) and a corresponding contract function. In step S530, in response to an instruction to execute an event, an event contract thread is initiated, and the event will be executed on these threads. In response to the read task for the first object to be executed, it is determined whether the first object is listened to (i.e., step S540). If the first object has been listened to, go to step S550, and if the first object has not been listened to, go to step S592. In step S592, the first object is sent to the audiometry task as the object to be managed to implement the audiometry of the first object, and then the process goes to step S550. In step S550, the write task sub-library of the event database is accessed, and the process goes to step S560. In step S560, it is determined whether the first object exists in the write task sub-library. If so, the process goes to step S593; if not, the process goes to step S570. In step S570, the read task sub-library of the event database is accessed, and then the process goes to step S580. In step S580, it is determined whether the first object exists in the read task sub-library. If so, the process goes to step S593; if not, the process goes to step S590. In step S590, the block database is accessed, and then the process goes to step S591. In step S591, the value of the first object is read from the block database, and the value of the first object is added to the event database (e.g., added to the read task sub-library of the event database), and then the process goes to step S593. In step S593, the value of the first object is returned. Figure 5 Some steps of a method for scheduling parallel events are shown. One or more of these steps can be applied to any of the embodiments listed herein, such as the embodiment of method 300, and are particularly suitable for scenarios where the main thread can terminate other threads, such as Figure 4 In the embodiment shown, as an example, one or more of step S540, step S550, step S560, step S570, step S580, step S590, step S591, step S592, and step S593 may be used for the reading task in any of the above embodiments.

[0069] Figure 6 Schematic diagram of a writing task according to some embodiments of the present application is shown. Figure 6As shown, the writing task may include steps S610, S620, S630, S640, S650, etc. In step S610, the write set corresponding to the current event (for example, represented by WriteSet) is obtained. The write set contains multiple key-value pairs, and each key-value pair contains an object and a corresponding write value. As an example, event 8 will write write values ​​for 15 objects, and the write set corresponding to event 8 contains 15 key-value pairs. In step S620, the mark i is initialized (the value of i is assigned to 0). The function of the mark i is to ensure that all key-value pairs in the write set are written. In step S630, the key-value pair to be written is obtained from the write set (the value of the object in the key-value pair to be written can be represented by wkv). Then it is determined whether the second object has thread listening (the second object is the object in the key-value pair to be written). If yes, go to step S640, if not, go to step 650. In step S640, the callback function corresponding to the second object is called, and the callback function is used to notify the listening task that the value of the second object has changed. In step S650, the value of the second object is written to the corresponding position in the block database to change the value of the second object in the block database. Then, the value of the flag i is incremented by 1 and it is determined whether the incremented value is greater than or equal to the number of key-value pairs in the write set. If so, the process ends, otherwise, it goes to step S630. Figure 6 At least some steps of a writing task are shown, and one or more of these steps can be applied to any of the embodiments listed herein, such as for method 300 or Figure 4 As an example, one or more of step S610, step S620, step S630, step S640, and step S650 may be used for the writing task in any of the above embodiments. For example, step S640 may be used for Figure 4 Follow steps ④ and ⑤ in .

[0070] In some embodiments, the event can call the audiometry task by itself. As an example, audiometry whether the value of the first object in the block is changed by other events in parallel with the first event includes: initiating an audiometry task for the first object. The audiometry task includes: audiometry whether the value of the first object has changed, and in response to the change in the value of the first object, reporting to the first event that the value of the first object has changed. As an example, after determining that the value of the first object has changed, the first event will terminate execution. Optionally, determining whether to terminate the execution of the first event based on the audiometry result includes: in response to the change in the value of the first object and the first event has not been completed, instructing the first event to terminate execution. As an example, when the first event determines that the execution needs to be terminated, it will terminate execution. For example, when event 4 is executed, it needs to execute a read task to read object 4, at which time it will call the audiometry task to listen to object 4. When the value of object 4 changes, the audiometry task will report to event 4 that the value of object 4 has changed. Event 4 will terminate execution and report the result of "execution error". After receiving the result of "execution error", the execution node will re-execute event 4. It should be noted that when an event is re-executed, a corresponding event database will be re-created for the event. Therefore, when an event is re-executed, the latest value of the object will be read from the block database.

[0071] In some embodiments, although the main thread can schedule other threads, its authority is limited. For example, the main thread cannot terminate other threads. In this case, other threads are often required to terminate themselves.

[0072] Figure 7 FIG. 1 is a schematic diagram showing a method for scheduling parallel events when the main thread has relatively small permissions. Figure 7 As shown, the main thread will initiate at least one event contract thread according to the event to be executed (for example, a transaction). On each event contract thread, multiple events can be executed serially. For each event, the contract function corresponding to the contract of the event will be called to execute. Then, the corresponding event will be run on the event contract thread. The event usually contains a read task or a write task, so the value of the object (i.e. Figure 7 Step ② in the above example). When an event contains a write task, the value of an object will be changed. At this time, if the object is being monitored, the monitoring thread will be called back to support the monitoring task (i.e. Figure 7Step ③ in the above). In order to enable the event contract thread to quickly call back the listening thread, a callback interface (i.e., the corresponding calling address) will be set for each object to be managed. For example, event contract thread 5 writes the value of object 1 to the block database, causing the value of object 1 to change. Then, the listening task can be called back through the address 127.0.0.1:8090. Subsequently, the listening task will report to the corresponding event contract thread. For example, event contract thread 1 is reading the value of object 1. After receiving the report, it will automatically terminate execution and report an "error" to the main thread (i.e., Figure 7 Then, the main thread will return "error" to the event manager (i.e. Figure 7 Finally, the event manager will instruct to re-execute the event that reported the "error" (i.e. Figure 7 Step ⑥ in the above). As an object, in order to determine whether the value of the object being tested has changed, in addition to using conventional methods (such as changes in detection values, etc.), the registered version of the object's value in the block database can also be verified. If the registered version is updated, it indicates that the value of the object has been changed.

[0073] In some embodiments, the development language used may not have the ability to notify the parent thread that "the child thread has exited" (general languages ​​have it, such as the panic operation of the golang language, the java language can return error, etc., but there are exceptions), then a variety of solutions can be used to trigger the notification. As an example, two solutions are listed below. The first solution is to check at the call to the contract SDK, and exit directly if there is a need to exit. The contract SDK is a calling function library provided by the blockchain system to users. For example, the read-write set of the operating ledger belongs to the category of the contract SDK. The second solution is to insert specific calling codes at the function entry or other places when the contract is compiled. These codes are not perceived during coding, but they will be perceived when they are executed after compilation. The goal of these solutions is to be able to perceive the changes in the value of the object in a timely manner, so as to terminate the execution of the event in a timely manner.

[0074] Figure 8 An exemplary flow chart of some steps of a method for scheduling parallel events according to some embodiments of the present application is shown. In this embodiment, the main thread has less authority and usually cannot actively terminate other threads. Figure 8As shown, the scheduling method for parallel events includes steps S810, S820, S830, S840, S850, S860, S550, S560, S570, S580, S590, S591, and S593. As an example, steps S860, S550, S560, S570, S580, S590, S591, S592, and S593 may be Figure 5 The corresponding steps shown are the same. In step S810, after the contract is successfully installed, the contract execution file is loaded and run. As an example, the contract execution file includes the contract corresponding to the event (such as a transaction) and the corresponding contract function. In step S820, in response to the instruction to execute the event, the event contract thread is initiated, and the event will be executed on these threads. In response to the read task for the first object to be executed, it is determined whether the first object is tested (i.e., step S830). If the first object has been tested, go to step S550, if the first object has not been tested, go to step S840. In step S840, it is determined whether the test thread has been started. If so, go to step S850, if not, go to step S860, and start the test thread in step S860. In step S850, the first object is sent to the test task as an object to be managed (for example, by adding the first object to the test list) to implement the test of the first object. In step S550, the write task sub-library of the event database is accessed, and go to step S560. In step S560, determine whether the first object exists in the write task sub-library, if so, go to step S593, if not, go to step S570. In step S570, access the read task sub-library of the event database, and then go to step S580. In step S580, determine whether the first object exists in the read task sub-library, if so, go to step S593, if not, go to step S590. In step S590, access the block database, and then go to step S591. In step S591, read the value of the first object from the block database, and add the value of the first object to the event database (for example, add it to the read task sub-library of the event database), and then go to step S593. In step S593, return the value of the first object. Figure 8 Some steps of the method for scheduling parallel events are shown, one or more of which can be applied to any of the embodiments listed herein, such as the embodiment of method 300, and are particularly suitable for scenarios where the main thread cannot terminate other threads, such as Figure 7In the embodiment shown, as an example, one or more of step S540, step S550, step S560, step S570, step S580, step S590, step S591, step S592, and step S593 may be used for the reading task in any of the above embodiments.

[0075] In some embodiments, the scheduling method for parallel events also includes: in response to the termination of the execution of the first event, re-executing the first event. It should be noted that re-executing the first event does not mean continuing to execute the first event. For example, the first event contains 20 tasks, and the 10th task has been executed before. When re-executing, it will start from the first task again. In addition, when re-executing the event, a corresponding event database will be re-created for the event. At this time, the latest value of the object will be read from the block database, so that the latest value of the object will be used when the first event is re-executed, thereby ensuring the reliability of the execution result. And, since the event is re-executed in time after the execution of the first event is terminated, the efficiency of event execution can be improved while ensuring the correctness of the execution result. . Fig. 9 A process schematic diagram of a scheduling method for parallel events according to some embodiments of the present application is shown. Fig. 9 The following schematically illustrates a method for scheduling parallel events in an embodiment of the present application when conflicts occur between events. As an example, Fig. 9 The events in can be transactions. Fig. 9 As shown, event 1 includes a read task for the first object, and event 2 includes a write task for the first object. Event 1 first reads the value of the first object (value 1) and continues to execute. Before event 1 completes execution, event 2 writes the value of the first object and updates the value of the first object to value 2. In response to the change in the value of the first object, event 1 is terminated and re-executed in a timely manner. Event 1 does not generate a conflict after execution this time, so the execution is successful. It can be seen that in some embodiments of the present application, since conflicts can be discovered in a timely manner and the execution of conflicting events can be quickly terminated, the effect of saving resources and improving event execution efficiency is achieved.

[0076] Therefore, when processing conflicting events, the embodiments of the present application can timely discover object changes before the conflicting event is completed, thereby quickly terminating the conflicting event and re-executing it earlier according to the updated object value. For example, the execution time of event 1 is 5s, and the execution time of event 2 is 3s. Due to timely termination and re-execution, the final time consumption is only 8s.

[0077] Fig.10 FIG. 1 shows an exemplary structural block diagram of a scheduling device 1000 for parallel events according to some embodiments of the present application. Fig.10As shown, the scheduling device 1000 for parallel events includes an acquisition module 1010 , an audiometry module 1020 and an execution module 1030 .

[0078] The acquisition module 1010 is configured to acquire a first event, the first event including at least one task for a block. As an example, the event includes a transaction, such as a transfer transaction, a contract modification, etc. Also, the transaction may include one or more tasks, such as a read task, a write task, etc.

[0079] The audio detection module 1020 is configured to detect whether the value of the first object in the block is changed by other events in parallel with the first event in response to the first event including a reading task for the first object, and the reading task is used to read the value of the first object in the block. As an example, when the first event is a transfer transaction, the first object may be Zhang's account, and the value of the first object may be Zhang's account balance value.

[0080] The execution module 1030 is configured to determine whether to terminate the execution of the first event based on the audiometry result. As an example, the audiometry result can be that the value of the first object has changed, or the value of the first object has not changed. For example, in response to the value of the first object having changed, the execution of the first event is terminated. In response to the value of the first object not having changed, the execution of the first event continues.

[0081] Therefore, the scheduling device 1000 for parallel events can be used to effectively schedule events executed in parallel, especially when there are conflicts between events executed in parallel, the conflicts can be discovered in time and the conflicting events can be accurately terminated according to the conflicts, thereby reducing resource consumption and improving event execution efficiency.

[0082] Fig.11 An example system 1100 is illustrated, which includes an example computing device 1110 that represents one or more systems and / or devices that can implement the various methods described herein. The computing device 1110 can be, for example, a server of a service provider, a device associated with a server, a system on a chip, and / or any other suitable computing device or computing system. Fig.10 The described scheduling apparatus 1000 for parallel events may take the form of a computing device 1110. Alternatively, the scheduling apparatus 1000 for parallel events may be implemented as a computer program in the form of an application 1116.

[0083] The example computing device 1110 as shown includes a processing system 1111, one or more computer-readable media 1112, and one or more I / O interfaces 1113 that are communicatively coupled to each other. Although not shown, the computing device 1110 may also include a system bus or other data and command transmission system that couples various components to each other. The system bus may include any one or combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus utilizing any one of a variety of bus architectures. Various other examples are also contemplated, such as control and data lines.

[0084] Processing system 1111 represents the functionality of performing one or more operations using hardware. Thus, processing system 1111 is illustrated as including hardware elements 1114 that may be configured as processors, functional blocks, and the like. This may include other logic devices implemented in hardware as application specific integrated circuits or formed using one or more semiconductors. Hardware elements 1114 are not limited by the materials from which they are formed or the processing mechanisms employed therein. For example, a processor may be composed of (multiple) semiconductors and / or transistors (e.g., electronic integrated circuits (ICs)). In such a context, processor executable instructions may be electronic executable instructions.

[0085] Computer-readable media 1112 is illustrated as including memory / storage 1115. Memory / storage 1115 represents memory / storage capacity associated with one or more computer-readable media. Memory / storage 1115 may include volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical disks, magnetic disks, etc.). Memory / storage 1115 may include fixed media (e.g., RAM, ROM, fixed hard drives, etc.) and removable media (e.g., flash memory, removable hard drives, optical disks, etc.). Computer-readable media 1112 may be configured in various other ways as further described below.

[0086] One or more I / O interfaces 1113 represent functionality that allows a user to input commands and information to the computing device 1110 using various input devices and optionally also allows information to be presented to the user and / or other components or devices using various output devices. Examples of input devices include a keyboard, a cursor control device (e.g., a mouse), a microphone (e.g., for voice input), a scanner, touch functionality (e.g., a capacitive or other sensor configured to detect physical touch), a camera (e.g., which can use visible or invisible wavelengths (such as infrared frequencies) to detect motion that does not involve touch as gestures), and the like. Examples of output devices include a display device, a speaker, a printer, a network card, a tactile response device, and the like. Thus, the computing device 1110 can be configured in various ways as further described below to support user interaction.

[0087] The computing device 1110 also includes an application 1116. The application 1116 may be, for example, a software instance of the scheduling apparatus 1000 for parallel events, and in combination with other elements in the computing device 1110 implements the techniques described herein.

[0088] The present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computing device executes the scheduling method for parallel events provided in the above-mentioned various optional implementations.

[0089] Various techniques may be described herein in the general context of software hardware elements or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The terms "module", "function" and "component" as used herein generally represent software, firmware, hardware or a combination thereof. The features of the techniques described herein are platform-independent, meaning that these techniques can be implemented on a variety of computing platforms with a variety of processors.

[0090] An implementation of the described modules and techniques may be stored on or transmitted across some form of computer-readable media. Computer-readable media may include a variety of media that can be accessed by computing device 1110. By way of example and not limitation, computer-readable media may include “computer-readable storage media” and “computer-readable signal media.”

[0091] In contrast to a simple signal transmission, carrier wave, or signal itself, "computer-readable storage medium" refers to a medium and / or device capable of persistently storing information, and / or a tangible storage device. Therefore, a computer-readable storage medium refers to a non-signal-bearing medium. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented in a method or technology suitable for storing information (such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data). Examples of computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage device, hard disk, cassette, magnetic tape, magnetic disk storage device or other magnetic storage device, or other storage device, tangible medium, or article of manufacture suitable for storing desired information and accessible by a computer.

[0092] "Computer-readable signal media" refers to signal-bearing media that is configured to send instructions to the hardware of the computing device 1110, such as via a network. Signal media typically can embody computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, data signal, or other transport mechanism. Signal media also include any information delivery media. The term "modulated data signal" refers to a signal that has one or more of its characteristics set or changed so as to encode information into the signal. By way of example and not limitation, communication media include wired media such as a wired network or direct connection and wireless media such as acoustic, RF, infrared, and other wireless media.

[0093] As before, hardware elements 1114 and computer-readable media 1112 represent instructions, modules, programmable device logic and / or fixed device logic implemented in hardware form, which can be used to implement at least some aspects of the technology described herein in some embodiments. Hardware elements can include integrated circuits or systems on a chip, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs) and other implementations in silicon or components of other hardware devices. In this context, hardware elements can be used as processing devices for executing program tasks defined by instructions, modules and / or logic embodied by hardware elements, and hardware devices for storing instructions for execution, such as the computer-readable storage media described previously.

[0094] The aforementioned combination may also be used to implement various techniques and modules herein. Therefore, software, hardware or program modules and other program modules may be implemented as one or more instructions and / or logic embodied on some form of computer-readable storage medium and / or by one or more hardware elements 1114. Computing device 1110 may be configured to implement specific instructions and / or functions corresponding to software and / or hardware modules. Therefore, for example, by using a computer-readable storage medium and / or hardware element 1114 of a processing system, a module may be implemented as a module executable by computing device 1110 as software, at least in part, in hardware. Instructions and / or functions may be executable / operable by one or more articles (e.g., one or more computing devices 1110 and / or processing systems 1111) to implement the techniques, modules and examples herein.

[0095] In various embodiments, computing device 1110 can be implemented in various configurations. For example, computing device 1110 can be implemented as a computer-type device including a personal computer, a desktop computer, a multi-screen computer, a laptop computer, a netbook, etc. Computing device 1110 can also be implemented as a mobile device-type device including mobile devices such as mobile phones, portable music players, portable game devices, tablet computers, multi-screen computers, etc. Computing device 1110 can also be implemented as a television-type device, which includes a device with or connected to a generally larger screen in a casual viewing environment. These devices include televisions, set-top boxes, game consoles, etc.

[0096] The techniques described herein may be supported by these various configurations of computing device 1110 and are not limited to the specific examples of the techniques described herein. Functionality may also be implemented in whole or in part on the "cloud" 1120 by using a distributed system, such as through platform 1122 as described below.

[0097] Cloud 1120 includes and / or represents a platform 1122 for resources 1124. Platform 1122 abstracts the underlying functionality of the hardware (e.g., servers) and software resources of cloud 1120. Resources 1124 may include applications and / or data that may be used when executing computer processing on a server remote from computing device 1110. Resources 1124 may also include services provided over the Internet and / or over a subscriber network such as a cellular or Wi-Fi network.

[0098] The platform 1122 can abstract resources and functionality to connect the computing device 1110 with other computing devices. The platform 1122 can also be used to abstract the hierarchy of resources to provide a hierarchy of corresponding levels of demand encountered for resources 1124 implemented via the platform 1122. Therefore, in an interconnected device embodiment, the implementation of the functionality described herein can be distributed throughout the system 1100. For example, the functionality can be implemented partially on the computing device 1110 and through the platform 1122 that abstracts the functionality of the cloud 1120.

[0099] It should be understood that, for the sake of clarity, embodiments of the present application are described with reference to different functional units. However, it will be apparent that, without departing from the present application, the functionality of each functional unit can be implemented in a single unit, in multiple units or as a part of other functional units. For example, the functionality that is described as being performed by a single unit can be performed by multiple different units. Therefore, reference to a specific functional unit is only considered as a reference to the appropriate unit for providing the described functionality, rather than indicating a strict logical or physical structure or organization. Therefore, the present application can be implemented in a single unit, or can be physically and functionally distributed between different units and circuits.

[0100] Although the present application has been described in conjunction with some embodiments, it is not intended to be limited to the specific form set forth herein. On the contrary, the scope of the present application is limited only by the appended claims. Additionally, although individual features may be included in different claims, these may possibly be advantageously combined, and the inclusion in different claims does not imply that the combination of features is not feasible and / or advantageous. The order of features in the claims does not imply any specific order in which the features must work. In addition, in the claims, the word "comprising" does not exclude other elements, and the term "one" or "an" does not exclude a plurality. The figure marks in the claims are provided only as clear examples and should not be interpreted as limiting the scope of the claims in any way.

[0101] It is understandable that in the specific implementation of this application, user information and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

Claims

1. A method for scheduling parallel events, the method comprising: Obtaining a first event, wherein the first event includes at least one task for a block; In response to the first event including a read task for a first object, detecting whether the value of the first object in the block is changed by other events in parallel with the first event, the read task being used to read the value of the first object in the block; as well as, Determine whether to terminate the execution of the first event based on the audiometry result.

2. The method according to claim 1, wherein the reading task comprises: determining whether an event database contains a value of the first object, the event database being used to store data of the first event; as well as, In response to the event database containing a value for the first object, the value for the first object is read from the event database.

3. The method according to claim 2, wherein detecting whether the value of the first object in the block is changed by other events in parallel with the first event comprises: Listening to whether the value of the first object in a block database is changed by other events that are parallel to the first event, the block database being used to store block data; The reading task further includes: In response to the event database not including a value for the first object, the value for the first object is read from the chunk database.

4. The method according to claim 2, wherein the event database comprises a writing task sub-library and a reading task sub-library, wherein the writing task sub-library is used to store historical data of writing tasks, and the reading task sub-library is used to store historical data of reading tasks; and the reading the value of the first object from the event database comprises: determining whether the write task sub-library contains the value of the first object, In response to determining that the write task sub-library contains the value of the first object, reading the value of the first object from the write task sub-library, and, In response to determining that the write task sub-library does not include the value of the first object, determining whether the read task sub-library includes the value of the first object, and in response to determining that the read task sub-library includes the value of the first object, reading the value of the first object from the read task sub-library.

5. The method according to claim 1, wherein the value of the first object in the block is changed by a write task, and the write task comprises: Get the written value of the first object; as well as, The write value is written into a position corresponding to the first object in a block database, where the block database is used to store block data.

6. The method according to claim 1, wherein the step of detecting whether the value of the first object in the block is changed by other events that are parallel to the first event comprises: Sending the first object to the audiometry task as an object to be managed, wherein the audiometry task is used to audiometry the object to be managed; Wherein, the audiometry task includes: Obtain the object to be managed and the event corresponding to the object to be managed, and detect whether the value of the object to be managed has changed. In response to a change in the value of the object to be managed, an event corresponding to the object to be managed is reported as at least part of the audiometry result.

7. The method according to claim 6, wherein determining whether to terminate the execution of the first event based on the audiometry result comprises: In response to the audiometry result including the first event and the first event has not been completed, terminating the execution of the first event.

8. The method according to claim 6, further comprising: In response to the event comprising a write task for a second object, determining whether the second object is listened to by a listening task, the write task being used to write a value of the second object in a block; and In response to the second object being listened to, the listening task is notified that a value of the second object has changed.

9. The method according to claim 1, wherein detecting whether the value of the first object in the block is changed by other events in parallel with the first event comprises: Initiating an audiometry task for the first object, the audiometry task comprising: detecting whether the value of the first object changes, In response to the value of the first object changing, reporting the change in the value of the first object to the first event.

10. The method according to claim 9, wherein determining whether to terminate the execution of the first event based on the audiometry result comprises: In response to the value of the first object being changed and the first event not being completed, instructing the first event to terminate execution.

11. The method according to claim 7 or 10, further comprising: In response to the first event execution being terminated, the first event is re-executed.

12. The method of any one of claims 1-10, wherein the event comprises a transaction.

13. A scheduling device for parallel events, comprising: An acquisition module, configured to acquire a first event, wherein the first event includes at least one task for a block; an audio detection module, configured to detect whether the value of the first object in the block is changed by other events in parallel with the first event in response to the first event including a read task for the first object, the read task being used to read the value of the first object in the block; as well as, An execution module is configured to determine whether to terminate the execution of the first event based on the audiometry result.

14. A computing device comprising: processor; as well as A memory configured to store thereon computer executable instructions, which, when executed in the processor, enable the method of any one of claims 1 to 12 to be implemented.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 12.

16. A computer program product comprising a computer program which, when executed by a processor, causes the method according to any one of claims 1 to 12 to be implemented.