An interactive resource scheduling and optimization system for blackboards
By constructing a demand density distribution field and a resource capacity potential field, and using partial differential equations and energy functionals to optimize resource scheduling, the problem of resource allocation being disconnected from demand in smart blackboards is solved, achieving efficient resource utilization and smooth interactive operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANGFANG NORMAL UNIV
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-03
AI Technical Summary
Existing intelligent blackboard resource scheduling methods cannot characterize the spatial continuity and nonlinear interaction of tasks, resulting in a disconnect between resource allocation and actual needs, making adaptive optimization difficult and resource utilization efficiency low.
By constructing a continuous demand density distribution field and resource capacity potential field, and using partial differential equations and energy functionals for optimization, continuous control quantities are generated and converted into hardware control instructions to achieve dynamic matching and scheduling of resources.
It improves resource utilization efficiency and energy efficiency ratio, shortens scheduling delay, avoids interaction lag, and enhances the smoothness of smart blackboard operation.
Smart Images

Figure CN122332041A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent blackboard resource scheduling, and discloses an interactive resource scheduling and optimization system for blackboards. Background Technology
[0002] With the increasing prevalence of smart blackboards in teaching, the integrated multimodal interaction methods, including touch, handwriting, voice, and gesture, place high demands on the real-time and efficient scheduling of underlying computing resources. Existing resource scheduling methods mostly follow the general strategies of traditional computing systems, abstracting interactive tasks and physical computing resources into discrete processes and device nodes for matching. This approach has many shortcomings, such as the inability to characterize the spatial continuity of tasks: discrete mapping models ignore the natural continuous distribution characteristics of handwriting trajectories and gesture areas on the two-dimensional plane of the blackboard and their spatial diffusion effects, leading to a disconnect between resource allocation and actual physical needs; difficulty in describing the nonlinear interaction between task demand and resource supply over time, resulting in insufficient ability to describe system state evolution; and scheduling based on fixed rules or simple priorities cannot adaptively and uniformly optimize according to the global spatial topological relationship between the demand density distribution field and the resource capacity potential field, easily getting trapped in local optima, resulting in low resource utilization efficiency and energy efficiency ratio. Summary of the Invention
[0003] The purpose of this section is to outline some aspects of the embodiments of this application and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents, and such simplifications or omissions should not be construed as limiting the scope of this application.
[0004] To address the aforementioned technical problems, this application provides an interactive resource scheduling and optimization system for blackboards.
[0005] On the one hand, this application provides an interactive resource scheduling and optimization system for a blackboard, including: The field mapping unit extracts discrete interaction events from the multimodal sensing data stream of the blackboard and converts the interaction events into a continuous demand density distribution field and resource capability potential field on the two-dimensional plane of the blackboard. The field solution unit receives the demand density distribution field and the resource capability potential field, and solves the system of partial differential equations that includes the demand diffusion and decay equation, the resource capability potential field Poisson equation, and the nonlinear coupling reaction term of demand and resources to obtain the current state of the demand density distribution field and the resource capability potential field. The topology unit receives the current state of the demand density distribution field and the resource capability potential field, and solves for the optimized resource density distribution and the matching resource region topology by minimizing the energy functional. The control unit is used to receive the optimized resource density distribution and the current demand density distribution field, and generate continuous control quantities for resource scheduling; The instruction unit discretely samples and quantizes the continuous control quantities to generate a sequence of underlying hardware control instructions and issues them for execution.
[0006] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The discrete interactive events include touch point sequences, handwriting trajectories, voice command segments, or gesture image frames; Interactive events are parsed into position coordinates and demand characteristics on a two-dimensional blackboard plane, and the position coordinates and demand characteristics are converted into a continuous demand density distribution field; Obtain the layout and status of the blackboard physical computing resources, and construct the resource capability potential field; The demand density distribution field is used to represent the intensity of task demand at different points in space at different times. The resource capability potential field is used to represent the computational resource supply capability of each point in space.
[0007] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The method for constructing the demand density distribution field includes: establishing a coordinate system for a two-dimensional blackboard plane; determining a bandwidth parameter that characterizes the degree of density smoothness; for each point on the plane, calculating the sum of the density contributions of all event location coordinates to the current point, and obtaining the demand density value of the current point; traversing all points on the plane to form a continuous scalar field characterizing the distribution of task demand intensity, i.e., the demand density distribution field. The resource capability potential field construction method includes: acquiring the hardware layout and real-time performance status of physical computing resources in the blackboard; assigning a scalar value representing the resource supply capacity near each point on the plane according to the hardware layout and the performance status; and constructing a continuous resource capability potential field in space corresponding to the demand density distribution field.
[0008] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The method for constructing the system of partial differential equations includes: The demand diffusion and decay equation is used to describe the spatial diffusion and time decay characteristics of task demands on the blackboard plane. The Poisson equation for the resource capability potential field is used to calculate the resource capability potential field based on the density distribution of resources in physical calculations. The nonlinear coupling reaction term of demand and resources is embedded in the demand diffusion and decay equation and the resource capacity potential field Poisson equation in a product form to express the feedback effect of high task demand on resource consumption.
[0009] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The blackboard two-dimensional plane is discretized into a uniform computational grid. The continuous demand density distribution field and resource capability potential field are sampled respectively, and the discrete values of demand density and resource capability potential field are obtained at the grid nodes respectively. At each computation time step, based on the partial differential equations, the demand density and resource capability potential field at each grid node at the current time are used to calculate the demand density update and resource capability potential field update at each grid node at the next time step. By iteratively advancing multiple time steps until the absolute values of the demand density update and the resource capability potential field update are less than the preset convergence thresholds, the discrete values of demand density and resource capability potential field on each grid node are output.
[0010] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The final discrete values of demand density and resource capability potential field output by the field solving unit at each grid node constitute the current state of the demand density distribution field and the resource capability potential field. The current state is used to characterize the instantaneous stable field distribution state reached by the blackboard system after diffusion, attenuation, resource constraints and nonlinear coupling effects as defined by the partial differential equation system.
[0011] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The current states of the demand density distribution field and the resource capability potential field construct the energy functional, which includes the first term and the second term; The first term is used as an integral measure of the matching error between the demand density distribution field and the candidate resource density distribution function, such that the first term is minimized when the resource distribution is more spatially matched with the task demand. The second term is used as a geometric measure of the total length or curvature of the boundary of the candidate resource region's topology, such that the value of the second term is minimized when the shape boundary of the resource region is smooth. The overall value of the energy functional is formed by the weighted sum of the first and second terms. When the minimum value of the energy functional satisfies the resource constraints, the optimal balance between task requirement coverage and topological simplicity is achieved.
[0012] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The topological unit starts with a preset initial resource density distribution and initial topological structure, and uses variational optimization to calculate the gradient of the energy functional with respect to the resource density distribution function and the shape of the resource region boundary, and updates the resource density distribution function and adjusts the resource region boundary in the direction that makes the energy functional value decrease. The update process is repeated until the decrease in the energy functional or the update magnitude of the resource density distribution and topology is less than a preset convergence threshold. When the iteration terminates, the resource density distribution function at this time is output as the optimized resource density distribution; at the same time, the stable boundary shape and connection relationship at this time are output as the matched resource region topology.
[0013] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The method for calculating the gradient of the energy functional with respect to the resource density distribution function and the shape of the resource region boundary, and updating it in the direction that decreases the energy functional value, is as follows: In each iteration, for the current resource density distribution function and the resource region boundary, the variational principle is used to calculate the first variation of the energy functional with respect to the resource density distribution function, and the boundary gradient with respect to the shape of the resource region boundary; The first variational density gradient field is used to represent the effect of increasing or decreasing the unit resource density at each point on the blackboard plane on the energy functional value. The boundary gradient indicates the rate of change of the energy functional value as each point on the boundary moves along the normal direction. The resource density distribution function is updated by subtracting the update amount determined by the product of the preset step size and the density gradient field from the current resource density distribution function value, and by projecting the result to the feasible solution space that satisfies the total resource constraint after each update step. The points on the boundary of the resource region are moved along the normal direction. The moving distance is determined by the product of the preset step size and the boundary gradient. The moving direction is consistent with the direction that makes the energy functional value decrease, thereby updating the shape of the boundary of the resource region.
[0014] As a preferred embodiment of the interactive resource scheduling and optimization system for a blackboard according to this application, wherein: The continuous control quantity is sampled on the spatial coordinates of the corresponding physical computing resource node to obtain the discrete control value of each physical computing resource node. The discrete control values are quantized and encoded according to a preset hardware instruction format; The encoded discrete control values are assembled into a sequence of underlying hardware control instructions according to the execution timing. The instruction sequence is sent to the kernel scheduler and hardware driver of the smart blackboard operating system.
[0015] The beneficial effects of this application are as follows: This application constructs a continuous demand density distribution field through field mapping units, overcoming the shortcomings of discrete models in characterizing the continuity of task space and diffusion effects, enabling the scheduling system to understand and respond to the real physical distribution of tasks.
[0016] This application, by setting the partial differential equation model adopted by the field solution unit, can characterize the nonlinear coupling and dynamic balance process between tasks and resources, enabling the system to have state evolution description and short-term prediction capabilities. The topology unit, by minimizing the comprehensive energy functional, simultaneously optimizes the resource density distribution and resource region topology, solving the problems of rigid simple rule scheduling and easy getting trapped in local optimization in traditional technologies, and improving the overall efficiency and energy efficiency ratio of resource utilization.
[0017] This application establishes an efficient conversion mechanism between the continuous control quantities generated by the control unit and the instruction unit, enabling optimization decisions to be quickly executed as hardware actions. This reduces scheduling delays, avoids interaction lag, and improves the responsiveness and smoothness of the smart blackboard operation. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained through these drawings without creative effort. Wherein: Figure 1 A system flowchart of an interactive resource scheduling and optimization system for a blackboard provided in this application; Figure 2 A flowchart of field mapping and field solving for an interactive resource scheduling and optimization system for a blackboard provided in this application; Figure 3 A topology optimization flowchart for an interactive resource scheduling and optimization system for blackboards provided in this application; Figure 4 This application provides a flowchart of the control and instruction generation process for an interactive resource scheduling and optimization system for a blackboard. Figure 5 This application provides a GPU resource usage monitoring system for an interactive resource scheduling and optimization system for a blackboard. Detailed Implementation
[0019] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0020] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.
[0021] Secondly, the term "an embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of this application. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single embodiment or an embodiment selectively excluded from other embodiments.
[0022] Example 1 like Figure 1 As shown, an interactive resource scheduling and optimization system for a blackboard includes: The field mapping unit extracts discrete interaction events from the multimodal sensing data stream of the blackboard and converts the interaction events into a continuous demand density distribution field and resource capability potential field on the two-dimensional plane of the blackboard. The discrete interactive events include touch point sequences, handwriting trajectories, voice command segments, or gesture image frames; Interactive events are parsed into position coordinates and demand characteristics on a two-dimensional blackboard plane, and the position coordinates and demand characteristics are converted into a continuous demand density distribution field; Specifically, the field mapping unit first extracts discrete interaction events from the parallel multimodal sensing data stream. These discrete interaction events include a sequence of touch coordinates from the touch sensor, a sequence of handwriting sampling points from the electromagnetic pen or active capacitive pen, a voice command segment from the microphone array after endpoint detection, and a sequence of gestures or object bounding boxes from the camera after image recognition.
[0023] Extracting discrete interaction events includes time window segmentation and action recognition, as well as event feature parsing; The time window segmentation and action recognition are based on a preset time threshold. For example, if the interval between two touches exceeds the threshold, they are regarded as two independent events. The continuous data stream is divided into interactive action units that are continuous in time and semantically complete. Each identified independent interactive action constitutes a discrete interactive event.
[0024] The method for setting the time threshold includes: the time threshold can be set to 150 milliseconds, which is derived from the average time interval between intentionally continuous operations such as swiping and writing and discrete click operations in human-computer interaction research. Continuous touch points with a time interval less than this threshold are considered as part of the same event trajectory.
[0025] The event feature analysis process involves parsing each extracted discrete interaction event using a field mapping unit to obtain spatial location coordinates and resource requirement features.
[0026] The spatial coordinates are the position of the current interactive event on the two-dimensional plane of the blackboard. For touch and handwriting, the coordinate sequence is the geometric center or starting point of the two-dimensional plane; for voice and gesture, it is the sound source location or the center point of the gesture area.
[0027] The resource demand features are determined based on the type of event, such as handwriting drawing, interface dragging, or voice recognition, and combined with a preset operation type and resource demand mapping table to parse out the type of computing resources required by the current interaction event, such as GPU rendering, CPU computing, memory caching, and initial demand intensity coefficient.
[0028] A preferred configuration combining a pre-defined operation type and resource requirement mapping table includes a pre-configured lookup table that defines mapping rules from "operation type" to "primary resource requirement type" and "baseline requirement intensity". For example, the table might define: "Operation type: complex gesture recognition" mapped to "requirement type: GPU computing, CPU computing", with a "baseline requirement intensity of 2.5"; "Operation type: handwriting drawing" mapped to "requirement type: GPU rendering", with a "baseline requirement intensity of 1.2". The mapping rules are based on statistical analysis and calibration of historical resource consumption data for different applications and operations by the operating system.
[0029] It should be noted that the initial demand intensity coefficient is a dimensionless relative value used to characterize the degree of resource demand of the event itself, such as the demand for complex graphics being higher than that for simple line segment drawing.
[0030] The initial demand intensity coefficient is a dimensionless normalized value, typically between 0 and 1. It is used to quantify the relative consumption of computing resources by interactive events per unit time. The coefficient can be set based on historical data statistics or hardware performance benchmark tests. For example, during the system design phase, if extensive testing shows that the average CPU and GPU load for processing complex gesture recognition events is 2.5 times that for processing simple touch click events, then the initial demand intensity coefficient for complex gesture recognition is set to 2.5, and for simple touch clicks, it is set to 1.0.
[0031] Obtain the layout and status of the blackboard physical computing resources, and construct the resource capability potential field; The demand density distribution field is used to represent the intensity of task demand at different points in space at different times. The method for constructing the demand density distribution field includes: establishing a coordinate system for a two-dimensional blackboard plane; determining a bandwidth parameter that characterizes the degree of density smoothness; for each point on the plane, calculating the sum of the density contributions of all event location coordinates to the current point, and obtaining the demand density value of the current point; traversing all points on the plane to form a continuous scalar field characterizing the distribution of task demand intensity, i.e., the demand density distribution field. Specifically, after obtaining the discrete event with the current location coordinates and initial demand intensity coefficient, the field mapping unit converts the discrete points of the location coordinates and initial demand intensity coefficient into a continuous and smooth demand density distribution field covering the entire blackboard plane. The value of each point in the demand density distribution field represents the task demand intensity carried by that spatial location at the current moment.
[0032] The specific method for constructing the demand density distribution field includes: S101 establishes a two-dimensional Cartesian coordinate system with the physical boundary of the blackboard display area as the range, and defines the entire blackboard area as a continuous solution domain.
[0033] S102 sets a smoothing parameter called bandwidth. The smoothing parameter is used to determine the range of influence of each discrete event on its surrounding space. The bandwidth can be preset according to the typical spatial scale of the interactive event, such as the size of the finger touch point or the width of the handwriting line.
[0034] In one specific embodiment of this application, the bandwidth parameter σ is set based on the physical characteristics of the interactive event: for touch events, σ is 1.5-2 times the diameter of the touch point, typically 15-30mm; for handwriting drawing, σ is 2-3 times the width of the handwriting, typically 10-25mm; for gesture recognition, σ is 1-2 times the radius of the gesture recognition area, typically 50-150mm. The Gaussian kernel function uses the standard two-dimensional Gaussian function: K(x,y)= x and y are planar coordinates.
[0035] Simple touch control: 0.5-1.0; handwriting drawing: 1.0-2.0; complex gestures: 2.0-3.0; voice commands: 0.8-1.5.
[0036] It should be noted that when setting the bandwidth, a larger bandwidth will result in a smoother and more diffuse demand density distribution field, while a smaller bandwidth will make the demand density distribution field more concentrated near the event coordinate point.
[0037] S103 For any point on the blackboard plane, calculate the density contribution of all discrete interactive events to the current point. The contribution value of each event is determined by the initial demand intensity coefficient and the distance from the current interactive event coordinates to the current point. Set a Gaussian kernel function. The closer the distance, the greater the contribution. The higher the initial demand intensity of the event itself, the greater the contribution. The total demand density value of the current point is the weighted sum of the contribution values of all events to the current point.
[0038] Specifically, the weighted sum is the direct addition of the contribution values of each event. The weights are automatically assigned by the Gaussian kernel function based on the distance. The specific calculation formula is as follows:
[0039] in, Point Demand density value at the location; N is the total number of discrete interactive events at the current moment; Let be the initial demand intensity coefficient for the v-th event; ( , Let ) be the coordinates of the v-th event; The bandwidth is The two-dimensional Gaussian kernel function is expressed as follows:
[0040] The two-dimensional Gaussian kernel function makes the distance ( , Points that are closer to each other receive greater weight, thus characterizing the smoothness of the space. Bandwidth The value is preset based on the physical characteristics of the interactive event.
[0041] S104 iterates through the points on the blackboard plane and repeats the calculation of S103 to obtain the demand density value at each grid node. All discrete grid node values constitute a discrete sampling field covering the entire blackboard. Then, through the interpolation of the sampled values, the blackboard plane is represented as a continuous demand density distribution field on the entire plane.
[0042] The resource capability potential field is used to represent the computational resource supply capability of each point in space.
[0043] The resource capability potential field construction method includes: acquiring the hardware layout and real-time performance status of physical computing resources in the blackboard; assigning a scalar value representing the resource supply capacity near each point on the plane according to the hardware layout and the performance status; and constructing a continuous resource capability potential field in space corresponding to the demand density distribution field.
[0044] The field mapping unit constructs a resource capability potential field to describe resource supply capacity. This field is defined on the entire blackboard plane, and the value of each point represents the resource support capacity that the computational task at the current point can obtain.
[0045] The specific methods for constructing the resource capability potential field include: S201 obtains static and dynamic information about all critical physical computing resources within the blackboard through the operating system kernel interface.
[0046] Static information includes the physical location of each core of the central processing unit, the location of the graphics processing unit's rendering unit, the location of the memory controller and the distribution of memory channels, and the physical coordinates of the main chips.
[0047] Dynamic information includes the current utilization, frequency, and temperature of each CPU core; the current load, available video memory, and power consumption of the GPU; memory bandwidth utilization; and the real-time power consumption and thermal status of each major functional area.
[0048] S202 establishes a model that maps spatial location to resource accessibility based on the physical layout and electrical characteristics of the hardware.
[0049] A preferred model example is a point close to the physical location of a CPU core, which has lower latency and higher efficiency in obtaining computing power from the current core; a point close to the memory controller, which has greater memory access bandwidth; and a CPU core in a high-temperature throttling state, which can currently provide less effective computing power than the nominal value.
[0050] Specifically, a preferred example of a model that maps spatial location to resource accessibility: This model can be mathematically modeled using a combination of functions based on distance decay. Specifically, suppose there are M physical computing resource nodes on the blackboard plane. For the j-th resource node, such as a CPU core, GPU cluster, or memory controller, its coordinates are ( The resource's contribution to the ability of any point (x,y) on the plane. It can be represented as:
[0051] in: Let be the real-time status coefficient of the j-th resource, with a value ranging from [0,1]. This coefficient is determined by a combination of dynamic information such as the resource's current utilization rate, temperature, and power consumption. For example, when the resource utilization rate is close to 100% or the temperature is too high, Taking a smaller value indicates a decrease in effective supply capacity; when resources are idle and in good condition, Take a value close to 1.
[0052] The spatial radius of influence, related to resource type, characterizes the extent to which the resource's capabilities can spread. Different types of resources have different radii of influence; for example, the radius of influence of a CPU core is relatively small, while the influence range of memory bandwidth may be larger. It can be preset through physical distances and empirical calibrations in the hardware layout.
[0053] The above formula uses a Gaussian distance decay function, where resources contribute more to points that are closer together, and the contribution decreases exponentially with increasing distance, which is consistent with the spatial distribution characteristics of physical resource supply capacity.
[0054] The resource potential field T(x,y) across the entire blackboard plane is defined as the sum of the potential contributions of all physical resources to the point (x,y), i.e.:
[0055] The resource capacity potential value at any point on a plane reflects the strength of the combined supply capacity of all available computing resources in the vicinity of that point.
[0056] S203 For any point on the blackboard plane, comprehensively consider the capability contribution of all physical computing resources to the current point. The capability contribution includes distance, resource type and weight, and real-time state coefficient.
[0057] The distance is the spatial distance from the physical location of the resource to the current point. The closer the distance, the greater the contribution. The attenuation relationship can be defined empirically.
[0058] Resource type and weight: Different types of resources, such as computing, rendering, storage, and bandwidth, are assigned different weight coefficients, which are used to reflect their relative importance in the overall scheduling.
[0059] The weighting coefficients are pre-set based on system design goals and power budget. For example, in a graphics-intensive application, the weight for rendering (GPU) might be set to 0.6, general-purpose computing (CPU) to 0.3, and memory bandwidth to 0.1. These coefficients can be configured during system initialization using the analytic hierarchy process or empirically to ensure that the contribution of key resource types to the overall potential field dominates in subsequent potential field calculations.
[0060] Real-time state coefficients are dynamic information such as the current utilization, availability, and power efficiency of resources, which are converted into state coefficients between 0 and 1. These coefficients are used to modulate the theoretical maximum contribution value. For resources with high load and high power consumption, the current effective contribution value will be reduced.
[0061] The resource capability potential value at the current point is the weighted sum of the contributions of all resources to it.
[0062] The capability potential is calculated at all nodes of a preset grid, and a continuous resource capability potential field defined on the entire plane is formed by interpolation.
[0063] Upon system startup, the field solving unit performs an initial solution using the initial resource density distribution based on the hardware physical layout. The topology unit optimizes the field state obtained from the initial solution, outputting an optimized initial resource density distribution. Then, the system enters an alternating iterative mode: the field solving unit performs a new round of solutions using the optimized initial resource density distribution, and the topology unit optimizes based on the new field state, generating a new initial resource density distribution. When the change in resource density distribution between two consecutive iterations is less than a threshold, the system enters a steady state, and topology optimization is triggered only when the demand field changes.
[0064] The field solution unit receives the demand density distribution field and the resource capability potential field, and simultaneously solves a system of partial differential equations including the demand diffusion and decay equations, the Poisson equation for the resource capability potential field, and the nonlinear coupling response terms of demand and resources, to obtain the current state of the demand density distribution field and the resource capability potential field, such as... Figure 2 As shown; A preferred example of field solving includes: The constructed demand density field and resource capability potential field are read in as two-dimensional arrays.
[0065] For the demand density array, calculate the difference between each point and the average value of its four neighboring points (up, down, left, and right). Multiply the difference by the diffusion coefficient to obtain the amount of demand that diffuses from or out of the neighboring points.
[0066] Multiply the value of each point in the demand density array by the decay rate to obtain the amount of natural reduction at that point.
[0067] Read the resource capability potential array, generate a gain that slows down demand decay in areas with high potential values; at the same time, read the demand density array, generate a debuff that weakens local resource capabilities in areas with high demand, and feed this back to modify the resource capability potential array.
[0068] Add the diffusion amount to the current demand density value, subtract the attenuation amount, and add the coupling gain to obtain the demand density value at the next moment. Simultaneously, update the resource capability potential in a similar manner. Repeat this process until the sum of changes in the entire array between two iterations is less than a certain threshold. At this point, the system is considered to have reached its current stable state, and two final arrays are output.
[0069] The method for constructing the system of partial differential equations includes: The demand diffusion and decay equation is used to describe the spatial diffusion and time decay characteristics of task demands on the blackboard plane. Specifically, task requirements are not fixed at the initial point of occurrence, but rather spread to the surrounding space. For example, high-intensity handwriting drawing points indicate that adjacent areas will soon become interaction hotspots, and spatial diffusion is determined by a diffusion term that includes the second derivative of the spatial distribution field of the requirement density.
[0070] The intensity of interaction needs that are not continuously met or followed up will naturally weaken over time. For example, if a brief touch does not have a subsequent operation, the demand signal should gradually disappear. The time decay is determined by the decay term that includes the demand density distribution field itself.
[0071] When a discrete interaction event is received from the field mapping unit, the external source term will be injected into the system as an external input, continuously driving the dynamic evolution of the demand density distribution field.
[0072] A preferred method for calculating the demand diffusion and attenuation equation includes:
[0073] in, The rate of change of the demand density distribution field u with time t is the objective of solving the equation; The Laplace operator for u is equal to the following in the two-dimensional plane: This is used to represent the difference between the average value of a point and the surrounding points in spatial diffusion calculation. A positive value indicates that the demand at this point is lower than that of the surrounding points, meaning that the demand diffuses from the surrounding areas. A negative value indicates that the demand at this point is higher than that of the surrounding areas, meaning that the demand diffuses outwards from the surrounding areas. D is the diffusion coefficient, a constant with a value greater than zero, used to determine the rate of diffusion. λ is the decay rate, a constant with a value greater than zero, used to determine the rate at which the demand intensity naturally decays; For external source term functions, it represents the injection of new task requirements at position (x,y) and time t.
[0074] The Poisson equation for the resource capability potential field is used to calculate the resource capability potential field based on the density distribution of resources in physical calculations. Furthermore, the initial or previous demand density distribution field is used as the initial value for solving the equation. This value originates from the continuous demand density distribution field generated by kernel density estimation and output by the field mapping unit.
[0075] The diffusion coefficient D is preset based on the physical and cognitive characteristics of the interactive task. For example, for continuous and smooth handwriting or gestures, the intent and attention area tend to extend along the trajectory, thus corresponding to a higher D value; for discrete and precise click or selection operations, the intent is highly concentrated at the touch point, the diffusion effect is weak, thus corresponding to a lower D value.
[0076] The system can maintain an interaction type diffusion coefficient mapping table and dynamically select the corresponding D value based on the operation type parsed by the field mapping unit.
[0077] The interaction type diffusion coefficient mapping table is a pre-configured lookup table. For example, "Operation type: handwriting drawing" maps to "Diffusion coefficient D: 0.2"; "Operation type: touch click" maps to "Diffusion coefficient D: 0.05"; and "Operation type: gesture recognition" maps to "Diffusion coefficient D: 0.15". The mapping rules are based on experimental calibration of the diffusion characteristics of different types of interaction behaviors in physical space and cognition.
[0078] The attenuation rate λ represents the persistence of the required signal and is preset according to the real-time requirements of the task.
[0079] For interactive tasks with extremely high real-time response requirements, the demand signal should decay rapidly, corresponding to a large value for λ.
[0080] For continuous tasks, the demand signal decays slowly and λ is small.
[0081] external source items Driven by newly occurring discrete interactive events provided in real time by the field mapping unit. Each new event is determined based on its location. and the initial demand intensity derived from the analysis Modeled as highly concentrated in space Pulse or Gaussian distribution sources near the point, This is the spatial superposition of all new event sources at the current moment.
[0082] The demand diffusion and decay equations are solved simultaneously with the resource capability potential field equations, and the numerical solver operates on a discrete spatiotemporal grid. At each time step, the solver reads the coupling information between the demand value u and the resource capability potential field equations at the current grid node; based on preset D and λ, it calculates the Laplace operator (i.e., the spatial second derivative) of the current demand density distribution field, reflecting the diffusion driving force and decay term; it receives new events from the field mapping unit and transforms them into source terms. Add to the corresponding grid node.
[0083] According to the discretized equation update rule, the new demand value of each grid node in the next time step is calculated.
[0084] After multiple time steps of iteration, until the system reaches the preset convergence state, the set of new demand values of all nodes on the grid constitutes the current state of the demand density distribution field.
[0085] The Poisson equation for the resource capability potential field is used to calculate the resource capability potential field based on the density distribution of resources in physical calculations. The Poisson equation for the resource capability potential field links the resource capability potential field T(x,y), representing the spatial form of the resource supply potential at location (x,y), with the spatial density distribution ρ(x,y) of the physically calculated resources in the system through a defined relationship.
[0086] Specifically, the calculation methods for the Poisson equation of the resource capability potential field include:
[0087] in, The Laplace operator for the resource potential field T is equal to , is used to represent the curvature or concavity of the resource potential field T at a certain point in space, reflecting the deviation of the current potential field value from the surrounding average value.
[0088] ρ(x,y) is the resource density distribution function, which is defined on the two-dimensional plane of the blackboard. The value represents the density of computing resources per unit area, such as CPU computing power, GPU rendering units, memory bandwidth, etc., after normalization and aggregation. Areas with high ρ values correspond to resource-rich areas of hardware chips.
[0089] k is a proportionality constant, a preset parameter with a value greater than zero, used to calibrate the physical dimensions of resource density ρ and the mathematical rate of change of resource capability potential field T.
[0090] It should be noted that resource density ρ is the source of the resource potential field T. In resource-dense regions, a large ρ results in a negative Laplace value for the potential field. If the value is less than 0, T exhibits a local maximum at the current point, indicating a high potential energy point. Conversely, regions with sparse resources correspond to lower potential field values.
[0091] The resource density distribution function ρ(x,y) serves as a dynamically changing input, the source of which depends on the stage of system operation: When the system starts up or without optimization intervention, ρ(x,y) is constructed based on the hardware physical layout diagram of the smart blackboard. The physical layout diagram indicates the physical coordinates of key computing units such as CPU core, GPU module, and memory controller on the motherboard. The theoretical peak performance of each unit is weighted and normalized, and the influence is mapped to the surrounding space through a preset Gaussian distribution to generate a static initial resource density distribution covering the entire blackboard plane.
[0092] Once the topology unit starts working, ρ(x,y) outputs an optimized resource density distribution scheme, such as allocating more computational weight to a GPU cluster to deal with rendering hotspots. The field solving unit will replace ρ(x,y) with the optimized resource density distribution scheme as a new, dynamic source term input to the Poisson equation.
[0093] Specifically, the control unit receives the optimized resource density distribution and its corresponding resource region topology Γ from the topology unit. Based on Γ, the control unit determines the set of physical hardware resources that need to be adjusted, such as which CPU cores and GPU clusters are located in the current region. Then, based on the distribution of the resource density distribution in the current region, it generates targeted continuous control quantities.
[0094] The nonlinear coupling reaction term of demand and resources is embedded in the demand diffusion and decay equation and the resource capacity potential field Poisson equation in a product form to express the feedback effect of high task demand on resource consumption.
[0095] In one specific embodiment of this application, to clarify the implementation method, a set of feasible parameters and function examples are provided: the diffusion coefficient D can be obtained by looking up a table according to the interaction type, for example, 0.2 for handwriting drawing and 0.05 for touch click; the attenuation rate λ is 0.1; the coupling coefficient... and All values are set to 0.5; the proportionality constant k is set to 1.0; the functions f(T) and g(u) can be in linear form, i.e., f(T) = T, g(u) = u; in topology optimization, the weight coefficient α can be set to 0.1, and β can be set to 0.01; the weight matrices Q and S in the control unit performance index can be set as diagonal matrices, and the ratio of their diagonal elements can be adjusted according to the emphasis on tracking error, control energy consumption and smoothness, for example, set as Q = diag(10,10,...), S = diag(1,1,...).
[0096] The parameters and function examples above are for illustrative purposes only, and those skilled in the art can adjust them according to the actual system calibration results.
[0097] The nonlinear coupling reaction term of demand and resources takes the current state of the demand density distribution field and the resource capability potential field as input, calculates the coupling effect, and embeds it into the demand diffusion and decay equation and the resource capability potential field Poisson equation, respectively, so that the demand density distribution field and the resource capability potential field are interconnected and mutually influential in the process of forced evolution.
[0098] In this application, coupling is achieved by influencing the source term of the resource capability potential field equation, namely the resource density distribution ρ, thereby transforming the original static resource density... Modified to Then substitute it into the Poisson equation This is used to reduce the effective resource density. Among them, It is a monotonically increasing non-negative function of the demand density distribution field u. In regions where the demand density distribution field u is high, the value of g(u) is large, indicating an effective resource density. Decrease, g(u) = , where g(u) = An example of another nonlinear function used for g(u).
[0099] Since the potential field T in the Poisson equation is proportional to the resource density ρ, the decrease in effective density causes the calculated resource capacity potential field T to decrease in this region, simulating the feedback of resource capacity consumption by task requirements.
[0100] This is the resource-side coupling coefficient, a preset constant with a value greater than or equal to 0, used to control the intensity of the influence of the demand density distribution field on the resource capability potential field.
[0101] A preferred method for calculating the nonlinear coupling response term of demand and resources includes, within each iteration time step of the field solver, the solver performs the following: obtaining the demand density distribution field value and resource capability potential field value on the current grid node.
[0102] For the demand diffusion and decay equation, calculate As the source item to be added, among which This represents the current resource capability potential field value. This represents the demand density distribution field value at the current grid node.
[0103] For the Poisson equation of the resource capability potential field, calculate static resource density The correction amount is obtained. .
[0104] The calculated coupling quantities are substituted into the modified demand diffusion and decay equations and the resource capability potential field Poisson equation, respectively. Since the demand diffusion and decay equations and the resource capability potential field Poisson equation are interdependent through the demand density distribution field u and the resource capability potential field T, the new value of u depends on... The new value of T depends on Revised The problem is solved jointly through Jacobi iteration until the equations for demand diffusion and decay and the Poisson equation for resource capacity potential are obtained simultaneously.
[0105] After coupled iterative solving, the solutions to the demand diffusion and decay equations and the resource capability potential field Poisson equation are the latest current state of the system.
[0106] The constructed system of partial differential equations is continuous and coupled, and needs to be solved numerically on a discrete spatiotemporal grid.
[0107] The specific implementation methods of the field solution element include: The blackboard two-dimensional plane is discretized into a uniform rectangular computational grid. The continuous field output by the field mapping unit is sampled onto this grid, and each grid node stores the demand density value and resource capability potential value of that point.
[0108] Discretize the time axis into a series of small time steps.
[0109] The field data output by the field mapping unit is used as the initial state.
[0110] At each time step, the solver performs the following steps: Calculates the nonlinear coupling response terms based on the demand and resource potential values at the grid nodes of the current time step; substitutes the calculated coupling terms, along with diffusion, decay, and source terms, into the discretized demand diffusion and decay equations and the resource capability potential field Poisson equation; and uses Jacobi iteration to repeatedly update the node values of the two fields within a single time step until the coupling solution within the current step reaches stability.
[0111] Using the full-field data obtained in the previous step as the initial value for the next time step, the simulation time is gradually advanced.
[0112] It should be noted that those skilled in the art can, based on the well-known techniques of Jacobi iteration and the content disclosed in this application, realize the repeated updating of the node values of the demand density distribution field and the resource capability potential field within a single time step.
[0113] The solution process continues until a preset convergence condition is met. A preferred example of a convergence condition is that between two consecutive time steps, the changes in the values of the demand density distribution field and the resource capability potential field on all grid nodes are less than a set small threshold.
[0114] When the convergence condition is met, the solver stops iterating and calculates the latest demand density value stored in each node of the grid, which together constitutes the current state of the demand density distribution field; the latest resource capability potential value stored in each node together constitutes the current state of the resource capability potential field.
[0115] The blackboard two-dimensional plane is discretized into a uniform computational grid. The continuous demand density distribution field and resource capability potential field are sampled respectively, and the discrete values of demand density and resource capability potential field are obtained at the grid nodes respectively. At each computation time step, based on the partial differential equations, the demand density and resource capability potential field at each grid node at the current time are used to calculate the demand density update and resource capability potential field update at each grid node at the next time step. By iteratively advancing multiple time steps until the absolute values of the demand density update and the resource capability potential field update are less than the preset convergence thresholds, the discrete values of demand density and resource capability potential field on each grid node are output.
[0116] The final discrete values of demand density and resource capability potential field output by the field solving unit at each grid node constitute the current state of the demand density distribution field and the resource capability potential field. The current state is used to characterize the instantaneous stable field distribution state reached by the blackboard system after diffusion, attenuation, resource constraints and nonlinear coupling effects as defined by the partial differential equation system.
[0117] The topology unit receives the current state of the demand density distribution field and the resource capability potential field, and solves for the optimized resource density distribution and the matching resource region topology by minimizing the energy functional. The control unit is used to receive the optimized resource density distribution and the current demand density distribution field, and generate continuous control quantities for resource scheduling; For example, on a blackboard operating system, a test program can be written to periodically and forcibly change the power consumption limit of a certain GPU cluster, while simultaneously recording the rendering frame rate or handwriting tracking latency of specific areas of the screen at high frequency. By analyzing the time-series data of changes in control commands and performance indicators, and using the corresponding toolboxes in MATLAB or the SciPy library in Python, a simple mathematical model describing the dynamic relationship between the two can be fitted, such as... Figure 5 As shown, Figure 5 This is a GPU resource usage monitoring graph after the implementation of this application. The horizontal axis represents time, and the vertical axis represents GPU utilization. The curve in the graph shows that the GPU utilization fluctuates greatly in the unoptimized stage. After optimization is started, the utilization curve tends to be smooth, which can be dynamically adjusted according to rendering needs, avoiding resource idleness or overload. Every 15 grids on the horizontal axis represents 20 minutes.
[0118] The current states of the demand density distribution field and the resource capability potential field construct the energy functional, which includes the first term and the second term; The energy functional E[ρ,Γ] is a rule that maps the candidate resource density distribution function ρ(x,y) and the candidate resource region boundary topology Γ to real values.
[0119] The first item is the demand-resource matching error item. Constructed as a demand density distribution field With candidate resource density distribution function The integral of the square of the difference between them on the blackboard plane, that is...
[0120] Among them, the distribution of resources for matching error term penalty and the distribution of task requirements. The mismatch between them forces the distribution of task requirements. Move within the feasible region of the matching error term. When Spatially with When there is a high degree of overlap, the first term takes the smallest value, driving the optimization process to allocate resources to the region with the strongest demand. The input of the first term is the current demand density distribution field from the output of the field solving unit. The integral is over the entire blackboard plane.
[0121] It should be noted that, This represents the demand density distribution field at the current moment, simplified to u(x,y) for short.
[0122] In a specific embodiment of this application, the topology optimization is implemented as follows: Matching error term weight: implicitly set to 1 in the integral; Boundary length weight α: ranges from 0.05 to 0.2, with a typical value of 0.1; Curvature weight β: ranges from 0.01 to 0.05, with a typical value of 0.02; The optimization algorithm uses gradient descent, with a learning rate η ranging from 0.01 to 0.1, 100-500 iterations, and the convergence condition being that the energy functional change ΔE < 1e-4 or the maximum number of iterations is reached; The level set function is initialized using the signed distance function, with the zero level set corresponding to the initial resource region boundary; The total resource quantity constraint R is implemented using the Lagrange multiplier method or the projection method, where the projection operation is a given temporary density distribution. The operation of projecting it onto the constraint surface is as follows: R represents the total system resources.
[0123] The second item is the topological simplicity item. A preferred representation of the geometric complexity of the resource region boundary Γ is a weighted sum of two terms: the boundary length term and the boundary curvature term, with the integral defined in the blackboard region. superior.
[0124] The expression for calculating the boundary length term is:
[0125] That is, the total length of the boundary Multiplying by the weighting factor α, if the boundary is shorter, the region shape is more compact and the management overhead is lower.
[0126] The expression for calculating the boundary curvature term is:
[0127] That is, the square of the integral curvature κ along the boundary is multiplied by the weighting coefficient β to penalize the severe bending of the boundary, making the boundary tend to be smooth and avoiding the generation of complex jagged structures. exist This is the integral over the boundary of the integration field.
[0128] The weighting coefficients α and β can both be set based on experience with resource management overhead.
[0129] The first term is used as an integral measure of the matching error between the demand density distribution field and the candidate resource density distribution function, such that the first term is minimized when the resource distribution is more spatially matched with the task demand. The second term is used as a geometric measure of the total length or curvature of the boundary of the candidate resource region's topology, such that the value of the second term is minimized when the shape boundary of the resource region is smooth. The overall value of the energy functional is formed by the weighted sum of the first and second terms. When the minimum value of the energy functional satisfies the resource constraints, the optimal balance between task requirement coverage and topological simplicity is achieved.
[0130] The topological element solves the constrained energy functional minimization problem described above using a numerical optimization algorithm, such as... Figure 3 As shown, ρopt represents the optimized resource density distribution, and ucurr represents... .
[0131] A preferred example employs variational methods and level set approaches. For instance, the boundary is represented using the level set function ϕ(x,y). Here, Γ is the zero contour line of ϕ(x,y), and the resource density ρ is expressed as a function related to the level set function ϕ. Thus, the energy functional E is transformed into a functional with respect to the level set function ϕ. For example, the resource density ρ can be expressed as ρ(x,y)=ρmin+(ρmax-ρmin)·H(ϕ(x,y)), where H is a step function that takes the value 1 when ϕ<0 and 0 when ϕ>0.
[0132] The resource region is defined using an independent two-dimensional array (level set function). A positive array value indicates that the region is outside, and a negative value indicates that the region is inside. The line connecting the zero points is the boundary.
[0133] By comparing the optimized target resource distribution with the actual distribution of the current resource area, an outward expansion trend is generated in areas where demand far exceeds resources; and an inward contraction trend is generated in areas where resources are idle. The length and curvature of the boundary curve are calculated to generate a trend that keeps it smooth and compact.
[0134] The combined trend of all trends, such as the trend being quantified as the magnitude of a force, is the resultant force. The speed at which each point on the boundary should move along the normal direction is calculated, and the entire level set function array is updated based on the speed. This is equivalent to pushing the zero line to move and changing the shape of the resource region.
[0135] After each move, check if the total resource quantity within the entire region is constant. If not, scale the entire distribution map proportionally. Repeat this process until the boundary shape hardly changes. At this point, the output resource distribution and region shape represent the optimal solution.
[0136] Specifically, starting with a simple initial resource density distribution and initial topology, the initial topology can be a blackboard plane topology.
[0137] Furthermore, the variational derivative of the energy functional E with respect to the level set function ϕ is calculated to obtain the gradient direction, which is used to indicate how to slightly adjust the boundary shape and density distribution to reduce the total energy E.
[0138] For example: The gradient will drive the boundary to move towards areas with higher demand.
[0139] The gradient will drive the boundary to shrink and smooth.
[0140] Based on the calculated gradient direction, the level set function ϕ is updated with a small step size. After each update, the total resource constraint R is satisfied through projection.
[0141] When the decrease in energy E is less than the preset threshold, it has converged to a local optimum.
[0142] The optimized resource density distribution, at the point of convergence, satisfies the total quantity constraint, provides the best fit to the current demand density distribution field, and also takes into account the continuity of the distribution.
[0143] The boundary of the matched resource region topology at convergence determines the shape, number, and location of resource-rich regions.
[0144] The optimized resource density distribution and the output of the matched resource region topology are sent to the control unit and fed back to the field solution unit as the update source of the resource capability potential field equation, thus initiating the next round of dynamic coupling and optimization cycle.
[0145] The topological unit starts with a preset initial resource density distribution and initial topological structure, and uses variational optimization to calculate the gradient of the energy functional with respect to the resource density distribution function and the shape of the resource region boundary, and updates the resource density distribution function and adjusts the resource region boundary in the direction that makes the energy functional value decrease. The update process is repeated until the decrease in the energy functional or the update magnitude of the resource density distribution and topology is less than a preset convergence threshold. When the iteration terminates, the resource density distribution function at this time is output as the optimized resource density distribution; at the same time, the stable boundary shape and connection relationship at this time are output as the matched resource region topology.
[0146] The control unit receives the target resource distribution scheme output by the topology unit and the real-time demand density distribution field state provided by the field solving unit, and uses it to generate smooth and continuous control quantities to drive the hardware to achieve the optimization target.
[0147] The control unit constructs the resource scheduling problem as a tracking control problem, with the goal of making the actual resource utility state of the system smoothly and quickly track the target distribution given by the topology unit, and respond to fluctuations in demand in real time.
[0148] The control unit receives the target resource density distribution from the topology unit and the real-time demand density distribution field from the field solving unit, and outputs a time-continuous control quantity.
[0149] The control unit formalizes the scheduling task as a dynamic tracking control problem, including target tracking, disturbance suppression, and control smoothing.
[0150] Target tracking enables the actual resource efficiency distribution of the system to approximate the ideal resource density distribution given by the topological unit.
[0151] Disturbance suppression provides rapid compensation and suppression for system state disturbances caused by real-time demand fluctuations.
[0152] Controlling the rate of change of the underlying hardware control instruction sequence by smoothing constraints avoids sudden additions or removals of hardware resources, ensuring the stability and energy efficiency of system operation.
[0153] To achieve the above objectives, a distributed parameter state-space model for the control unit is used to describe the system dynamics: The distributed parameter state-space model includes state variables, control variables, and system dynamic equations.
[0154] Specifically, state variables are used to characterize the dynamic characteristics of a system. A preferred definition is to select vectors that reflect the target tracking error and the demand situation. For example, the blackboard plane can be divided into N control regions, and state variables can be defined. Let x(t) be the deviation between the current resource efficiency index and the integral value of the demand resource density within the i-th control area. Simultaneously, the integral value of the real-time demand density within the corresponding area is included as part of the state variable. Therefore, the state vector x(t) simultaneously contains tracking error information and demand disturbance information.
[0155] Control variables correspond to dynamically adjustable hardware resource parameters, such as: CPU core frequency and voltage allocated to each control region, the activation ratio of GPU stream processor clusters, memory bandwidth quotas, and network interface priority weights. Control variables are vectors that change continuously over time or are updated at a high frequency.
[0156] The system dynamic equations establish a model describing how the state variable demand changes with control variables and demand disturbances. A typical linearized approximation is: x˙(t) = Ax(t) + Bv(t) + w(t) in: x˙(t) is the rate of change of the state vector, and v(t) is the control vector.
[0157] The system matrix A describes the inherent evolution of the system state itself, such as the natural decay of errors and the spread of demand disturbances. The parameters can be preset through system identification.
[0158] The control matrix B describes the strength of the influence of the sequence of underlying hardware control instructions on state changes, and depends on the characteristics of the hardware control channel, such as the response speed of blackboard frequency and voltage modulation.
[0159] The disturbance term w(t) characterizes the uncontrollable but observable disturbance input introduced by changes in the real-time demand density distribution field, and its value depends on the real-time... Calculated.
[0160] It is important to note that the control model is a linearized approximation near the local operating point, used to generate smooth reference instructions.
[0161] A preferred method for solving the distributed parameter state-space model includes: The control unit uses optimal control theory to solve the control law online.
[0162] Define the general quadratic performance index J that needs to be minimized:
[0163] To penalize state errors, the weight matrix Q is a positive definite diagonal matrix. The size of the diagonal elements determines the degree of importance attached to the tracking error in different regions. Minimizing this term drives the system state to approach zero.
[0164] To penalize control energy consumption, the weight matrix S limits the absolute magnitude of control actions, avoiding the use of excessively costly control resources. The smoothness of control resources can be achieved by reasonably increasing the control weight matrix S or introducing a first-order low-pass filter.
[0165] For linear quadratic problems, an example of a preferred state feedback form of the optimal control law includes: v∗(t)=−Kx(t) The optimal feedback gain matrix K is obtained by solving the Riccati differential equation. The control unit pre-calculates and stores K offline. When an observable disturbance w(t) exists, the control law can be extended as follows: v∗(t)=−Kx(t)− w(t), in This is the feedforward compensation gain matrix, used to actively suppress demand disturbances.
[0166] The optimal control law v∗(t) obtained by solving is a discrete sequence with respect to a high sampling rate, which specifies how each hardware control parameter, such as frequency, voltage, and bandwidth ratio, should change smoothly over time.
[0167] The continuous control output of the control unit can be represented as a series of tuples ordered by timestamps, consisting of (control object identifier, target value, transition time). For example: (GPUCluster1, target computing power ratio 0.85, linearly increasing over 5 milliseconds).
[0168] The continuous control quantity is sent to the instruction unit, which is responsible for writing the smooth target trajectory through the interpolation register according to the specifications of the hardware driver interface, and finally converting it into a physical signal that can be executed by the underlying hardware and is actually continuously changing.
[0169] It is important to note that the target distribution comes from topological units.
[0170] Task requirement distribution From the field solution element.
[0171] System model parameters A and B are determined in advance through system identification experiments or calibrated based on hardware characteristics.
[0172] The weight matrix Q,S is preset based on the design trade-offs of tracking accuracy, control cost, and smoothness.
[0173] The output is a time-continuous, smooth, continuous control quantity v∗(t).
[0174] To ensure the feasibility and real-time performance of this system on the smart blackboard embedded platform, the following implementation points need to be explained: The field solving, topology optimization, and control law calculation modules of this system can be deployed on the smart blackboard main control chip, such as a multi-core ARM processor, and the coprocessor, such as an integrated GPU. The parallel computing tasks of the grid nodes can be handled by the GPU to utilize its high parallel computing capabilities.
[0175] By setting the computational grid resolution to a typical value such as 32x18 and using a fixed-step explicit difference scheme for PDE solving, a single field solution iteration can be completed within milliseconds. Topology optimization uses a pre-calculated gradient descent step size and only triggers a complete optimization loop when the demand field changes beyond a threshold. Verification shows that on the example hardware platform, the entire process latency from multimodal event input to the generation of underlying control commands can be controlled within 15 milliseconds, meeting the real-time requirements of interaction.
[0176] The low-level hardware control instructions generated by the instruction unit need to be translated into a format recognizable by the operating system or driver interface. For example, control quantities for adjusting the CPU core frequency can be implemented through the Linux kernel's CPUfreq subsystem interface. A specific instruction sequence example: First, the controller is set to userspace via the sysfs interface. Then, the target frequency value is written to the file / sys / devices / system / cpu / cpu0 / cpufreq / scaling_setspeed. The instruction unit will encapsulate this type of system call and issue it to the kernel scheduler in sequence.
[0177] The method for calculating the gradient of the energy functional with respect to the resource density distribution function and the shape of the resource region boundary, and updating it in the direction that decreases the energy functional value, is as follows: In each iteration, for the current resource density distribution function and the resource region boundary, the variational principle is used to calculate the first variation of the energy functional with respect to the resource density distribution function, and the boundary gradient with respect to the shape of the resource region boundary; The first variational density gradient field is used to represent the effect of increasing or decreasing the unit resource density at each point on the blackboard plane on the energy functional value. The boundary gradient indicates the rate of change of the energy functional value as each point on the boundary moves along the normal direction. The resource density distribution function is updated by subtracting the update amount determined by the product of the preset step size and the density gradient field from the current resource density distribution function value, and by projecting the result to the feasible solution space that satisfies the total resource constraint after each update step.
[0178] The points on the boundary of the resource region are moved along the normal direction. The moving distance is determined by the product of the preset step size and the boundary gradient. The moving direction is consistent with the direction that makes the energy functional value decrease, thereby updating the shape of the boundary of the resource region.
[0179] In this application, a preferred implementation method for a topological unit includes: At the start of each iteration, given the resource density distribution and resource region boundary shape for the current iteration, the topology unit needs to analyze the sensitivity of the energy functional to changes in these two optimization variables.
[0180] When the resource density at any point on the blackboard plane changes, the energy functional value is calculated using the variational principle, and the output is the first variation. After the calculation, a density sensitivity field covering the entire blackboard plane is obtained. A positive value in the density sensitivity field at each location indicates that increasing the resource density at that location will lead to an increase in the energy functional value, while a negative value indicates that increasing the resource density at that location will lead to a decrease in the energy functional value.
[0181] Topological cell calculations represent the rate of change of the energy functional at any boundary point when any point on the boundary of a resource region moves along the normal direction. The change in the energy functional when the current point moves a unit distance along the outward normal direction is represented by a positive value indicating that moving outward will increase the energy, and a negative value indicating that moving outward will decrease the energy.
[0182] After obtaining the density sensitivity field, update the resource density distribution according to the principle of reducing energy: At each location point, the update direction is opposite to the direction of the density sensitivity field, and the update magnitude is determined by the product of the preset global step size parameter and the sensitivity value at that point. The larger the absolute value of the sensitivity, the greater the adjustment magnitude.
[0183] Subtract the calculated update magnitude from the current resource density distribution function value to obtain a temporary, updated density distribution.
[0184] Furthermore, the system performs a projection operation to adjust the temporary density distribution to a feasible solution set that satisfies the preset total resource constraint. One specific implementation method includes calculating the total resource quantity of the temporary distribution, and then globally scaling the density values of all points according to the ratio of the fixed total resource quantity to the actual total quantity to ensure that the total resource quantity remains constant.
[0185] After obtaining the boundary sensitivity function, the boundary shape evolves according to the principle of reducing energy: For each point on the boundary, the direction of movement is determined by the boundary sensitivity value of the current point. If the sensitivity is negative, it means that moving along the outer normal direction can reduce energy, so the point moves outward; if the sensitivity is positive, it means that moving along the outer normal direction will increase energy, so the point moves inward, that is, along the inner normal direction.
[0186] The distance moved is determined by the product of the preset global step size parameter and the absolute value of the boundary sensitivity of the point. The larger the absolute value of the sensitivity, the longer the distance the current point needs to move in this iteration.
[0187] A preferred method for representing and manipulating continuous boundary curves includes: The boundary is described by an auxiliary function defined on the entire blackboard plane. The boundary is defined as the set of all points where the auxiliary function takes a certain fixed value. For example, the energy functional can be transformed into a level set function. The boundary evolution is transformed into updating the entire level set function field by solving partial differential equations.
[0188] The instruction unit discretely samples and quantizes continuous control quantities to generate a sequence of underlying hardware control instructions, which are then issued for execution. Figure 4 As shown, K_w is .
[0189] The continuous control quantity is sampled on the spatial coordinates of the corresponding physical computing resource node to obtain the discrete control value of each physical computing resource node. The discrete control values are quantized and encoded according to a preset hardware instruction format; The encoded discrete control values are assembled into a sequence of underlying hardware control instructions according to the execution timing. The instruction sequence is sent to the kernel scheduler and hardware driver of the smart blackboard operating system.
[0190] The instruction unit first needs to associate the continuous control quantities output by the control unit, which are defined in the abstract control space or functional dimension, with specific physical computing resource nodes and perform discretization sampling.
[0191] The instruction unit sets up a resource mapping table to record the unique identifier of each controllable physical computing resource node in the system, its corresponding hardware driver control interface, and the logical coordinates or indexes of the physical computing resource node in the state space model or optimization field used by the control unit.
[0192] For continuous control quantities output by the control unit, such as a target trajectory describing changes in resource quotas for each logical region, the instruction unit samples the data at the logical coordinates corresponding to each physical computing resource node according to the resource mapping table. The sampling action involves reading the instantaneous value of the continuous control quantity at that logical coordinate point. For example, for a continuous curve representing the computing power quota of region A, at time t, the logical coordinates of all CPU cores and GPU clusters in that region are sampled to obtain the discrete target control value for each specific core or cluster at time t.
[0193] The sampled discrete target control values need to be converted into control commands in a specific format that the hardware can accept.
[0194] According to the specifications of each hardware control interface, high-precision discrete target control values are quantized into a finite number of discrete levels. For example, a CPU frequency regulator may only support a few levels with a step size of 100MHz, so a scaling factor of 0.75 will be quantized to the closest supported level.
[0195] The quantized values are encoded according to the instruction format required by the hardware interface and encapsulated into the original instruction data packet, including: The opcode specifies the operation type.
[0196] The target identifier specifies the specific hardware resource.
[0197] Enter the quantized control values into the parameter data.
[0198] Verification information, such as CRC checksums, ensures transmission integrity.
[0199] For example, instructions issued through system calls are encoded as specific data structures and ioctl parameters; instructions that directly write to registers are encoded as a binary combination of the target address and the data.
[0200] A single control moment may involve a parallel sequence of underlying hardware control instructions for multiple heterogeneous resources. The instruction unit needs to assemble these instructions appropriately and arrange their issuance timing.
[0201] The instruction unit analyzes the dependencies between instructions and hardware timing constraints. For example, before setting new bandwidth for the memory controller, it may be necessary to pause related accesses; when allocating computing power to different clusters of GPUs, instructions may need to be issued in a specific order to avoid conflicts, and these constraints can be pre-set in the metadata of the resource mapping table.
[0202] Based on dependencies and timing constraints, the encoded instructions are sorted to form an ordered instruction list.
[0203] The sorted instruction list is combined with necessary synchronization and delay instructions to finally package it into a low-level hardware control instruction sequence with timing information. The low-level hardware control instruction sequence specifies at what time, to which hardware, and what data in what format is sent.
[0204] After generating the instruction sequence, the instruction unit is responsible for reliably issuing it and monitoring the execution status.
[0205] The instruction unit also selects the appropriate communication channel based on the instruction type and target: For example, resource management instructions involving task scheduling and priority adjustment are submitted to the kernel scheduler through system calls provided by the operating system.
[0206] Specific hardware parameter configuration commands are issued through the interface with the device driver.
[0207] For scenarios with extremely high performance requirements, under the premise of ensuring safety, it may be possible to write directly to hardware registers through memory-mapped I / O.
[0208] The instruction unit sends the instruction sequence through the aforementioned channels, in a sequential or batch manner, to the target.
[0209] After a critical instruction is issued, the instruction unit checks whether the instruction has been successfully received and executed by reading the hardware status register or the driver return code. If a timeout or error occurs, the instruction unit will retry, record the error, or report the exception to the upper-level module.
[0210] The method for representing total resource constraints is as follows: =R, where R is the total resource constraint and is consistent with the total resource amount.
[0211] It should be noted that the bandwidth parameter σ is determined based on the physical precision of the interactive event. A value that allows discrete events to transition smoothly without producing excessive ambiguity should be selected through calibration experiments.
[0212] The diffusion coefficient D and attenuation rate λ are determined through system identification. Under the standard interactive test sequence, the spatiotemporal distribution data of the actual resource load are collected as a benchmark. In the parameter space, the grid search method is used to find the (D,λ) combination that minimizes the root mean square error between the output of the field solution model and the benchmark data.
[0213] System matrices A and B are identified online using the recursive least squares method. During the system initialization phase, small-amplitude pseudo-random signals are injected into the control variables, and the response data of the state variables are collected. Matrices A and B are estimated and updated in real time using the RLS algorithm.
[0214] It is important to note that the constructions and arrangements of this application shown in several different exemplary embodiments are merely illustrative. Although only two embodiments are described in detail in this disclosure, those who consult this disclosure will readily understand that many modifications are possible without substantially departing from the novel teachings and advantages of the subject matter described in this application. These modifications may include, for example, changes in the size, dimensions, structure, shape, and proportions of various elements, as well as parameter values (e.g., temperature, pressure, etc.), installation arrangements, the use of materials, colors, orientations, etc. For example, an element shown as integrally formed may be composed of multiple parts or elements, the position of elements may be inverted or otherwise altered, and the nature or number or position of discrete elements may be changed or altered. Therefore, all such modifications are intended to be included within the scope of this application. The order or sequence of any process or method steps may be changed or rearranged by alternative embodiments. Any "apparatus plus function" clause is intended to cover, and not only structurally equivalent but also equivalent structures, the structures performing the functions described herein. Other substitutions, modifications, alterations, and omissions may be made in the design, operation, and arrangement of the exemplary embodiments without departing from the scope of this application. Therefore, this application is not limited to a particular embodiment, but extends to various modifications that still fall within the scope of the appended claims.
[0215] Furthermore, in order to provide a concise description of exemplary embodiments, not all features of actual embodiments (i.e., those features that are not relevant to the best mode of performing this application as currently considered, or those features that are not relevant to implementing this application) may be omitted.
[0216] It should be understood that numerous specific implementation decisions can be made during the development of any practical implementation, such as in any engineering or design project. Such development efforts may be complex and time-consuming, but for those of ordinary skill in the art who benefit from this disclosure, the development effort will be a routine task in design, manufacturing, and production without requiring extensive experimentation.
[0217] It should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application, and all such modifications and substitutions should be covered within the scope of the claims of this application.
Claims
1. A blackboard interactive resource scheduling and optimization system, characterized in that, include: The field mapping unit extracts discrete interaction events from the multimodal sensing data stream of the blackboard and converts the interaction events into a continuous demand density distribution field and resource capability potential field on the two-dimensional plane of the blackboard. The field solution unit receives the demand density distribution field and the resource capability potential field, and solves the system of partial differential equations that includes the demand diffusion and decay equation, the resource capability potential field Poisson equation, and the nonlinear coupling reaction term of demand and resources to obtain the current state of the demand density distribution field and the resource capability potential field. The topology unit receives the current state of the demand density distribution field and the resource capability potential field, and solves for the optimized resource density distribution and the matching resource region topology by minimizing the energy functional. The control unit is used to receive the optimized resource density distribution and the current demand density distribution field, and generate continuous control quantities for resource scheduling; The instruction unit is used for discrete sampling and quantization encoding of continuous control quantities, generating a sequence of underlying hardware control instructions and issuing them for execution.
2. The interactive resource scheduling and optimization system for a blackboard as described in claim 1, characterized in that: The discrete interactive events include touch point sequences, handwriting trajectories, voice command segments, or gesture image frames; Interactive events are parsed into position coordinates and demand characteristics on a two-dimensional blackboard plane, and the position coordinates and demand characteristics are converted into a continuous demand density distribution field; Obtain the layout and status of the blackboard physical computing resources, and construct the resource capability potential field; The demand density distribution field is used to represent the intensity of task demand at different points in space at different times. The resource capability potential field is used to represent the computational resource supply capability of each point in space.
3. The interactive resource scheduling and optimization system for a blackboard as described in claim 2, characterized in that: The method for constructing the demand density distribution field includes: establishing a coordinate system for a two-dimensional blackboard plane; determining a bandwidth parameter that characterizes the degree of density smoothness; for each point on the plane, calculating the sum of the density contributions of all event location coordinates to the current point, and obtaining the demand density value of the current point; traversing all points on the plane to form a continuous scalar field characterizing the distribution of task demand intensity, i.e., the demand density distribution field. The resource capability potential field construction method includes: acquiring the hardware layout and real-time performance status of physical computing resources in the blackboard; assigning a scalar value representing the resource supply capacity near each point on the plane according to the hardware layout and the performance status; and constructing a continuous resource capability potential field in space corresponding to the demand density distribution field.
4. The interactive resource scheduling and optimization system for a blackboard as described in claim 1, characterized in that: The method for constructing the system of partial differential equations includes: The demand diffusion and decay equation is used to describe the spatial diffusion and time decay characteristics of task demands on the blackboard plane. The Poisson equation for the resource capability potential field is used to calculate the resource capability potential field based on the density distribution of resources in physical calculations. The nonlinear coupling reaction term of demand and resources is embedded in the demand diffusion and decay equation and the resource capacity potential field Poisson equation in a product form to express the feedback effect of high task demand on resource consumption.
5. The interactive resource scheduling and optimization system for a blackboard as described in claim 4, characterized in that: The blackboard two-dimensional plane is discretized into a uniform computational grid. The continuous demand density distribution field and resource capability potential field are sampled respectively, and the discrete values of demand density and resource capability potential field are obtained at the grid nodes respectively. At each computation time step, based on the partial differential equations, the demand density and resource capability potential field at each grid node at the current time are used to calculate the demand density update and resource capability potential field update at each grid node at the next time step. By iteratively advancing multiple time steps until the absolute values of the demand density update and the resource capability potential field update are less than the preset convergence thresholds, the discrete values of demand density and resource capability potential field on each grid node are output.
6. The interactive resource scheduling and optimization system for a blackboard as described in claim 5, characterized in that: The final discrete values of demand density and resource capability potential field output by the field solving unit at each grid node constitute the current state of the demand density distribution field and the resource capability potential field. The current state is used to characterize the instantaneous stable field distribution state reached by the blackboard system after diffusion, attenuation, resource constraints and nonlinear coupling effects as defined by the partial differential equation system.
7. The interactive resource scheduling and optimization system for a blackboard as described in claim 1, characterized in that: The current states of the demand density distribution field and the resource capability potential field construct the energy functional, which includes the first term and the second term; The first term is used as an integral measure of the matching error between the demand density distribution field and the candidate resource density distribution function, such that the first term is minimized when the resource distribution is more spatially matched with the task demand. The second term is used as a geometric measure of the total length or curvature of the boundary of the candidate resource region's topology, such that the value of the second term is minimized when the shape boundary of the resource region is smooth. The overall value of the energy functional is formed by the weighted sum of the first and second terms. When the minimum value of the energy functional satisfies the resource constraints, the optimal balance between task requirement coverage and topological simplicity is achieved.
8. The interactive resource scheduling and optimization system for a blackboard as described in claim 7, characterized in that: The topological unit starts with a preset initial resource density distribution and initial topological structure, and uses variational optimization to calculate the gradient of the energy functional with respect to the resource density distribution function and the shape of the resource region boundary, and updates the resource density distribution function and adjusts the resource region boundary in the direction that makes the energy functional value decrease. Repeat the iterative update process until the decrease in the energy functional or the update magnitude of the resource density distribution and topology is less than the preset convergence threshold. When the iteration terminates, the resource density distribution function at this time is output as the optimized resource density distribution; at the same time, the stable boundary shape and connection relationship at this time are output as the matched resource region topology.
9. The interactive resource scheduling and optimization system for a blackboard as described in claim 8, characterized in that: The method for calculating the gradient of the energy functional with respect to the resource density distribution function and the shape of the resource region boundary, and updating it in the direction that decreases the energy functional value, is as follows: In each iteration, for the current resource density distribution function and the resource region boundary, the variational principle is used to calculate the first variation of the energy functional with respect to the resource density distribution function, and the boundary gradient with respect to the shape of the resource region boundary; The first variational density gradient field is used to represent the effect of increasing or decreasing the unit resource density at each point on the blackboard plane on the energy functional value. The boundary gradient indicates the rate of change of the energy functional value as each point on the boundary moves along the normal direction. The resource density distribution function is updated by subtracting the update amount determined by the product of the preset step size and the density gradient field from the current resource density distribution function value, and by projecting the result to the feasible solution space that satisfies the total resource constraint after each update step. The points on the boundary of the resource region are moved along the normal direction. The moving distance is determined by the product of the preset step size and the boundary gradient. The moving direction is consistent with the direction that makes the energy functional value decrease, thereby updating the shape of the boundary of the resource region.
10. The interactive resource scheduling and optimization system for a blackboard as described in claim 1, characterized in that: The instruction unit is used to perform discrete sampling and quantization encoding of the continuous control quantity; The continuous control quantity is sampled on the spatial coordinates of the corresponding physical computing resource node to obtain the discrete control value of each physical computing resource node. The discrete control values are quantized and encoded according to a preset hardware instruction format; The encoded discrete control values are assembled into a sequence of underlying hardware control instructions according to the execution timing. The instruction sequence is sent to the kernel scheduler and hardware driver of the smart blackboard operating system.