Method for processing activity, domain controller and computer program product
By performing initialization operations on the running entity during the activity's runtime phase, the problem of inconsistent thread contexts in multi-threaded scenarios is solved, achieving consistency between initialization and runtime within the same thread. This is applicable to video perception modules in advanced driver assistance systems.
Patent Information
- Application Number
- CN202411101562.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2026-02-13
AI Technical Summary
In multi-threaded scenarios, it is difficult to maintain consistency between the initialization of running entities and the thread context during the running phase within the same thread. This is especially true in advanced driver assistance systems, where the creation and use of graphics-related running entities in the video perception module require consistent thread context, which is difficult to achieve with existing technologies.
Initialization operations for the running entity are performed during the runtime phase of the activity, rather than the initialization phase. The initialization process is controlled by acquiring and managing enable and end flags, ensuring that initialization and runtime are completed in the same thread.
It enables the initialization and execution of runtime entities in the same thread, which is suitable for application scenarios that require consistent thread context. It avoids repeated initialization and reduces the negative impact on runtime logic code.
Smart Images

Figure CN121523871A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure generally relate to the field of computer technology, and more particularly to methods for processing activities, domain controllers, and computer program products. Background Technology
[0002] In some software systems, the smallest unit capable of independently performing a specific function is called a runnable. A runnable can be a function, method, class, object, or any other block of code that implements a specific function. A single runnable is associated with corresponding business logic. Developers write business code by providing specific implementations for predefined callback functions for the initialization, runtime, and de-initialization phases. Runnables can be contained within activities. Activities typically exist as processes. Multiple runnables within the same activity can form a directed acyclic graph (DAG). Activities can be triggered at time or each time data arrives. Summary of the Invention
[0003] Embodiments of this disclosure provide a method for processing activities, a domain controller, and a computer program product.
[0004] According to a first aspect of this disclosure, a method for processing an activity is provided. The method includes obtaining an enable flag for at least one running entity in the activity. The enable flag indicates whether an initialization operation for the corresponding running entity is performed during the running phase of the activity. The method further includes performing an initialization operation for the first running entity during the running phase in response to determining that an enable flag for a first running entity among the at least one running entity is set.
[0005] According to a second aspect of this disclosure, a domain controller is provided. The domain controller includes at least one processor and a memory. The memory is coupled to the at least one processor and has instructions stored thereon. When executed by the at least one processor, the instructions cause the domain controller to perform the method described according to a first aspect of this disclosure.
[0006] According to a third aspect of this disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions. The machine-executable instructions are used to perform the method described according to a first aspect of this disclosure.
[0007] According to a fourth aspect of this disclosure, a machine-readable storage medium is provided. Machine-executable instructions are stored on the machine-readable storage medium. These machine-executable instructions are executed by a processor to implement the steps of the method in the first aspect of this disclosure. Attached Figure Description
[0008] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.
[0009] Figure 1 A schematic diagram of an example environment in which the devices and / or methods of embodiments of the present disclosure may be implemented is shown.
[0010] Figure 2 An exemplary flowchart of a method for processing activities according to an embodiment of the present disclosure is shown.
[0011] Figure 3 An exemplary flowchart illustrating further steps of a method for processing activities according to embodiments of the present disclosure is shown.
[0012] Figure 4 An exemplary schematic diagram of the process of initializing and running activities according to embodiments of the present disclosure is shown.
[0013] Figure 5 Another exemplary schematic diagram of the process of initializing and running activities according to embodiments of the present disclosure is shown.
[0014] Figure 6 A schematic block diagram of a domain controller suitable for implementing embodiments of the present disclosure is shown.
[0015] In the various accompanying figures, the same or corresponding reference numerals indicate the same or corresponding parts. The elements in the accompanying figures are schematic and not drawn to scale. Detailed Implementation
[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0017] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0018] As mentioned above, in a multithreaded scenario, multiple running entities within the same activity can be assigned to different threads. An activity typically has an initialization phase, a running phase, and a de-initialization phase. The way threads are assigned to multiple running entities may differ between the initialization and running phases. Thus, a single running entity may be assigned different threads during the initialization and running phases.
[0019] In some advanced driver assistance systems (ADAS), an automotive operating system (AOS) is used to manage and control onboard hardware and software resources. The AOS can be considered middleware (MW) for ADAS. In the AOS, each running entity is typically initialized by its main thread. However, during runtime, these entities are usually run in a multi-threaded manner; therefore, some entities may not run on the main thread. In such cases, the thread that initializes a particular running entity may be different from the thread that runs that entity.
[0020] In some application scenarios, the context of the threads that initialize and run runtime entities needs to remain consistent. For example, in some ADAS (such as L2++ ADAS), video perception (ViPer) plays an indispensable role in environmental modeling and downstream modules (such as fusion, planning, and control). However, system-on-a-chip (SoC) solutions for processing video frames (or images) have local constraints on thread context, requiring the creation and use of some graphics-related runtime entities to occur within the same thread. This is difficult to achieve in this multi-threaded scenario.
[0021] Therefore, this disclosure proposes a method for handling activities. This method proposes performing initialization operations on the running entity during the activity's runtime phase, rather than the activity's initialization phase. This allows the running entity to be initialized and run within the same thread, making it suitable for application scenarios that require context consistency between the threads initializing and running the running entity.
[0022] The embodiments of this disclosure will now be described in further detail with reference to the accompanying drawings, wherein... Figure 1The examples illustrate the devices and / or methods of embodiments of this disclosure and may be implemented in an example environment.
[0023] like Figure 1 As shown, example environment 100 includes vehicle 102. Vehicle 102 may be an electric vehicle. Vehicle 102 may include ADAS 110. ADAS 110 may include hardware layer 113, middleware 112, and application layer 111. Middleware 112 may be AOS. Middleware 112 is located between application layer 111 and hardware layer 113. Although not shown, one or more other layers may exist between hardware layer 113 and middleware 112. One or more other layers may exist between application layer 111 and middleware 112. Middleware 112 may be used, for example, to decouple applications in application layer 111 from the underlying infrastructure in hardware layer 113, provide general services, improve performance and scalability, perform messaging, control data access, provide security functions, log, balance load, and perform transaction management, etc.
[0024] Figure 2 An exemplary flowchart of a method 200 for processing an activity according to an embodiment of the present disclosure is shown. Here, the electronic device for processing the activity may be a domain controller or a computer device. The activity may include one or more running entities.
[0025] exist Figure 2 At box 202, obtain the enable flag of at least one running entity in the activity. The enable flag indicates whether the initialization operation for the corresponding running entity is executed during the running phase of the activity. In one example, if the enable flag of the first running entity among the at least one running entities is set, the enable flag indicates that the initialization operation for the first running entity is executed during the running phase. If the enable flag of the first running entity is not set, the enable flag indicates that the initialization operation for the first running entity is executed during the initialization phase of the activity. In the context, "at least one running entity" can refer to a subset of running entities in the activity or all running entities in the activity. "First running entity" refers to any one of the at least one running entities.
[0026] At box 204, it is determined whether the enable flag of the first running entity among the at least one running entity is set. In response to determining that the enable flag of the first running entity is set (“Y” at box 204), at box 206, an initialization operation for the first running entity is performed during the running phase. In response to determining that the enable flag of the first running entity is not set (“N” at box 204), at box 208, it is determined that an initialization operation for the first running entity is performed during the active initialization phase.
[0027] In some embodiments of this disclosure, the operation at block 204 may be performed for each of the at least one running entity to determine whether the enable flag of each of the at least one running entity is set. Thus, the running entity among the at least one running entity that requires initialization operations to be performed during the active running phase may have its initialization operations performed at block 206 during the active running phase.
[0028] Through the above process, initialization operations for the running entity can be performed during the activity's runtime phase, rather than during its initialization phase. This allows the running entity to be initialized and run within the same thread, making it suitable for application scenarios where the context of the thread initializing and running the running entity must remain consistent.
[0029] In some embodiments of this disclosure, the target running entity in the activity may be determined by the application layer 111 in ADAS 110. In this context, a "target running entity" refers to a running entity whose threads used during the running phase are required to be the same as those used during the initialization phase of the activity. In one example, the application layer 111 may determine the target running entity by receiving a user instruction. The application layer 111 may then set the enable flag of the target running entity. Accordingly, the middleware 112 in ADAS 110 may obtain the enable flag of at least one running entity in the activity. If the middleware 112 determines that the enable flag of a first running entity is set, the middleware 112 may determine that an initialization operation for the first running entity is performed during the running phase, and the application layer 111 performs the initialization operation for the first running entity during the running phase.
[0030] In some embodiments of this disclosure, the enable flag of at least one running entity in the activity is pre-reset, or the default value of the enable flag is a reset value. The enable flag of the first running entity is set by calling a first preset function. The first preset function is configured to set the enable flag of the first running entity. In one example, the first preset function is defined by middleware 112. Application layer 111 sets the enable flag of the first running entity by calling the first preset function.
[0031] In some embodiments of this disclosure, the application layer 111 may set the enable flag of the target running entity during the runtime phase. In one example, the enable flag of the target running entity is set before the target running entity is initialized. In other embodiments of this disclosure, the application layer 111 may set the enable flag of the target running entity during the initialization phase of the activity. This allows the middleware 112 to be notified in advance that the initialization operation for the first running entity will be performed during the runtime phase, so that the middleware 112 can notify the process monitoring module to perform corresponding process monitoring.
[0032] In some embodiments of this disclosure, middleware 112 may obtain thread configuration information for a first running entity. The thread configuration information for the first running entity may be set before initialization operations for the first running entity are performed during the runtime phase. In one example, application layer 111 sets the thread configuration information for the first running entity before initialization operations for the first running entity are performed during the runtime phase. Middleware 112 may obtain the thread configuration information for the first running entity from application layer 111. Then, middleware 112 may set up the threads for initializing and running the first running entity based on the thread configuration information of the first running entity.
[0033] Figure 3 An exemplary flowchart illustrating further steps of a method 200 for processing activities according to an embodiment of the present disclosure is shown. Figure 3 At box 302, the end flag of the at least one running entity is obtained. The end flag of the first running entity is set after the initialization operation for the first running entity is completed.
[0034] At box 304, it is determined whether the end flag of the first running entity is set. In response to determining that the end flag of the first running entity is set ("Y" at box 304), at box 306, the initialization operation for the first running entity is prohibited. Thus, the initialization operation for the first running entity is no longer executed. In response to determining that the end flag of the first running entity is not set ("N" at box 304), the process returns to box 302 to continue determining whether the end flag of the first running entity is set.
[0035] In some embodiments of this disclosure, the application layer 111 may set the end flag of the target running entity. The middleware 112 may obtain the end flag of the at least one running entity. If the middleware 112 determines that the end flag of the first running entity is set, the middleware 112 knows that the initialization operation for the first running entity has ended, and it may notify the process monitoring module to perform corresponding process monitoring. After the end flag of the first running entity is set, the application layer 111 no longer performs the initialization operation for the first running entity.
[0036] In some embodiments of this disclosure, the operation at block 304 can be performed for each of the at least one running entity to determine whether the end flag of each of the at least one running entity is set. Thus, running entities that have completed their initialization operations can be prevented from performing initialization operations at block 306, thereby avoiding repeated initialization.
[0037] In other embodiments of this disclosure, the operation at block 304 can be performed for each designated running entity among the at least one running entity to determine whether the end flag of each designated running entity among the at least one running entity is set. Here, "designated running entity" refers to the running entity whose enable flag is set. In this way, designated running entities that have completed the initialization operation can be prevented from performing the initialization operation at block 306, thereby avoiding repeated initialization.
[0038] In some embodiments of this disclosure, the end flag of the at least one running entity is pre-reset, or the default value of the end flag is a reset value. The end flag of the first running entity is set by calling a second preset function. The second preset function is configured to set the end flag of the first running entity. In one example, the second preset function is defined by middleware 112. Application layer 111 sets the end flag of the first running entity by calling the second preset function.
[0039] Since the logic code in the runtime phase is executed repeatedly, the above process avoids re-initializing the runtime entity after the initialization operation for that entity is completed in the runtime phase. This way, transferring the initialization operation for the runtime entity to the runtime phase will not negatively impact the business logic in the runtime phase.
[0040] The following is for reference. Figure 4 and Figure 5 The process of initialization and operation activities according to embodiments of this disclosure will be described. Figure 4 In the example, activities may include running entities R1-R6. It is assumed that running entities R1-R6 are all target running entities (the threads used during the running phase are required to be the same as those used during the initialization phase). The initialization phase occurs before time T1. The running phase occurs between time T1 and time T3.
[0041] Before time T1 (initialization phase), application layer 111 can set the enable flags of running entities R1-R6. Middleware 112 retrieves the enable flags of the active running entities R1-R6. Because in Figure 4 In the example, running entities R1-R6 are all target running entities, so the enable flags of running entities R1-R6 are all set. Middleware 112 can determine that the initialization operations for running entities R1-R6 will be performed during the runtime phase.
[0042] Between time T1 and time T2, Figure 4In a multi-threaded scenario, the first thread (main thread) THRD1 is assigned to running entities R1, R3, and R6. The second thread THRD2 is assigned to running entities R2 and R5. The third thread THRD3 is assigned to running entity R4. The application layer 111 performs initialization operations for running entities R1-R6. Since the activity is already in the running phase between time T1 and T2, running entities R1, R3, and R6 can be initialized in the first thread THRD1. Running entities R2 and R5 can be initialized in the second thread THRD2. Running entity R4 can be initialized in the third thread THRD3.
[0043] At time T2, the initialization operations for running entities R1-R6 are completed, and application layer 111 sets the end flag of running entities R1-R6. Middleware 112 retrieves the end flag of the active running entities R1-R6. Because in Figure 4 In the example, running entities R1-R6 are all target running entities, so after initialization, the end flags of running entities R1-R6 are all set. Middleware 112 can determine that the initialization operation for running entities R1-R6 has been completed by using the end flags of running entities R1-R6.
[0044] Between time T2 and time T3, entities R1-R6 can be run repeatedly to complete the corresponding business logic.
[0045] from Figure 4 As can be seen, the threads used to initialize and run entities R1-R6 (the threads used between time T1 and time T2) are the same as the threads used to run entities R1-R6 (the threads used between time T2 and time T3). This ensures that the context of the threads that initialize and run entities R1-R6 remains consistent, making it suitable for application scenarios where there are local restrictions on the context of threads.
[0046] exist Figure 5 In the example, activities may include running entities R1-R6. It is assumed that running entities R1-R4 and R6 are target running entities (the threads they use during the running phase are required to be the same as the threads used during the initialization phase), while running entity R5 is not a target running entity. The initialization phase occurs before time T1. The running phase occurs between time T1 and time T3.
[0047] Before time T1 (initialization phase), since running entity R5 is not the target running entity, it can be initialized by the first thread (main thread) THRD1 during the initialization phase. Application layer 111 can set the enable flags of running entities R1-R4 and R6. Middleware 112 retrieves the enable flags of active running entities R1-R6. Because in Figure 5In the example, running entities R1-R4 and R6 are the target running entities, while running entity R5 is not. Therefore, only the enable flags of running entities R1-R4 and R6 are set, while the enable flag of running entity R5 is not set (it is in a reset state). Middleware 112 can determine that the initialization operations for running entities R1-R4 and R6 will be performed during the runtime phase.
[0048] Between time T1 and time T2, Figure 5 In a multi-threaded scenario, the first thread (main thread) THRD1 is assigned to running entities R1, R3, and R6. The second thread THRD2 is assigned to running entity R2. The third thread THRD3 is assigned to running entity R4. The application layer 111 performs initialization operations for running entities R1-R4 and R6. Since the activity is already in the running phase between time T1 and T2, running entities R1, R3, and R6 can be initialized in the first thread THRD1. Running entity R2 can be initialized in the second thread THRD2. Running entity R4 can be initialized in the third thread THRD3.
[0049] At time T2, the initialization operations for running entities R1-R6 are completed, and application layer 111 sets the end flags of running entities R1-R4 and R6. Middleware 112 retrieves the end flags of the active running entities R1-R4 and R6. Because in Figure 5 In the example, running entities R1-R4 and R6 are the target running entities, while running entity R5 is not. Therefore, after initialization, the end flags of running entities R1-R4 and R6 are set, while the enable flag of running entity R5 is not set (it is in a reset state). Middleware 112 can determine that the initialization operation for running entities R1-R4 and R6 has been completed by checking the end flags of running entities R1-R4 and R6. Middleware 112 can determine that the initialization operation for running entity R5 has been completed during the initialization phase by checking the enable flag of running entity R5.
[0050] Between time points T2 and T3, the second thread THRD2 is assigned to running entity R5, while the thread allocation for running entities R1-R4 and R6 is the same as the thread allocation between time points T1 and T2. During this period, running entities R1-R6 can be repeatedly run to complete the corresponding business logic.
[0051] exist Figure 5 In the example, only running entities R1-R4 and R6 are target running entities, and the thread contexts used to initialize and run these running entities R1-R4 and R6 are consistent. Running entity R5 is not a target running entity, and the thread context used to initialize and run running entity R5 does not need to be consistent. Thus, Figure 5 The implementation method is also applicable to application scenarios where there are local restrictions on the thread context.
[0052] In some embodiments of this disclosure, an enable flag can also be set for an activity. In one example, a third preset function can be defined by middleware 112. The third preset function is configured to read and return the enable flag of the running entity. The return value of the third preset function is defined, for example, as a Boolean type. Application layer 111 can iteratively call the third preset function corresponding to the at least one running entity in the activity to determine the enable flag of each of the at least one running entities. If the enable flag of any running entity in the at least one running entity in the activity is set for the first time, the enable flag of the activity is set, indicating that there is a running entity in the activity that needs to be initialized during the runtime phase. In this case, application layer 111 can stop iterating through the activity.
[0053] In some embodiments of this disclosure, an end flag can also be set for the activity. In one example, a fourth preset function can be defined by middleware 112. The fourth preset function is configured to read and return the end flag of the running entity. The return value of the fourth preset function is defined, for example, as a Boolean type. Application layer 111 can iteratively call the fourth preset function corresponding to the at least one running entity in the activity to determine the end flag of each running entity in the at least one running entity. If it is determined that the end flags of all running entities in the at least one running entity are set, the end flag of the activity is set. Alternatively, if it is determined that the end flags of all specified running entities in the at least one running entity are set, the end flag of the activity is set. As mentioned above, a “specified running entity” refers to a running entity whose enable flag is set. Accordingly, if it is determined that the end flag of any specified running entity in the at least one running entity is not set, the end flag of the activity is kept in a reset state.
[0054] Figure 6 A schematic block diagram of an example domain controller 600 that can be used to implement embodiments of the present disclosure is shown. As shown, the domain controller 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 602 or loaded from storage unit 608 into random access memory (RAM) 603. Various programs and data required for the operation of the domain controller 600 may also be stored in RAM 603. The CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0055] Multiple components in the domain controller 600 are connected to the I / O interface 605, and may include, for example: input units 606, such as a keyboard, mouse, etc.; output units 607, such as various types of displays, speakers, etc.; memory 608, such as a disk, optical disk, etc.; and communication units 609, such as a network interface card, modem, wireless transceiver, etc. The communication unit 609 allows the domain controller 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0056] The various processes and procedures described above can be executed by processing unit 601. For example, in some embodiments, method 200 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on domain controller 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by CPU 601, one or more actions of method 200 described above can be performed.
[0057] In summary, the method for processing an activity according to embodiments of this disclosure can perform initialization operations on a running entity during the activity's runtime phase, rather than during the activity's initialization phase. This allows the running entity to be initialized and run in the same thread, making it suitable for application scenarios where the context of the thread initializing and running the running entity must remain consistent. Furthermore, considering that the logic code in the runtime phase may be executed repeatedly, the method according to embodiments of this disclosure can avoid re-initializing the running entity after the initialization operations on the running entity are completed in the runtime phase. Thus, transferring the initialization operations on the running entity to the activity's runtime phase does not negatively impact the logic code in the runtime phase.
[0058] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0059] A computer-readable storage medium can be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer-readable storage medium can be, for example—but not limited to—an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), and any suitable combination thereof. The computer-readable storage medium as used herein is not to be construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0060] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0061] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0062] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0063] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0064] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0065] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0066] Unless otherwise expressly indicated by the context, the singular form of words used herein and in the appended claims includes the plural form, and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Where the term “example” is used herein, particularly when it follows a set of terms, the “example” is merely exemplary and illustrative and should not be considered exclusive or pervasive.
[0067] Further aspects and scope of adaptation become apparent from the description provided herein. It should be understood that various aspects of this application may be implemented individually or in combination with at least one other aspect. It should also be understood that the descriptions and specific embodiments herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0068] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method (200) for processing activities, comprising: Obtain (202) the enable flag of at least one running entity in the activity, wherein the enable flag indicates whether an initialization operation for the corresponding running entity is performed during the running phase of the activity; as well as In response to determining (204) that the enable flag of the first operating entity among the at least one operating entity is set, an initialization operation for the first operating entity is performed during the operating phase (206).
2. The method (200) according to claim 1, further comprising: Obtain (302) the end flag of the at least one running entity, wherein the end flag of the first running entity is set after the initialization operation for the first running entity has ended; as well as In response to determining (304) that the end flag of the first running entity is set, the initialization operation for the first running entity is prohibited (306).
3. The method (200) according to claim 1 or 2, further comprising: Obtain thread configuration information for the first running entity, wherein the thread configuration information for the first running entity is set before performing the initialization operation for the first running entity; as well as The threads of the first running entity are initialized and run according to the thread configuration information of the first running entity.
4. The method (200) according to claim 1 or 2, further comprising: In response to the first determination that the enable flag of any of the at least one running entities is set, the enable flag of the activity is set.
5. The method (200) according to claim 1 or 2, wherein the enable flag of the at least one running entity is pre-reset, and the enable flag of the first running entity is set by calling a first preset function configured to set the enable flag of the first running entity.
6. The method (200) according to claim 2, further comprising: In response to determining that the end flag of all running entities in the at least one running entity is set, the end flag of the activity is set.
7. The method (200) according to claim 2, wherein the end flag of the at least one running entity is pre-reset, and the end flag of the first running entity is set by calling a second preset function, the second preset function being configured to set the end flag of the first running entity.
8. The method (200) according to claim 1 or 2, further comprising: Determine the target running entity in the activity, wherein the thread used by the target running entity in the running phase is required to be the same as the thread used in the initialization phase of the activity; as well as Set the enable flag of the target running entity.
9. The method (200) of claim 8, wherein setting the enable flag of the target running entity comprises one of the following: During the initialization phase, the enable flag of the target running entity is set; or During the operation phase, the enable flag of the target running entity is set.
10. A domain controller (600), comprising: At least one processor; as well as A memory coupled to the at least one processor and having instructions stored thereon, which, when executed by the at least one processor, cause the domain controller (600) to perform the method (200) according to any one of claims 1-9.
11. A computer program product tangibly stored on a non-transient computer-readable medium and comprising machine-executable instructions for performing the method (200) according to any one of claims 1-9.