A multi-task stack correlation coordination control method and system based on function frame

Through the multi-task stack coordination control method based on function frames, the concurrency conflict problem of multi-user operations in the blockchain BAAS platform is solved, and the orderly execution of ledger and organization operations and the friendly user experience are achieved.

CN119003128BActive Publication Date: 2025-09-26TRAVELSKY TECHNOLOGY LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411215039.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-09-26
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Existing blockchain BAAS platforms are prone to concurrency conflicts and operation failures during multi-user and ledger operations. In particular, it is difficult to ensure the asynchronous and orderly execution of tasks when multiple related organizations are operating.

Method used

A multi-task stack coordination control method based on function frames is adopted. By generating task frames and freeze frames, the function frames in the task stack are executed in sequence, including the task frames of the declaration document and the freeze frames of the associated organization, ensuring the orderly execution of ledger and organization operations.

Benefits of technology

It achieves asynchronous and user-friendly experience for user operations, avoids concurrent conflicts in task operations, and ensures parallelism between multiple stacks and smooth ledger operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003128B_ABST
    Figure CN119003128B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the field of blockchain technology, and particularly relates to a method and system for coordinating the correlation of multiple task stacks based on function frames. The control method includes: obtaining a user request, wherein the user request includes the user's processing action on the declaration document; generating a function frame corresponding to the processing action based on the user request; adding the function frame to a pre-set task stack, and sequentially executing the processing actions on the declaration document corresponding to all function frames in the task stack in the order of the task stack. The present disclosure adopts a task frame + freeze frame mode, and the freeze and unfreeze logic is programmable. The operating state of the stack is controlled through frame behavior; it simplifies the logic of the stack itself, solves the correlation coordination between multiple stacks, and effectively avoids the conflict problem between ledger operations and organizational operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of blockchain technology, and in particular relates to a method and system for coordinating and controlling the correlation of multi-task stacks based on function frames. Background Art

[0002] Blockchain BAAS platforms are becoming a popular model for blockchain cluster management. Conventional BAAS platforms often use a synchronous model to process organizational and ledger operations. This means waiting for each step to complete before proceeding to other operations, which can compromise user experience and operational efficiency. If multiple users within an organization perform operations simultaneously, concurrent conflicts can occur. Furthermore, ledger operations often involve multiple associated organizations. If other organizations are also performing operations at the same time, conflicts, failures, and even irreversible damage can easily occur.

[0003] How to design a multi-stack task operating system that ensures the asynchronous and orderly execution of each organization's operation tasks while ensuring that the ledger tasks do not conflict with the organization's operation tasks during execution is the problem to be solved in this disclosure. Summary of the Invention

[0004] To address the above issues, the present disclosure provides a multi-task stack correlation coordination control method based on function frames, the control method comprising:

[0005] Obtaining a user request, wherein the user request includes a user's processing action on the declaration document;

[0006] generating a function frame corresponding to the processing action based on the user request;

[0007] The function frame is added to a preset task stack, and processing actions on the declaration document corresponding to all function frames in the task stack are executed in sequence according to the order of the task stack.

[0008] Preferably, the processing actions on the declaration document include: creating, editing and deleting the declaration document.

[0009] Preferably, the function frame includes: a task frame of an operation statement document and a freeze frame of an associated organization.

[0010] Preferably, the function frame is added to a pre-set task stack, and the processing actions on the declaration document corresponding to all the function frames in the task stack are executed in sequence according to the order of the task stack, including:

[0011] Place the task frame of the declaration document into the task stack of the ledger, and place the freeze frame of the associated organization into the task stack of the associated organization;

[0012] Freeze the freeze frame of the associated organization and the task stack of the associated organization;

[0013] Based on the frozen task stack of the association organization, the task frame of the declaration document is awakened and the declaration document task is executed.

[0014] Preferably, before executing the declaration document task, the process includes:

[0015] Check the status of freeze frames for all associated organizations;

[0016] If there is an unfrozen freeze frame, the task frame of the declaration document enters the waiting state.

[0017] Preferably, after executing the declaration document task, the process includes:

[0018] Wake up the frozen frame of the associated organization and release the frozen state of the frozen frame of the associated organization;

[0019] Based on the frozen frame of the awakened context organization, the task stack of the context organization is resumed.

[0020] The present disclosure also proposes a multi-task stack correlation coordination control system based on function frames, the control system comprising:

[0021] An acquisition module, configured to acquire a user request, wherein the user request includes a user's processing action on a declaration document;

[0022] A generating module, generating a function frame corresponding to the processing action based on the user request;

[0023] The execution module adds the function frame to a pre-set task stack and executes the processing actions on the declaration document corresponding to all the function frames in the task stack in sequence according to the order of the task stack.

[0024] Preferably, the function frame includes: a task frame of an operation statement document and a freeze frame of an associated organization.

[0025] Preferably, the execution module adds the function frame to a pre-set task stack, and sequentially executes the processing actions on the declaration document corresponding to all function frames in the task stack in the order of the task stack, including:

[0026] The execution module is used to place the task frame of the declaration document into the task stack of the account book, and place the frozen frame of the associated organization into the task stack of the associated organization;

[0027] Freeze the freeze frame of the associated organization and the task stack of the associated organization;

[0028] Based on the frozen task stack of the association organization, the task frame of the declaration document is awakened and the declaration document task is executed.

[0029] Preferably, before executing the declaration document task, the process includes:

[0030] Check the status of freeze frames for all associated organizations;

[0031] If there is an unfrozen freeze frame, the task frame of the declaration document enters the waiting state.

[0032] Preferably, after executing the declaration document task, the process includes:

[0033] Wake up the frozen frame of the associated organization and release the frozen state of the frozen frame of the associated organization;

[0034] Based on the frozen frame of the awakened context organization, the task stack of the context organization is resumed.

[0035] The present disclosure has the following beneficial effects:

[0036] (1) This disclosure uses declaration documents to describe transaction specifications and expected operating status, making operations asynchronous and user-friendly.

[0037] (2) This disclosure uses function frames to process changes in declaration documents. The functions are programmable and very flexible.

[0038] (3) The present disclosure uses a multi-function stack approach to run function frames, thereby avoiding concurrent conflicts in tasks on the same stack and ensuring parallelism between multiple stacks.

[0039] (4) This disclosure adopts the task frame + freeze frame mode. The freeze and unfreeze logic is programmable, and the running state of the stack is controlled through the frame behavior. It not only simplifies the logic of the stack itself, but also solves the correlation coordination between multiple stacks, effectively avoiding the conflict between ledger operations and organization operations.

[0040] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be achieved and obtained through the structures indicated in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0042] Figure 1 A diagram showing a multi-task stack correlation coordination control method based on function frames in an embodiment of the present disclosure is shown;

[0043] Figure 2 A detailed flow chart of a multi-task stack correlation coordination control method based on function frames in an embodiment of the present disclosure is shown;

[0044] Figure 3 A flowchart of operating account book A in an embodiment of the present disclosure is shown;

[0045] Figure 4 A diagram of a multi-task stack correlation coordination control system based on function frames in an embodiment of the present disclosure is shown;

[0046] Figure 5 A diagram of a multi-task stack association coordination control device based on function frames in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0048] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware units or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0049] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to actual circumstances.

[0050] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the application described herein can, for example, be implemented in an order other than that illustrated or described herein.

[0051] In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or submodules is not necessarily limited to those steps or submodules explicitly listed, but may include other steps or submodules not explicitly listed or inherent to such process, method, product or apparatus.

[0052] This disclosure provides a task stack-based processing solution for blockchain BAAS platforms. In this solution, each organization has a task execution stack, which executes its operational tasks in sequence. Each ledger also has a task execution stack, which executes its operational tasks in sequence. This solution uses a task frame + freeze frame approach to coordinate and control ledger operations with the task stacks of multiple associated organizations, ensuring the normal operation of blockchain organizations and ledger logic.

[0053] Definitions of some nouns in this disclosure:

[0054] Declaration document: A data document that describes the specifications of a thing and its expected operating state.

[0055] Function frame: declares the processing logic function corresponding to the changes in the document once, and this function can be executed.

[0056] Task stack: A queue in which a sequence of function frames is placed, which are executed one by one in the order in which they are placed.

[0057] Freeze frame: A type of function frame that contains interactive freezing and thawing logic. It is used to freeze and thaw itself. Freezing also means pausing the task stack in which it is located. The frozen state can be thawed.

[0058] like Figure 1 As shown, the present disclosure also proposes a multi-task stack correlation coordination control method based on function frames, and the control method includes:

[0059] Obtaining a user request, wherein the user request includes a user's processing action on the declaration document;

[0060] generating a function frame corresponding to the processing action based on the user request;

[0061] The function frame is added to a preset task stack, and processing actions on the declaration document corresponding to all function frames in the task stack are executed in sequence according to the order of the task stack.

[0062] Specifically, the processing actions on the declaration document include: creating, editing and deleting the declaration document.

[0063] Specifically, the function frame includes: a task frame of an operation declaration document and a freeze frame of an associated organization.

[0064] Specifically, the function frame is added to a preset task stack, and processing actions on the declaration document corresponding to all function frames in the task stack are executed in sequence according to the order of the task stack, including:

[0065] Place the task frame of the declaration document into the task stack of the ledger, and place the freeze frame of the associated organization into the task stack of the associated organization;

[0066] Freeze the freeze frame of the associated organization and the task stack of the associated organization;

[0067] Based on the frozen task stack of the association organization, the task frame of the declaration document is awakened and the declaration document task is executed.

[0068] Specifically, before executing the declaration document task, the following steps are included:

[0069] Check the status of freeze frames for all associated organizations;

[0070] If there is an unfrozen freeze frame, the task frame of the declaration document enters the waiting state.

[0071] Specifically, after executing the declaration document task, the following steps are included:

[0072] Wake up the frozen frame of the associated organization and release the frozen state of the frozen frame of the associated organization;

[0073] Based on the frozen frame of the awakened context organization, the task stack of the context organization is resumed.

[0074] like Figure 2As shown, in the present disclosure, the user's operation is based on the operation of the declaration document. Each operation of the user corresponds to the creation, editing, and deletion of a corresponding declaration document. The declaration document is recorded in the distributed coordination center. When the declaration document is operated, an event will be triggered. After hearing the declaration document change event, the event processing center will convert the processing of the declaration document into a processing function, that is, a function frame, and put the function frame into its corresponding task stack for sorting and execution. If it is an operation on an organization, it will be placed in the task stack of the organization. If it is an operation on an account book, it will be placed in the task stack of the account book. This solves the problem of asynchronous return of user requests and ensures that even if multiple users under the same organization or the same account book operate at the same time, the operations can be executed in an orderly manner.

[0075] Conflict resolution between ledger tasks and organization tasks: When performing a ledger operation, a ledger operation task frame and an associated organization freeze frame are generated and placed in their respective execution sequences. When the ledger operation frame is executed, it checks the status of all associated freeze frames. If not all are frozen, it enters a waiting state. When all freeze frames trigger execution, the execution of the corresponding organization execution stack is frozen. At this time, the ledger execution frame is awakened and the ledger operation task is executed. After execution is completed, all associated freeze frames are unfrozen, and the associated organization task stack resumes execution.

[0076] Example

[0077] like Figure 3 As shown, take the operation on ledger A, whose associated organizations are org1, org2, and org3 as an example.

[0078] 1. Accept user requests, record ledger declaration documents, and trigger declaration document processing in an event manner;

[0079] 2. Generate the task frame of ledger A and the frozen frames a, b, and c of the associated organizations;

[0080] 3. Put the task frame into the task stack of account book A;

[0081] 4. Put freeze frame a into the associated org1 task stack;

[0082] 5. Put freeze frame b into the associated org2 task stack;

[0083] 6. Put freeze frame c into the associated org3 task stack;

[0084] 7. The task frame is executed and enters the waiting state, waiting for freeze frames a, b, and c to all freeze;

[0085] 8. Freeze frame a execution, org1 task stack is frozen;

[0086] 9. Freeze frame b execution, org2 task stack is frozen;

[0087] 10. Freeze frame c execution, org3 task stack is frozen;

[0088] 11. All associated freeze frames are frozen and the task frame is awakened;

[0089] 12. The task frame executes the account book operation task;

[0090] 13. The task frame wakes up all frozen frames, and then the task frame ends;

[0091] 14. Freeze frame a is awakened and ends, and the org1 task stack resumes execution;

[0092] 15. Freeze frame b is awakened and ends, and the org2 task stack resumes execution;

[0093] 16. Freeze frame c is awakened and ends, and the org3 task stack resumes execution;

[0094] Among them, steps 7-10 can be executed out of order in practice without affecting the control effect. If 8, 9, and 10 are executed before 7, step 7 does not wait and the task execution and subsequent processes are carried out directly.

[0095] like Figure 4 As shown, the present disclosure also proposes a multi-task stack correlation coordination control system based on function frames, the control system comprising:

[0096] An acquisition module, configured to acquire a user request, wherein the user request includes a user's processing action on a declaration document;

[0097] A generating module, generating a function frame corresponding to the processing action based on the user request;

[0098] An execution module adds the function frame to a preset task stack, and sequentially executes the processing actions on the declaration document corresponding to all the function frames in the task stack in the order of the task stack.

[0099] Specifically, the function frame includes: a task frame of an operation declaration document and a freeze frame of an associated organization.

[0100] Specifically, the execution module adds the function frame to a pre-set task stack, and sequentially executes the processing actions on the declaration document corresponding to all function frames in the task stack in the order of the task stack, including:

[0101] The execution module is used to place the task frame of the declaration document into the task stack of the account book, and place the frozen frame of the associated organization into the task stack of the associated organization;

[0102] Freeze the freeze frame of the associated organization and the task stack of the associated organization;

[0103] Based on the frozen task stack of the association organization, the task frame of the declaration document is awakened and the declaration document task is executed.

[0104] Specifically, before executing the declaration document task, the following steps are included:

[0105] Check the status of freeze frames for all associated organizations;

[0106] If there is an unfrozen freeze frame, the task frame of the declaration document enters the waiting state.

[0107] Specifically, after executing the declaration document task, the following steps are included:

[0108] Wake up the frozen frame of the associated organization and release the frozen state of the frozen frame of the associated organization;

[0109] Based on the frozen frame of the awakened context organization, the task stack of the context organization is resumed.

[0110] like Figure 5 As shown, corresponding to the multi-task stack relevance coordination control method based on function frames provided above, the present disclosure also provides a multi-task stack relevance coordination control device based on function frames. Since the embodiment of the device is similar to the above-mentioned method embodiment, the description is relatively simple. For relevant points, please refer to the description of the above-mentioned method embodiment. The device described below is only schematic. The device may include: a processor (processor) 1, a memory (memory) 2 and a communication bus (that is, the above-mentioned device bus) and a search engine, wherein the processor 1 and the memory 2 complete mutual communication through the communication bus and communicate with the outside through the communication interface. The processor 1 can call the logic instructions in the memory 2 to execute the multi-task stack relevance coordination control method based on function frames.

[0111] In addition, the logic instructions in the above-mentioned memory 2 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as memory chips, USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks or optical disks.

[0112] On the other hand, an embodiment of the present disclosure also provides a processor-readable storage medium, on which a computer program 3 is stored. When the computer program 3 is executed by the processor 1, it is implemented to execute the multi-task stack association coordination control method based on function frames provided in the above-mentioned embodiments.

[0113] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor 1, including but not limited to magnetic storage (such as floppy disks, hard disks, tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs)), etc.

[0114] Those skilled in the art should understand that although the present disclosure has been described in detail with reference to the aforementioned embodiments, it is still possible to modify the technical solutions described in the aforementioned embodiments, or to make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A multi-task stack correlation coordination control method based on function frame, characterized in that: The control method includes: Obtaining a user request, wherein the user request includes a user's processing action on a declaration document; the declaration document is a data document used to describe the specifications of an object and its expected operating state; Generate a function frame corresponding to the processing action based on the user request; the function frame is a processing logic function corresponding to a change in a declared document, and the function can be executed; The function frame is added to a pre-set task stack, and the processing actions on the declaration document corresponding to all function frames in the task stack are executed in sequence according to the order of the task stack, including: placing the task frame of the declaration document into the task stack of the account book, and placing the frozen frame of the associated organization into the task stack of the associated organization; freezing the frozen frame and the task stack of the associated organization; based on the frozen task stack of the associated organization, waking up the task frame of the declaration document and executing the declaration document task; before executing the declaration document task, it includes: checking the status of the frozen frames of all associated organizations; if there is an unfrozen frozen frame, the task frame of the declaration document enters a waiting state; after executing the declaration document task, it includes: waking up the frozen frame of the associated organization and unfreezing the frozen state of the frozen frame of the associated organization; based on the awakened frozen frame of the associated organization, resuming execution of the task stack of the associated organization; the task stack is a queue, in which a sequence of function frames is placed, and executed one by one in the order in which they are placed; the frozen frame is a type of function frame, which contains interactive freezing and thawing logic for freezing and thawing itself. Freezing also means pausing the task stack in which it is located, and the frozen state can be thawed.

2. The multi-task stack correlation coordination control method based on function frame according to claim 1 is characterized in that: The processing actions on the declaration document include: creating, editing and deleting the declaration document.

3. The multi-task stack correlation coordination control method based on function frame according to claim 1 is characterized in that: The function frame includes: a task frame of an operation declaration document and a freeze frame of an associated organization.

4. A multi-task stack correlation coordination control system based on function frame, characterized in that: The control system includes: An acquisition module is used to obtain a user request, wherein the user request includes a user's processing action on a declaration document; the declaration document is a data document used to describe the specifications of an object and its expected operating state; A generating module, which generates a function frame corresponding to the processing action based on the user request; the function frame is a processing logic function corresponding to a change in a declaration document, and the function can be executed; An execution module adds the function frame to a pre-set task stack and sequentially executes the processing actions on the declaration document corresponding to all function frames in the task stack in the order of the task stack, including: placing the task frame of the declaration document into the task stack of the account book, placing the frozen frame of the associated organization into the task stack of the associated organization; freezing the frozen frame and the task stack of the associated organization; waking up the task frame of the declaration document based on the frozen task stack of the associated organization and executing the declaration document task; before executing the declaration document task, it includes: checking the status of the frozen frames of all associated organizations; if there is an unfrozen frozen frame, the task frame of the declaration document enters a waiting state; after executing the declaration document task, it includes: waking up the frozen frame of the associated organization and unfreezing the frozen state of the frozen frame of the associated organization; based on the awakened frozen frame of the associated organization, resuming execution of the task stack of the associated organization; the task stack is a queue, in which a sequence of function frames is placed, which are executed one by one in the order in which they are placed; the frozen frame is a type of function frame, which contains interactive freezing and thawing logic for freezing and thawing itself. Freezing also means pausing the task stack in which it is located, and the frozen state can be thawed.

5. The multi-task stack correlation coordination control system based on function frame according to claim 4 is characterized in that: The function frame includes: a task frame of an operation declaration document and a freeze frame of an associated organization.

Citation Information

Patent Citations

  • Collaborative authoring

    CN101855629A

  • Method and system for locking currently-edited file

    CN103544189A