Information flow and logic block interaction method based on responsive programming framework

By building a dynamic information framework and distributed resource management, the problem of tight coupling of logical blocks in the responsive programming framework is solved, dynamic integration and sharing of distributed host resources is realized, and the operability and flexibility of the system are improved.

CN120407106APending Publication Date: 2025-08-01黄沛锋
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510487854.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The tight coupling between logic blocks in existing responsive programming frameworks results in reduced independence, increasing code maintenance costs and reducing system scalability.

Method used

By building a dynamic information framework, multiple logical blocks are integrated into one framework, the dynamic flow and capacity merging of information is realized, data flow programming, responsive programming and dynamic dependency injection are adopted, the dependencies between logical blocks are dynamically adjusted, and the dynamic integration and sharing of distributed host resources are realized through distributed resource management and circular interaction protocols.

Benefits of technology

It realizes dynamic integration and sharing of distributed host resources, forming a highly flexible and scalable system, and improving the operability and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407106A_ABST
    Figure CN120407106A_ABST
Patent Text Reader

Abstract

The invention discloses an information flow and logic block interaction method based on a responsive programming framework, and relates to the technical field of application development. The information flow and logic block interaction method based on the responsive programming framework comprises the following specific steps: constructing a dynamic information framework; integrating a plurality of logic blocks into a framework to complete dynamic flow of information and combination of capacity; constructing a system architecture; and the constructed dynamic information framework is applied to a plurality of distributed hosts, and dynamic integration and sharing of resources of the plurality of distributed hosts are completed through loop parameters. According to the invention, the dynamic integration and sharing state of the distributed host resources is realized through the loop parameters and the loop interaction mechanism, and the architecture not only can manage the distributed resources in a unified manner, but also can dynamically expand and swallow new host resources, so that a highly flexible and extensible system is formed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of application development, and specifically to a method for information flow and logic block interaction based on a reactive programming framework. Background Art

[0002] The reactive programming framework is a programming paradigm based on data streams and change propagation, aiming to build asynchronous and event-driven applications. Common reactive programming frameworks include RxJava, Reactor, Project Reactor, Vert.x, ReactiveCocoa, and UniRx. In short, the reactive programming framework realizes efficient and flexible programming through data streams and change propagation, is suitable for handling complex asynchronous scenarios, and improves program performance and maintainability.

[0003] However, in the current reactive programming framework, there are problems in information flow and logic block interaction: the tightly coupled design of logic blocks reduces the independence between logic blocks. Once a certain logic block changes, it may have unpredictable effects on other logic blocks, which not only increases the code maintenance cost but also reduces the system scalability. Summary of the Invention

[0004] Aiming at the deficiencies of the prior art, the present invention provides a method for information flow and logic block interaction based on a reactive programming framework, which solves the problems proposed in the above background art.

[0005] To achieve the above objectives, the present invention is realized through the following technical solutions. A method for information flow and logic block interaction based on a reactive programming framework, the method includes the following specific steps:

[0006] Construct a dynamic information framework; integrate multiple logic blocks into one framework to complete the dynamic flow of information and the merging of capacities.

[0007] Construct a system architecture; apply the constructed dynamic information framework to multiple distributed hosts, and complete the dynamic integration and sharing of resources of multiple distributed hosts through loop parameters.

[0008] A further improvement of the technical solution of the present invention is that the step S1 of constructing a dynamic information framework further includes the following specific operation steps:

[0009] Data flow programming; use each logic block as a node, and connect the nodes with data streams to achieve a dynamic data stream.

[0010] Reactive programming; describe the relationship between data flow and logic blocks in a declarative manner to achieve dynamic response between logic blocks.

[0011] Dynamic Dependency Injection; Dynamically injecting and adjusting the dependencies between logic blocks;

[0012] Capacity Merging; Based on shared state management, capability abstraction, and dynamic composition logic, complete the capacity merging of logic blocks.

[0013] A further improvement of the technical solution of the present invention lies in that the capacity merging includes:

[0014] Shared State Management, including: using a global state manager to achieve state sharing between logic blocks;

[0015] Capability Abstraction, including: abstracting the capabilities of each logic block into callable interfaces;

[0016] Dynamic Composition Logic, including: dynamically composing the capabilities of logic blocks at runtime.

[0017] A further improvement of the technical solution of the present invention lies in that the construction of the system architecture specifically includes the following operating steps:

[0018] Distributed Resource Management; using distributed resource management technology to integrate the resources of multiple hosts into a unified shared state pool;

[0019] Circular Interaction Protocol; designing a circular interaction protocol to define the interaction rules between logic parameters.

[0020] Shared State Management; using shared state management technology to manage the shared state pool;

[0021] Dynamic Expansion Mechanism; designing a dynamic expansion mechanism to support the automatic joining and resource integration of new hosts.

[0022] A further improvement of the technical solution of the present invention lies in that after the construction of the system architecture is completed, its system architecture includes:

[0023] All distributed host registration parameters, used to initialize the shared state pool and contain the resource information of all hosts;

[0024] All distributed hosts exchange parameters with each other in a loop, used for the flow of data resources in the shared state pool;

[0025] The registration parameters of newly joined distributed hosts, and their resources are automatically integrated into the shared state pool for dynamic consumption;

[0026] All hosts obtain the storage resources and computing resources of other hosts from the shared state pool for resource sharing.

[0027] A further improvement of the technical solution of the present invention lies in that the construction of the system architecture further includes:

[0028] Virtualization; Using virtualization technology to abstract multiple physical resources into virtual resources.

[0029] Advantageous effects

[0030] Compared with the prior art, the advantageous effects of the present invention are that through the loop parameters and loop interaction mechanism, the dynamic integration and sharing state of distributed host resources are realized. Such an architecture can not only uniformly manage distributed resources, but also dynamically expand and absorb new host resources, forming a highly flexible and scalable system;

[0031] And by applying the concept of merging the framework liquidity and capacity of logical blocks to distributed hosts, the flow cycle interaction capacity merging between distributed hosts can be realized. By abstracting the two-dimensional window into an operable logical parameter and utilizing distributed systems, virtualization technology, and dynamic resource allocation, higher operability and flexibility can be achieved. Description of the drawings

[0032] Figure 1 It is a schematic flowchart of constructing a dynamic information framework in the present invention;

[0033] Figure 2 It is a schematic flowchart of constructing a system architecture in the present invention. Detailed implementation manners

[0034] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0035] The special term "exemplary" herein means "serving as an example, embodiment, or illustrative". Any embodiment described as "exemplary" herein need not be construed as superior to or better than other embodiments.

[0036] In addition, in order to better illustrate the present application, numerous specific details are given in the following detailed embodiments. Those skilled in the art should understand that the present application can be implemented without some specific details. In some instances, methods, means, and elements well known to those skilled in the art are not described in detail so as to highlight the gist of the present application.

[0037] The present invention provides a method for information flow and logical block interaction based on a reactive programming framework, and the method includes:

[0038] S1: Construct a dynamic information framework; Integrate multiple logical blocks into one framework to complete the dynamic flow of information and the merging of capacity;

[0039] The specific operation steps included in constructing the dynamic information framework in S1 are as follows:

[0040] S11: Data flow programming; regarding each logic block as a node, with the nodes connected by data flows to achieve dynamic data flows.

[0041] S12: Reactive programming; describing the relationship between data flows and logic blocks in a declarative manner to achieve dynamic responses between logic blocks.

[0042] Furthermore, data flow programming is a programming paradigm centered around data flow, suitable for implementing framework fluidity. Each logic block is a node, and the nodes are connected by data flows. The execution of logic blocks is triggered by data flow. For example, the output of logic block A is used as the input of logic block B; the output of logic block B is used as the input of logic block C. The direction of data flow and the relationship between logic blocks can be dynamically adjusted.

[0043] Among them, reactive programming describes the relationship between data flow and logic blocks in a declarative manner; dynamic responses between logic blocks are achieved through the "observer pattern"; for example: a change in the state of logic block A automatically triggers an update of logic block B; a change in the state of logic block B automatically triggers an update of logic block C.

[0044] S13: Dynamic dependency injection; dynamically injecting and adjusting the dependency relationships between logic blocks; furthermore, for example: at runtime, logic block A can dynamically select to depend on logic block B or logic block C. The dependency relationships can change dynamically according to needs;

[0045] S14: Capacity merging; based on shared state management, ability abstraction, and dynamic composition logic, completing the capacity merging of logic blocks.

[0046] Furthermore, the capacity merging of S13 includes:

[0047] Shared state management, including: using a global state manager to achieve state sharing between logic blocks; for example: the states of logic block A and logic block B are saved in the global state. Logic block C can read and merge these states from the global state. Among them, global state managers such as Redux, Vuex, etc. are used.

[0048] Ability abstraction, including: abstracting the ability of each logic block into a callable interface; for example: logic block A provides a "data processing" interface. Logic block B provides a "computation" interface. Logic block C can dynamically call these interfaces to achieve capacity merging.

[0049] Dynamic composition logic, including: the ability to dynamically compose logic blocks at runtime; for example: according to user input, dynamically select the combination method of logic block A and logic block B. Merge the outputs of logic block A and logic block B as the input of logic block C.

[0050] Therefore, in summary, assume there are three logical blocks:

[0051] Logical block A: Input data.

[0052] Logical block B: Process data.

[0053] Logical block C: Display results.

[0054] To achieve the dynamic flow of information between logical blocks and the merging of the capacities of logical blocks (for example, the outputs of logical blocks A and B jointly affect the display of logical block C), in the specific implementation steps: The output of logical block A is used as the input of logical block B, and the output of logical block B is used as the input of logical block C. During runtime, the direction of the data flow can be adjusted as needed (for example, the output of logical block A is directly used as the input of logical block C). In terms of capacity merging, logical block C can simultaneously read the outputs of logical blocks A and B and merge and display them.

[0055] In terms of technical implementation, this application provides specific implementation manners as the realization of the above technical solutions. Use data flow programming libraries such as RxJS, Apache Flink, etc. to implement dynamic data flows; use reactive programming libraries such as MobX, ReactiveX, etc. to implement dynamic responses between logical blocks; use dependency injection frameworks such as Inversify, Spring, etc. to implement dynamic dependency injection.

[0056] It can be seen that this method can not only integrate multiple logical blocks into one framework, but also achieve the dynamic flow of information and the mechanized merging of capacities. This kind of capacity merging abstractly defines all two-dimensional windows into three logical abstract parameters a, b, and c that can be operated. For example, for distributed hosts, in terms of mechanism, their capacities can be merged to achieve higher operability, can be operated better and more flexibly, and there is no upper limit.

[0057] The following is the idea for further implementation on different distributed hosts. S2: Construct the system architecture; Apply the constructed dynamic information framework to multiple distributed hosts, and complete the dynamic integration and sharing of the resources of multiple distributed hosts through loop parameters.

[0058] The specific operation steps for S2 to construct the system architecture include the following:

[0059] S21: Distributed resource management; Use distributed resource management technology to integrate the resources of multiple hosts into a unified shared state pool; For example: Merge the computing capabilities of multiple hosts to achieve distributed computing. Merge the storage capabilities of multiple hosts to achieve distributed storage.

[0060] S22: Loop Interaction Protocol; Design a loop interaction protocol to define the interaction rules between logical parameters. For example, computing resource (a) can preferentially interact with storage resource (b), and storage resource (b) can preferentially interact with network resource (c).

[0061] S23: Shared State Management; Implement the management of the shared state pool using shared state management techniques. For example, update the resource information in the shared state pool in real time to ensure the consistency and availability of the shared state pool.

[0062] S24: Dynamic Extension Mechanism; Design a dynamic extension mechanism to support the automatic addition of new hosts and resource integration. For example, when a new host joins, automatically register its a, b, and c parameters, and automatically integrate the resources of the new host into the shared state pool.

[0063] After the system architecture of S2 is built, the system architecture includes:

[0064] All the registration parameters of distributed hosts are used to initialize the shared state pool and contain the resource information of all hosts. Among them, all distributed hosts install the system architecture and register their a, b, and c parameters. The shared state pool is initialized and contains the resource information of all hosts.

[0065] All distributed hosts exchange parameters with each other in a loop for data resources to flow in the shared state pool. Among them, the a parameter of host A interacts with the b parameter of host B, and the c parameter of host C interacts with the a parameter of host A, and the data resources flow freely in the shared state pool.

[0066] The newly added distributed host registers its parameters, and its resources are automatically integrated into the shared state pool for dynamic consumption. Among them, the new host D joins the system, registers its a, b, and c parameters, and the resources of host D are automatically integrated into the shared state pool, and the resources of host D can be immediately used by other hosts.

[0067] All hosts obtain the storage resources and computing resources of other hosts from the shared state pool for resource sharing. Among them, host A obtains the storage resources of host B from the shared state pool, and host C obtains the computing resources of host A from the shared state pool.

[0068] The system architecture of S2 also includes:

[0069] Virtualization; Use virtualization technology to abstract multiple physical resources into virtual resources. For example, virtualize the resources of multiple hosts into a logical host, and virtualize the functions of multiple windows into a logical window.

[0070] In summary, through the loop parameters (a, b, c) and the loop interaction mechanism, the system architecture realizes the dynamic integration and sharing status of distributed host resources. This architecture can not only uniformly manage distributed resources, but also dynamically expand and "absorb" new host resources, forming a highly flexible and scalable system.

[0071] Therefore, the specific operation of applying the above dynamic information framework to the system architecture is to construct a dynamic information framework that allows information to be shared and flow between distributed hosts while maintaining their respective independence. The key lies in: information flow: the a, b, c parameters can be dynamically transmitted between hosts; capacity sharing: hosts can access and utilize the a, b, c parameters of other hosts; dynamic adjustment: the framework can dynamically adjust the relationship between hosts according to needs.

[0072] The key technologies to achieve the fluidity of the framework: regard each distributed host as a node, and the nodes are connected by data streams; the data flow triggers the interaction of the a, b, c parameters of the hosts. For example: the a parameter (computing power) of host A is used as the input of the b parameter (storage capacity) of host B; the c parameter (network capacity) of host B is used as the input of the a parameter of host C.

[0073] Use reactive programming to achieve dynamic response between hosts. For example: a change in the a parameter of host A automatically triggers an update of the b parameter of host B; a change in the c parameter of host B automatically triggers an update of the a parameter of host C.

[0074] Dynamically inject and adjust the dependency relationships between hosts. At runtime, host A can dynamically select to depend on the b parameter of host B or host C; the dependency relationships can change dynamically according to needs.

[0075] And use a global state manager such as Redis, Apache ZooKeeper, etc. to achieve state sharing between hosts. For example: the a, b, c parameters of host A and host B are saved in the global state, and host C can read and merge these parameters from the global state.

[0076] Abstract the capabilities of each host into callable interfaces. For example: host A provides a "compute" interface, host B provides a "store" interface, and host C provides a "network" interface.

[0077] Dynamically combine the capabilities of hosts at runtime. For example: according to task requirements, dynamically select the combination method of host A and host B, and merge the outputs of host A and host B as the input of host C.

[0078] After the system accesses the dynamic information framework, all distributed hosts install the system architecture, register their a, b, c parameters, and initialize the shared state pool, which contains the resource information of all hosts.

[0079] Define the interaction rules among parameters a, b, and c. For example: Computational resources (a) interact with storage resources (b) preferentially, and storage resources (b) interact with network resources (c) preferentially.

[0080] Use data flow programming libraries such as RxJS, Apache Flink, etc. to implement dynamic data flows between hosts. For example: The output of parameter a of host A is used as the input of parameter b of host B, and the output of parameter c of host B is used as the input of parameter a of host C.

[0081] Use shared state management technologies such as Redis, Apache ZooKeeper, etc. to implement the management of the shared state pool. For example: Update the resource information in the shared state pool in real time to ensure the consistency and availability of the shared state pool.

[0082] Design a dynamic expansion mechanism to support the automatic addition of new hosts and resource integration. For example: When a new host D joins the system, its parameters a, b, and c are automatically registered, and the resources of host D are automatically integrated into the shared state pool.

[0083] Use dynamic resource allocation algorithms such as load balancing, resource scheduling, etc. to achieve flexible resource allocation. For example: Dynamically allocate computational resources according to task requirements and dynamically adjust the functions of hosts according to user operations.

[0084] Conduct a comprehensive test on the system to ensure the normal operation of the flow cycle interaction and capacity merging functions between hosts, and optimize the system performance and stability according to the test results.

[0085] Therefore, in summary, assume there are three distributed hosts;

[0086] Host A: Has powerful computing capabilities (parameter a);

[0087] Host B: Has powerful storage capabilities (parameter b);

[0088] Host C: Has powerful network capabilities (parameter c);

[0089] Hosts A, B, and C register their parameters a, b, and c, and the shared state pool is initialized; The a parameter of host A interacts with the b parameter of host B, and the c parameter of host B interacts with the a parameter of host C; Host C reads the parameters of hosts A and B from the shared state pool and combines and displays them; A new host D joins the system and registers its parameters a, b, and c; The resources of host D are automatically integrated into the shared state pool.

[0090] Finally, through the abstraction of parameters (a, b, c), the flow cycle interaction and capacity consolidation of distributed host resources are realized. Currently, existing technologies and tools can already support the implementation of this architecture. Therefore, this interaction method can uniformly manage distributed resources, and can also realize the dynamic integration and sharing of resources, with high flexibility and scalability.

[0091] In information encoding and distributed storage, erasure coding slices data and encodes it into redundant blocks, enabling data recovery even if some nodes go offline; vectorized resource description models the computing, storage, and network capabilities of nodes as high-dimensional vectors, which are reduced to low-dimensional representations after going offline and reconstructed through linear algebra methods.

[0092] Example 1: To verify the feasibility of the above technical solution, each feature is further elaborated. In parametric resource abstraction, Kubernetes CRDs are adopted, and the a / b / c parameters are encapsulated as K8s objects through custom resource definitions (CRD). At the hardware abstraction layer, the Multi-Instance GPU (MIG) technology has proven the feasibility of fine-grained resource partitioning.

[0093] Furthermore, in terms of dynamic coordination and scheduling, Flink's dynamic data stream is adopted, and the elastic scaling of Apache Flink supports dynamic adjustment of task parallelism; in reinforcement learning scheduling, the Swart system has optimized data center resource allocation using reinforcement learning; in shared state management, Redis multi-model support is adopted, and Redis supports stream, graph, and time-series data, which can uniformly store the a / b / c parameters; in sharded consensus, the Paxos sharding protocol of TiDB has achieved large-scale strong consistency; in the dynamic expansion and consumption mechanism, the Consul service mesh is adopted, and the automatic service registration and health check of Consul support the dynamic addition of nodes; in zero-trust expansion, the SPIFFE / SPIRE standard supports the secure authentication of new nodes.

[0094] Furthermore, in this example, specific solutions for how to handle resource offline are provided. The distributed system stores data through multiple replicas to ensure that data can still be accessed when some nodes go offline; the system regularly saves the task state (such as the persistent storage of Kubernetes), and the node can continue to run from the checkpoint after recovery; VMware vMotion allows migrating a running virtual machine from one physical host to another to reduce the impact of downtime; Docker or Podman can save the container state through snapshots and restore it on other nodes.

[0095] In the above, through mathematical modeling and supercomputing, the system remaps the information of offline resources to the available resource pool, achieving logical "resource regeneration". Assuming that the information of resources still exists in some form after the node goes offline (similar to the law of conservation of energy in thermodynamics), it can be reactivated through abstraction means;

[0096] In virtual resource pooling, cloud computing platforms (such as AWS, Azure) abstract physical resources into virtual resource pools. Even if some nodes go offline, users can still access the remaining resources in the pool; on the distributed ledger, blockchain technology (such as IPFS) ensures redundant storage of data across the network, and node offline does not affect data availability.

[0097] Embodiment 3. To achieve hardware independence and underlying binary adaptability, while optimizing the dynamic allocation of distributed nodes, it is necessary to construct an abstract framework that crosses instruction sets and hardware. Its core idea is to unify heterogeneous hardware into schedulable logical units through hierarchical abstraction and adaptive intermediate representation. The following is the design of the hierarchical underlying framework:

[0098] Task scheduling and optimization layer - dynamic allocation based on a / b / c parameters;

[0099] Hardware Abstraction Virtual Machine (HAVM) - intermediate representation layer, isolating hardware differences;

[0100] Binary adaptation layer - hardware instruction set translation and optimization;

[0101] Physical hardware layer - x86 / ARM / GPU / FPGA, etc.

[0102] Among them, the binary adaptation layer translates different hardware instruction sets (x86 / ARM / RISC-V) into a unified intermediate representation (IR). The key technology lies in, such as QEMU, performing dynamic binary translation (DBT) by real-time converting the instruction set; identifying CPU instruction extensions (such as AVX-512), GPU architectures (such as CUDA / OpenCL), etc. to complete hardware feature extraction; and outputting through hardware-independent intermediate representation (HAVM-IR);

[0103] Among them, the Hardware Abstraction Virtual Machine (HAVM) provides a unified virtual hardware interface, shielding physical hardware differences, specifically including: Virtual Computing Unit (vCU): abstracting the computing power of CPU / GPU / FPGA as parameter a. Virtual Storage Unit (vSU): abstracting the storage capabilities of memory / disk / SSD as parameter b. Virtual Network Unit (vNU): abstracting network bandwidth / latency as parameter c.

[0104] Among them, dynamic optimization includes Just-In-Time (JIT) compilation optimization: dynamically generating efficient native code according to hardware characteristics. Hardware-accelerated routing: automatically selecting the optimal hardware execution unit (such as GPU matrix operations).

[0105] The function of the task scheduling and optimization layer is to achieve dynamic resource allocation based on the a / b / c parameters provided by HAVM.

[0106] Next, this application further discloses the relevant core algorithm, the Heterogeneous Hardware Scheduler (HHS):

[0107] def schedule(task,nodes):

[0108] #1. Parse the a / b / c requirements of the task

[0109] demand = task.get_demand_vector()

[0110] #2. Filter nodes that meet the conditions

[0111] candidates = [node for node in nodes if node.can_meet(demand)]

[0112] #3. Dynamically score based on hardware affinity (such as GPU type) and load

[0113] scores = {node:calculate_score(node,demand)for node in candidates}

[0114] #4. Select the optimal node combination

[0115] return select_top_k(scores,k = task.replicas)

[0116] In the Reinforcement Learning Optimizer (RLO), the state space: node a / b / c parameters + task queue.

[0117] The action space: resource allocation strategy.

[0118] The reward function: task completion time + resource utilization rate.

[0119] In terms of the implementation details of hardware independence, its instruction set is unified, and the input is any binary executable file (ELF / PE / Mach-O). Its translation process is x86 Binary→HAVM-IR→ARM Binary. The x86 Binary is dynamically translated. In terms of the optimization strategy for the implementation details of hardware independence, this application provides multiple optimization directions: Hot code caching: Cache the translation results of high-frequency executed code blocks. SIMD instruction mapping: Map AVX-512 instructions to equivalent NEON / RVV operations. Heterogeneous hardware resource pooling: Uniformly describe computing tasks (such as matrix multiplication, encryption operations) in the Compute Kernel Description Language (CKDL) in the unified interface of GPU / FPGA. Automatic backend selection: Select CUDA / OpenCL / Vulkan according to hardware support.

[0120] Distributed virtual file system (DVFS) in storage resource virtualization: Abstract heterogeneous storage (NVMe / HDD / SCM) into a unified namespace. Adaptive power management in the power-performance model: Dynamically adjust the frequency according to the hardware type (such as ARM low-power core vs. Xeon high-performance core). Green scheduling algorithm: Prioritize task allocation to nodes with high energy efficiency ratio (such as computing power per watt).

[0121] In the case of dynamic optimization, the application scenario is a cross-architecture AI inference task (ARM edge node + x86 cloud server + GPU workstation); specifically including task submission: The user submits an ONNX model inference task, and the requirement vector is a = 90% (GPU computing power), b = 5% (model loading), c = 5% (low latency); Binary adaptation layer: Dynamically compile ONNX Runtime into: ARMv8 instruction set (edge node), x86-64 instruction set (cloud server), CUDA kernel (GPU workstation); HAVM resource abstraction: Edge node: a = 20 TOPS (NPU computing power), b = 8GB memory, c = 10ms latency; Cloud server: a = 5 TFLOPS (CPU), b = 64GB memory, c = 50ms latency; GPU workstation: a = 100 TFLOPS (GPU), b = 32GB video memory, c = 20ms latency. Scheduler decision: Select the GPU workstation to execute the main inference task (the a parameter is optimal); Use the edge node for preprocessing (low latency c parameter); The cloud server is used as a disaster recovery backup (high b parameter to store the model). Dynamic optimization: Monitor and find that the GPU temperature is too high, and automatically migrate some tasks to the cloud server; Adjust the data sharding ratio between the edge node and the cloud server according to the real-time network condition.

[0122] In terms of technical challenges and breakthrough points, this application provides multiple aspects. Challenge 1: Instruction set translation overhead; Breakthrough: Hardware-assisted virtualization (such as Intel VT-x, ARM SMMU) accelerates binary translation. Challenge 2: Cross-vendor GPU compatibility; Breakthrough: Open-source computing intermediate representation (such as MLIR), and vendors provide backend adaptation. Challenge 3: Real-time guarantee. Breakthrough: Deterministic scheduling algorithm + Time-Sensitive Network (TSN).

[0123] In the summary of framework advantages, in terms of full hardware compatibility, it seamlessly integrates from embedded ARM to supercomputer GPU; in terms of performance-lossless abstraction, through JIT compilation and hardware-accelerated routing, it approaches native performance; in terms of autonomous optimization, based on dynamic policies of reinforcement learning, it continuously improves resource utilization; in terms of decentralized expansion, new nodes are plug-and-play and automatically integrate into the resource pool. In terms of future evolution, in the quantum-classical hybrid abstraction, the quantum instruction set extension includes introducing quantum opcodes (such as QAdd, QMeasure) in HAVM-IR; classical-quantum hybrid tasks are automatically assigned to corresponding hardware (such as IBM quantum computer + GPU cluster); in the photon computing mapping, the photon processor is abstracted as an ultra-low-latency c-parameter node. Therefore, in summary, through the deep combination of the Binary Adaptation Layer (BAL) and the Hardware Abstraction Virtual Machine (HAVM), this application can build a truly hardware-independent distributed scheduling framework. In its core, the dual abstraction from instruction set to resources not only hides hardware differences but also provides a parameterized scheduling interface; in dynamic compilation and adaptive optimization, the end-to-end automation from binary to resource allocation. This framework not only solves the problem of heterogeneous hardware integration but also provides underlying support for the future global computing power network; with the rise of quantum computing and new hardware, its hierarchical design will show stronger scalability and vitality.

[0124] Example 4, for the technical solution disclosed in this application, a further description is made in terms of the potential form of the global intelligent brain cloud; first, resource integration is completed, and the computing, storage, and network resources of billions of devices globally are integrated into a logical whole; second, task allocation is completed. After the user submits a task, the system automatically decomposes the task and allocates it to the optimal node for execution; finally, after the task is completed, the result is returned to the user through a decentralized network; in the resource trading market, individuals or enterprises can contribute idle resources (such as computers idle at night, unused bandwidth) and obtain benefits; users can purchase resources on demand; blockchain technology is used to achieve the transparency and credibility of resource transactions. In terms of global agents, the global intelligent brain cloud provides nearly unlimited computing power for AI, supports the training and deployment of ultra-large-scale models, and through the integration of global data and computing power, realizes real-time decision-making (such as global climate simulation, financial market prediction).

[0125] The specific presentation is as shown in the following table:

[0126]

[0127]

[0128] The following is a specific example:

[0129] In task submission: The user submits an AI training task;

[0130] In task decomposition: The system decomposes the task into requirements for parameters a / b / c (e.g., a = 70%, b = 20%, c = 10%);

[0131] In resource matching:

[0132] Select the node N1 with strong computing power (excellent in parameter a) to be responsible for training. Select the node N2 with strong storage capacity (excellent in parameter b) to provide data. Select the node N3 with strong network capacity (excellent in parameter c) to handle transmission.

[0133] In task execution: N2 transmits the data to N1 through N3. After N1 completes the training, the result is returned to the user through N3. In resource settlement: The user pays the fee, and the resource providers (N1 / N2 / N3) obtain the benefits.

[0134] The potential impact of the Global Intelligence Brain Cloud is that anyone (whether an individual or an enterprise) can access supercomputing power, idle resources globally are fully utilized, energy waste is reduced, and efficient resource utilization is achieved; and a new economic form (such as "computing power mining") is spawned in the resource trading market to realize a new business model; through the sharing economy model, the computing cost is significantly reduced to achieve cost reduction;

[0135] Example 5. Therefore, in specific practice, to establish a connection model between windows and logical blocks, there are countless windows, and then a one-dimensional line, horizontally or vertically connecting all the windows, which realizes the technology of one-dimensional connection of planar windows or logical blocks. The following specifically discloses the implemented technical solution:

[0136] In actual applications, it is necessary to consider the size, shape, position of the window and the specific rules of extension. For example, if the sizes of the windows are different, the size needs to be adjusted during extension to maintain consistency; if the positions of the windows are scattered, the connection order and method need to be determined during extension.

[0137] To sum up, if the windows in the plane have one-dimensional continuity, and this continuity is uniformly applied to all windows, then it is indeed possible to connect all windows through this continuity. This not only improves the integrity and consistency of the window system, but also provides a more convenient and efficient operation experience for users.

[0138] Therefore, the one-dimensional continuity of the window is analogous to the engulfing mechanism of distributed hosts, which is essentially the integration of discrete individuals into a unified whole through some logical rules (such as spatial continuity or parameterized coordination).

[0139] Therefore, in conceptual similarity, discrete windows are connected into continuous interfaces through horizontal / vertical extension; discrete hosts are abstracted into a unified resource pool through parametric integration; and dispersed entities are reorganized into a higher-level whole through rules (spatial or logical).

[0140] The key differences are: window one-dimensionalization is achieved based on spatial continuity (physical or logical extension); host engulfment is achieved based on functional parameterization (a / b / c capability abstraction); window one-dimensionalization is achieved by improving user operation efficiency (such as multi-task management); and host engulfment is achieved by maximizing resource utilization (such as computing power sharing).

[0141] In summary, to improve the one-dimensional window mechanism to the same technical depth as distributed host swallowing, it is necessary to optimize in the following directions: Traditional window management: The window position is fixed and relies on manual arrangement by the user.

[0142] Optimization goals: Automatic topology generation: automatically arrange window sequences based on task relationships; dynamic scaling: dynamically adjust window length based on content importance;

[0143] In terms of technical implementation, the graph neural network (GNN) analyzes the relevance of window content to generate the optimal topology and adaptive scaling rules similar to CSS Flexbox on the elastic layout engine.

[0144] In the smart connection protocol, the traditional method is to manually transfer data between windows using the clipboard or drag-and-drop. The optimization goal is to automatically establish data flows based on content semantics in semantic connections (e.g., automatically generating visualizations from a text window to a chart window). In terms of contextual awareness, connection needs are predicted based on user operation history. Technically, window content semantics are analyzed and connections are automatically triggered through a publish-subscribe model.

[0145] In terms of centralized collaboration, windows in traditional methods are limited to local devices. Its optimization goals include cross-device unidimensionality: integrating windows from different devices into a continuous interface (such as mobile phone + tablet + PC); distributed rendering: complex windows are rendered collaboratively by multiple devices.

[0146] In terms of technical implementation, WebRTC realizes real-time communication across devices; edge computing enables distributed rendering task scheduling.

[0147] In terms of self-healing and fault tolerance, in the traditional method, window crashes require manual restart; in the optimization goal, the window status is regularly saved in the state snapshot and automatically restored after a crash; in the redundant window, the key window automatically generates a backup node.

[0148] In terms of technical implementation, CRDT (Conflict-free Replicated Data Type) realizes distributed state synchronization; the microservices architecture modularizes window functions, and partial failures do not affect the whole.

[0149] Next, the present application further proposes to integrate with the mechanism of distributed host consumption. First, the window is abstracted into parameters:

[0150] a: Content processing capabilities (such as text editing, image rendering).

[0151] b: Data storage capabilities (such as cache size, history).

[0152] c: Interaction bandwidth (such as response speed, number of concurrent multitasks).

[0153] Secondly, dynamically consume the a / b / c parameters of other windows according to task requirements.

[0154] Then, perform cross-dimensional collaboration. In the spatial-logical mapping, the one-dimensional position of the window is mapped to the parameter weights of the distributed host; for example: the left window is preferentially allocated high computing power (a parameter). In dynamic resource scheduling, the rendering task of the window is automatically allocated to the idle GPU of the distributed host.

[0155] For example, the user creates tasks: open a text editor (window A), a chart tool (window B), and a data source (window C). The system automatically integrates: according to content relevance, arranges A→B→C into a one-dimensional sequence. The text analysis task of window A is allocated to the a-parameter node of the host cluster. The chart rendering task of window B is allocated to the b-parameter node of the host cluster. Cross-device collaboration: Window D (data collection) on the user's mobile phone is automatically connected to the sequence to expand the one-dimensional interface. Self-healing mechanism: If the a-parameter node of the host fails, the task is automatically migrated to other nodes, and the window interface switches seamlessly.

[0156] Then, in summary, the technical challenges and breakthrough points disclosed in the present application are as follows: the accuracy of semantic understanding: automatic association of window content requires a high-precision NLP model. Real-time requirements: cross-device window collaboration requires sub-second latency. Privacy and security: cross-device data streams require end-to-end encryption.

[0157] Regarding the above-mentioned problems, in terms of breakthrough directions, the present application provides multiple ideas: few-shot learning: reducing the dependence of the semantic model on labeled data. 5G / 6G networks: providing low-latency and high-bandwidth communication guarantees. Homomorphic encryption: realizing collaborative processing of data in an encrypted state.

[0158] Therefore, when the information flow and logic block interaction method based on the reactive programming framework is applied to the system, the user interface is no longer limited by the screen boundary, but dynamically expands through one-dimensional / multi-dimensional rules. The computing resources are deeply bound to the interface elements, forming a "what you see is what you get" computing power allocation. Mind-driven: directly operate the one-dimensional window stream through the brain-computer interface. AR / VR integration: project the window sequence into the three-dimensional space to achieve immersive interaction.

[0159] Therefore, through the analogy between the one-dimensional window and the distributed host consumption, this application reveals a universal law: discrete entities can be upgraded to continuous agents through regularized integration. The optimization directions include dynamic topology, intelligent connection, cross-device collaboration, and self-healing fault tolerance. This mechanism is not only applicable to interface design, but also provides the underlying logic for the future integration of the human-machine environment. Its influence may exceed the existing technical paradigm and become the cornerstone of the next-generation computing platform; use a set-up abstract framework, such as architectural rules, to automatically allocate and adapt to each distributed node, distribute the adaptive framework for each node, such as different hardware has different frameworks, design the underlying logic framework, and adapt to all machine framework systems based on the underlying binary. Focus on optimizing each distributed host from the machine to the node.

[0160] Embodiment 6: To ensure the security and persistence of data during the distributed resource integration ("consumption") process, a multi-level redundancy and fault tolerance mechanism needs to be designed. Even if some nodes delete data, the integrity of the data can still be guaranteed through distributed replicas, coding techniques, and consistency protocols.

[0161] The following is the specific solution of this embodiment:

[0162] In the direction of data redundancy strategy, through multi-copy storage and erasure coding, when consuming nodes, automatically copy the data to multiple independent nodes (at least 3 copies), and divide the data into blocks and encode them into redundant data blocks, allowing recovery after some blocks are lost. Among them, multi-copy storage is implemented in two aspects: dynamic copy allocation and copy lifecycle management. According to the node's geographical location, load, and hardware type, intelligently select the copy storage node, regularly check the health status of the copy, and automatically replace the failed copy. Among them, erasure coding is implemented in the coding algorithm and dynamic coding, and adjusts the redundancy level according to Reed-Solomon, LRC (Locally Repairable Codes), and according to the importance of the data (high redundancy for critical data, low redundancy for cold data).

[0163] In data life cycle management, data migration and deduplication, version control and snapshots are used to migrate data to other nodes when a node is swallowed instead of retaining it on the original node, and to create data snapshots regularly to retain historical versions. Data migration and deduplication include proactive migration and decentralized indexing. Decentralized indexing records the data location through a distributed hash table (DHT) to ensure that the replica can still be located after the original node is deleted. Version control and snapshots are implemented by distributed snapshots and incremental snapshots. Distributed snapshots such as the atomic snapshots of ZFS and the RBD snapshots of Ceph. Incremental snapshots only store the changed parts to reduce storage overhead.

[0164] In terms of consistency protocols and fault tolerance, strong consistency protocols and Byzantine fault tolerance are used to ensure the strong consistency of all replicas and allow some nodes to maliciously delete or tamper with data, and still be able to recover through the majority of honest nodes. Among them, strong consistency protocols ensure the strong consistency of all replicas through protocols such as Paxos and Raft, which are specifically implemented by deletion arbitration and tombstone marking. Deletion arbitration: The deletion operation needs to obtain the confirmation of at least half of the replica nodes. Tombstone marking: A logical mark is retained after data deletion to delay physical deletion for fault tolerance. Byzantine fault tolerance is implemented by the BFT protocol and data hash verification. BFT protocol: Such as PBFT and Tendermint. Data hash verification is specifically to regularly verify the data hash and trigger the recovery process after detecting tampering.

[0165] In terms of security and permission control, security and permission control are completed through encryption and access control, anti-tampering and auditing. Encryption and access control are specifically end-to-end encryption and role-based access control (RBAC). Among them, end-to-end encryption: Data is encrypted during both transmission and storage (such as AES-256), and the key is controlled by the user. Among them, role-based access control (RBAC): Restrict the deletion permission and only allow authorized operations. Anti-tampering and auditing are implemented by blockchain evidence storage and operation logs. Among them, blockchain evidence storage: Write the data hash into the blockchain to ensure that the deletion operation is traceable. Operation logs: Record all data operations (create, delete, update, query) to support post-event auditing.

[0166] In the fault tolerance design of supercomputers, the resources of swallowed nodes are completely abstracted through dynamic resource pooling and self-healing systems, and data does not depend on a single physical node. Specifically: Decouple the data logical address from the physical storage and when a node goes offline, the data is automatically migrated to other nodes. In the self-healing system, monitor the node status in real time, trigger recovery when data loss is detected, and automatically reconstruct the data using redundant replicas or erasure codes.

[0167] The fault tolerance process for the data deletion scenario is specifically as follows: User A deletes the file / data / file1 on the local node. The system checks the distribution of redundant copies of this file (for example, there are 3 copies: nodes N1, N2, and N3), sends deletion requests to N1, N2, and N3, and requires at least 2 nodes to confirm (Raft protocol). Nodes N1 and N2 confirm the deletion, mark the file as "logically deleted", and retain the metadata. Node N3 is offline and does not respond, so the file copy is retained.

[0168] In terms of replica repair, the system detects that N3 is offline and replicates the data from the replicas of N1 or N2 to the new node N4. In terms of eventual consistency, after N3 recovers, it synchronizes the deletion operation according to the status of the majority of replicas.

[0169] To sum up, in this embodiment, through multi - replica storage, erasure coding, strong consistency protocol, encryption control, and self - healing mechanism, even if some nodes delete data, the supercomputer can still ensure data security; the data does not rely on a single node: high availability is achieved through distributed redundant storage; logical and physical separation: after resource consumption, the data is managed by the global system rather than being bound to the original node; dynamic repair ability: real - time monitoring and automatic recovery mechanism ensure data persistence. This design not only conforms to the mature practices of existing distributed systems (such as HDFS, Ceph), but also adapts to the requirements of resource dynamic integration scenarios through more intelligent scheduling and more rigorous fault tolerance protocols.

[0170] In specific implementation, this application provides a computer storage medium and a corresponding data processing unit. Among them, the computer storage medium can store a computer program. When the computer program is executed by the data processing unit, it can run the content of the invention of a method for information flow and logic block interaction based on a reactive programming framework and some or all of the steps in each embodiment. The storage medium can be a magnetic disk, an optical disk, a read - only memory (ROM), or a random access memory (RAM), etc.

[0171] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of a computer program and its corresponding general - purpose hardware platform. Based on such an understanding, the essence of the technical solutions in the embodiments of the present invention, or the part that contributes to the prior art, can be embodied in the form of a computer program, that is, a software product. This computer program software product can be stored in a storage medium and includes several instructions for causing a device (which can be a personal computer, a server, a single - chip microcomputer, an MCU, or a network device, etc.) containing a data processing unit to execute the methods described in each embodiment or some parts of the embodiments of the present invention.

[0172] The present invention provides a method for information flow and logical block interaction based on a reactive programming framework. There are many methods and ways to specifically implement this technical solution. The above description is only a preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention. Each component not clearly defined in this embodiment can be implemented by using the prior art.

Claims

1. A method for information flow and logic block interaction based on a reactive programming framework, characterized in that The method includes the following specific steps: Construct a dynamic information framework; integrate multiple logical blocks into one framework to complete the dynamic flow of information and the merging of capacities. Construct a system architecture; apply the constructed dynamic information framework to multiple distributed hosts, and complete the dynamic integration and sharing of resources of multiple distributed hosts through loop parameters.

2. The information flow and logic block interaction method based on a reactive programming framework according to claim 1, characterized in that The S1 constructing the dynamic information framework further includes the following specific operation steps: Data flow programming; Take each logical block as a node, and connect the nodes with data flows to achieve a dynamic data flow. Reactive programming; describe the relationship between data flow and logical blocks in a declarative way to achieve dynamic response between logical blocks. Dynamic dependency injection; dynamically inject and adjust the dependency relationship between logical blocks. Capacity merging; Based on shared state management, ability abstraction, and dynamic composition logic, complete the capacity merging of logical blocks.

3. The information flow and logic block interaction method based on a reactive programming framework according to claim 2, wherein The capacity merging includes: Shared state management, including: using a global state manager to achieve state sharing between logical blocks. Ability abstraction, including: abstract the ability of each logical block into a callable interface. Dynamic composition logic, including: dynamically compose the abilities of logical blocks at runtime.

4. A method for information flow and logic block interaction based on a reactive programming framework according to claim 1, characterized in that, The constructing the system architecture specifically includes the following operation steps: Distributed resource management; use distributed resource management technology to integrate the resources of multiple hosts into a unified shared state pool. Loop interaction protocol; Design a loop interaction protocol to define the interaction rules between logical parameters. Shared state management; use shared state management technology to manage the shared state pool. Dynamic expansion mechanism; design a dynamic expansion mechanism to support the automatic joining of new hosts and resource integration.

5. The information flow and logic block interaction method based on a reactive programming framework according to claim 1, characterized in that After the constructing the system architecture is completed, its system architecture includes: All distributed host registration parameters, used to initialize the shared state pool and contain the resource information of all hosts. All distributed hosts exchange parameters with each other in a loop, used for the flow of data resources in the shared state pool. Newly added distributed host registration parameters, and its resources are automatically integrated into the shared state pool for dynamic consumption. All hosts obtain the storage resources and computing resources of other hosts from the shared state pool for resource sharing.

6. The information flow and logic block interaction method based on a reactive programming framework according to claim 5, wherein The constructing the system architecture also includes: Virtualization; use virtualization technology to abstract multiple physical resources into virtual resources.