A method for generating low-code components
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-08-11
AI Technical Summary
其缺陷主要体现在四个方面:自然语言需求、草图草案与界面层级数据分散存储,缺乏统一语义空间,导致自动推断错误率高;现有方案多使用启发式排版或模板匹配,无法针对不同设备与实时网络动态调整布局,易出现白屏或组件错位;涉及敏感字段(例如金额、身份)时通常将逻辑迁移至服务器端同态服务或受信硬件,带来网络延迟与合规负担;静态脚本通过集中式CDN分发,缺少端侧可验证机制,攻击者可篡改脚本或替换CDN版本造成供应链风险
通过正则化最优传输融合多模态特征,实现了统一语义向量与语义基元集合的自动构建,打通“语言-草图-结构”三源信息通道,提升语义解析准确性。
Smart Images

Figure CN121277491B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software engineering technology, and in particular to a method for generating low-code components. Background Technology
[0002] Low-code platforms, which assemble UI components visually, have become an important means of accelerating enterprise application development. However, traditional low-code generation chains mostly adopt a "static template + backend rendering" model: developers manually select component templates and configure attributes during design; at runtime, the backend renders the complete page based on the template and then pushes the static result to the frontend. Its shortcomings are mainly reflected in four aspects: natural language requirements, draft sketches, and interface-level data are stored in a scattered manner, lacking a unified semantic space, leading to a high error rate in automatic inference; existing solutions mostly use heuristic layout or template matching, which cannot dynamically adjust the layout for different devices and real-time networks, easily resulting in blank screens or component misalignment; when sensitive fields (such as amount, identity) are involved, the logic is usually migrated to homomorphic services or trusted hardware on the server side, bringing network latency and compliance burdens; static scripts are distributed through centralized CDNs, lacking end-side verifiable mechanisms, allowing attackers to tamper with scripts or replace CDN versions, causing supply chain risks. Summary of the Invention
[0003] To address the numerous problems existing in the prior art, this invention provides a low-code component generation method. This invention uses regularized optimal transmission to align multimodal features and generate a unified semantic vector to drive conditional diffusion layout; it uses differentiable Boolean gradients and power spectrum-excited random walks to determine component subgraphs; it homomorphically vectorizes privacy functions and compiles them with ordinary functions; it achieves trusted delivery through STARK folding proofs and content addressing; and it uses dynamic pattern decomposition to predict network conditions and adaptive prefetching on the browser side.
[0004] A method for generating low-code components includes the following steps: Semantic parsing, shape feature extraction, and structure embedding are performed on natural language, sketch, and interface structure data. Features are aligned and fused through regularized optimal transport to generate a unified semantic vector and a set of semantic primitives. The layout is generated by a conditional diffusion model driven by a unified semantic vector. In the de-diffusion stage, the gradient is injected, which is composed of a set of semantic primitives and obtained by a differentiable Boolean satisfiability network. The layout power spectrum excitation element component hypergraph random walk is combined to determine the component subgraph and its interface constraints. Privacy functions in the component subgraph are identified based on interface constraints. The privacy functions are vectorized using CKKS homomorphic encryption and then mixed with the remaining functions according to the compilation strategy determined by Bayesian optimization to generate a mixed bytecode package containing a homomorphic memory area. At the same time, a corresponding folded zero-knowledge security proof is generated. The content identifier is obtained by calculating the content hash of the hybrid bytecode packet and the security proof. The corresponding data is uploaded to the decentralized file system and the metadata is registered on the blockchain. After downloading and verifying the security proof with the help of the browser service worker thread, the hybrid bytecode packet is executed in the isolated running environment. The network latency is predicted based on the current round-trip latency and frame rate and the component prefetching strategy is adjusted. The edge weights of the meta-component hypergraph are updated based on user interaction events.
[0005] Preferably, the conditional diffusion model generates noise vectors in the forward diffusion stage with step sizes that increase at equal intervals, and uses a cosine decay sequence to control the noise amplitude at each step.
[0006] Preferably, Gumbel-Softmax relaxation is used when converting the set of semantic primitives into a continuous probability distribution during the de-diffusion stage, and the temperature parameter is reduced linearly in each iteration until convergence.
[0007] Preferably, the layout power spectrum is generated by the amplitude information obtained by performing a two-dimensional discrete Fourier transform on the layout image, and the amplitude information is used as the excitation signal input component of the hypergraph random walk solver.
[0008] Preferably, the homomorphic encryption vectorization adopts the Remainder Field Decomposition Homomorphic Encryption Scheme CKKS, and when generating the hybrid bytecode packet, an independent homomorphic linear memory area is configured for the privacy function to store the ciphertext data.
[0009] Preferably, the hybrid compilation process first performs loop vectorization optimization on the intermediate code, and then generates the target bytecode through a WebAssembly backend that supports garbage collection extensions.
[0010] Preferably, the zero-knowledge security proof adopts the Scalable Transparent Knowledge Argument STARK, and merges the fragmented proofs of each function into a single root proof through a three-level recursive folding method.
[0011] Preferably, the content hash is generated using the BLAKE3 algorithm, and the decentralized file system uses a content addressing mechanism to store the hybrid bytecode packet and security proof.
[0012] Preferably, the browser service worker thread collects round-trip latency and frame rate metrics through the Berkeley packet filter and the WebAssembly bridging mechanism, and updates the dynamic mode decomposition operator based on the metrics after each rendered frame.
[0013] Preferably, a two-layer graph convolutional network is used when embedding the user interface structure data, and the root node embedding vector of the graph convolutional network is used as the representation of the user interface structure.
[0014] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows: By incorporating multimodal features through regularized optimal transmission, the system automatically constructs a unified semantic vector and a set of semantic primitives, opening up the three-source information channels of "language-draft-structure" and improving the accuracy of semantic parsing.
[0015] By coupling conditional diffusion, differentiable Boolean gradient, and power spectrum random walk, high-fidelity and adaptive layout reasoning is achieved, reducing white screen rate and maintaining visual balance in weak network and multi-terminal environments.
[0016] By using CKKS homomorphic encryption vectorization and Bayesian optimized compilation chain, the browser side achieves full-ciphertext computation of privacy functions, while ordinary functions are optimized through vectorization, thus balancing security and performance.
[0017] By using STARK recursive folding and BLAKE3 content addressing delivery, we achieve rapid end-side verification without a trusted center, block script supply chain attacks, and provide version-unambiguous differential update capabilities.
[0018] By implementing a Berkeley packet filtering-dynamic pattern decomposition closed loop, a real-time network adaptive prefetching strategy is achieved, which further reduces interaction latency and feeds back the self-evolution of hypergraph edge weights. Attached Figure Description
[0019] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a schematic diagram of multimodal feature alignment in this invention; Figure 3 This is a schematic diagram of homomorphic compilation and proof generation in this invention. Detailed Implementation
[0020] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation.
[0021] like Figure 1 As shown, a low-code component generation method includes the following steps: Semantic parsing, shape feature extraction, and structure embedding are performed on natural language, sketch, and interface structure data. Features are aligned and fused through regularized optimal transport to generate a unified semantic vector and a set of semantic primitives. like Figure 2As shown, the goal of this step is to utilize multimodal alignment technology to transform three types of heterogeneous information—natural language descriptions, sketches, and interface structures—into a unified semantic vector, and simultaneously output a set of semantic primitives to provide differentiable and consistent conditional vectors for the subsequent low-code component generation process. The system constructs three processing links respectively, and then uses a regularized optimal transmission method to complete cross-modal fusion.
[0022] The natural language processing link first uses a fractal parser to break long sentences down into phrases of no more than 8 words, avoiding gradient decay caused by long-distance dependencies. Each phrase is then processed by a context-attention encoder to obtain a dense vector, and this vector sequence is integrated into a sentence-level representation through gated average pooling. The sketching link uses contour scanning to extract closed curves, and then calculates the Laplacian eigenvalue vector of the curve. This vector is invariant to rotation, translation, and scale, and can stably describe similar graphics under different drawing styles. The interface structure link parses hierarchical JSON into an abstract syntax tree, propagates neighborhood information through a two-layer graph convolutional network, and outputs structural embeddings at the root node, thereby capturing component hierarchy and attribute aggregation features.
[0023] The three vectors enter the cross-modal fusion stage. System construction cost matrix. , of which elements In the entropy regularization factor Solving the optimal coupling matrix under control The formula is as follows: ; In the formula Indicates the first vectors With the vectors Alignment quality allocation, This represents the matrix inner product. A stable solution can be obtained through 30 Sinkhorn iterations. After obtaining the coupling matrix, the system performs a bidirectional weighted summation of the three vectors according to their weights to generate a unified semantic vector. : ; in and The feature vectors are taken from different modalities. The unified semantic vector is differentiable and can be directly used as the text modulation input for the conditional diffusion model.
[0024] In parallel, the system records language phrases, shape curve indices, and interface syntax nodes as a unified set of semantic primitives. Each element in the set corresponds to a gate variable in the differentiable Boolean satisfiability network. The gate variable generates a gradient during the inverse diffusion process, which guides the component layout to satisfy logical constraints.
[0025] This fusion mechanism has two core effects: First, it significantly improves the convergence speed of layout generation, reducing the number of back-diffusion steps from 100 to 75 steps under the same hardware configuration in internal experiments. Second, it improves the semantic consistency of component subgraphs, with an average matching score improvement of 22% in 100 randomly selected user input scenarios. For example, in the "scrolling news card" scenario, after aligning the input text with the sketch, the system generates a subgraph containing three components—scrolling container, title text, and timestamp—in one go, and accurately provides vertical scrolling interface constraints, demonstrating the application value of this step in low-code generation.
[0026] The layout is generated by a conditional diffusion model driven by a unified semantic vector. In the de-diffusion stage, the gradient is injected, which is composed of a set of semantic primitives and obtained by a differentiable Boolean satisfiability network. The layout power spectrum excitation element component hypergraph random walk is combined to determine the component subgraph and its interface constraints. This step transforms the unified semantic vector obtained in the previous stage into structurally complete and semantically consistent component subgraphs, while simultaneously providing interface constraints between the subgraphs. To achieve this goal, this invention designs three tightly coupled sub-mechanisms: conditional diffusion layout generation, differentiable Boolean satisfiability gradient injection, and meta-component hypergraph random walk. These three mechanisms share gradient signals and frequency domain features, maintaining the differentiability advantage of continuous optimization while incorporating discrete logic and topological information, ultimately resulting in a low-code component layout that meets business requirements and is easy to redevelop.
[0027] Conditional diffusion layout generation employs a diffusion-denoising dual framework. In the forward diffusion phase, noise tensors are sampled from a standard normal distribution, and... Noise is gradually injected into the target space within a certain number of steps. The noise attenuation factor sequence is denoted as... ,in Using the cosine function in the interval Equal-distance sampling ensures a smooth decrease in noise energy. In the back-diffusion stage, the learned noise predictor is used for reverse denoising. A unified semantic vector is injected as text modulation input across the attention layer, guiding the noise predictor to favor a semantically consistent layout in each estimation step. This allows the generated results to gradually approach the target distribution in early iterations, reducing ineffective searches.
[0028] In the reverse diffusion process, this invention introduces differentiable Boolean satisfiability gradient injection to embed discrete business rules. The semantic primitive set is first mapped to a set of Boolean variables through a dictionary, with each variable corresponding to a continuous gating value. The Gumbel-Softmax relaxation method is used to smooth the originally discrete Boolean clauses to the real number domain. For the ... Items Define relaxation probability Temperature parameters are The reverse diffusion iteration starts from... linearly reduced to This balances exploration and convergence. Differentiable Boolean networks employ the following loss: ; in The gradient of the noise tensor can be calculated. The system will... Multiply by the fine-tuning factor This is then superimposed onto the current noise tensor to achieve closed-loop control of the continuous generation process by discrete logic, avoiding manual rework due to logic conflicts in the later stages.
[0029] The visual density generated by the layout is often not perfectly synchronized with semantic consistency. Therefore, this invention adds a hypergraph random walk mechanism for meta-components. In each inverse diffusion step, the system renders the current layout as a grayscale matrix, performs a two-dimensional discrete Fourier transform to obtain an amplitude matrix, and sums the amplitudes along the frequency dimension to form a one-dimensional power spectrum sequence. This power spectrum, after normalization, serves as the external excitation vector. In the pre-constructed meta-component hypergraph, each node represents a component prototype, and hyperedges represent composable patterns. Define the hypergraph transition matrix. Matrix elements This indicates that nodes on the same hyperedge Jump to node The probability of a random walk. Random walks follow this principle: ; in It is a node activation probability vector. The persistence coefficient. When the distance of the first norm... Five consecutive times less than Convergence is determined by selecting the highest activation probability among the top-ranked activations. Each node and its associated hyperedge constitutes a component subgraph. Since the power spectrum reflects the frequency domain density distribution of the layout, this method can automatically avoid stacking too many large-area components or leaving blank blocks in the same area, thus improving visual balance.
[0030] Interface constraints are automatically generated after the subgraph is determined. Structural constraints represent parent-child, parallel, and dependency relationships, derived from hyperedge attributes; behavioral constraints are output by the differentiable Boolean network when the loss converges, specifying the input and output conditions of components. These constraints are serialized into key-value pairs, directly available for reading in the subsequent homomorphic compilation stage.
[0031] In the news feed scenario, the user inputs the text "scroll to display a list of news titles." A vertical rectangle is drawn in the sketch, and a container node without a specified type is declared in the JSON structure. The system first outputs a unified semantic vector, with its high-weighted dimensions mapped to three semantic categories: "list," "scroll," and "text." After ten backdiffusion iterations, the layout generation model produces a vertical strip layout. Gated gradients assign high weights to the "scroll" and "container" variables. A random walk then selects the scroll container, title text, and time tag nodes, and writes the vertical scroll attribute into the interface constraints. Compared to the manual drag-and-drop solution, the automated process saves approximately 40% of the layout adjustment time, and the missing interface constraint rate decreases from 18% to 3%.
[0032] Preferably, the conditional diffusion model generates noise vectors in the forward diffusion stage with step sizes that increase at equal intervals, and uses a cosine decay sequence to control the noise amplitude at each step.
[0033] In the low-code component generation process of this invention, conditional diffusion layout generation undertakes the key task of transforming a unified semantic vector into a visual layout. To ensure stable convergence of the diffusion process and explicit carrying of semantic information in the early stages, this step generates noise vectors with equally spaced incremental step sizes during the forward diffusion phase and uses a cosine decay sequence to control the noise amplitude at each step. Simultaneously, during the reverse diffusion phase, a differentiable Boolean constraint gradient obtained by mapping the semantic primitive set is dynamically injected to ensure that the layout achieves consistency in both visual structure and business logic.
[0034] In principle, the diffusion-denoising framework is a generative model that progressively replaces noise and reconstructs the target distribution. Let the total number of forward diffusion steps be denoted as... , positive first Step noise intensity coefficient is ,in The following formula is given: ; in The monotonically decreasing property of the cosine function allows for the rapid injection of high-energy noise in the early stages, while maintaining low-energy correction in the later stages, thus preserving the model's exploratory capabilities and avoiding distortion at the end. (Noise vector) The generation follows: ; in The noise tensor from the previous time step. An independent Gaussian tensor with zero mean and unit variance. Because The parsed form can be directly calculated. This scheduling does not introduce additional learnable parameters and is easy to deploy on the browser side.
[0035] When entering the de-diffusion phase, discrete business logic needs to be embedded into continuous noise updates. The semantic primitive set is first converted into a Boolean variable set through dictionary lookup. Each Boolean variable is relaxed to a differentiable gated value using Gumbel-Softmax relaxation. Its expression is: ; in Let the initial probability of the variable be , For independent Gumbel noise, This is a temperature parameter. This embodiment employs a linear annealing strategy, which, during iteration, [details omitted]. The value was reduced from 1.0 to 0.1 to balance exploration and convergence. A differentiable Boolean loss was constructed based on the gate value: ; in Indicates the first The set of variable indices involved in each clause. The gradient of the current noise tensor is calculated and then multiplied by a scaling factor. This information is then superimposed on the noise gradient to achieve real-time correction of the layout generation direction by the logical constraints. The advantage of this approach is that it eliminates the need to explicitly enumerate all constraint-satisfied paths; instead, it directly integrates constraint information into gradient descent, ensuring consistent convergence between continuous optimization and discrete constraints.
[0036] To further ensure a balanced spatial distribution of the visual layout, this invention calculates the layout power spectrum at the end of each iteration of the inverse diffusion. Specifically, the current layout is rendered as a binary image, and a two-dimensional discrete Fourier transform is performed on the image to obtain the amplitude matrix. Summing along all radial frequencies yields a one-dimensional power spectrum vector. and will Normalized to an excitation signal. This signal is input to the hypergraph random walk model of the component: let the random walk state vector be... The transition matrix is ,but: ; in A persistence coefficient is set based on experience. The component node with the highest activation probability and its associated hyperedge are selected into the component subgraph. This process maps the frequency domain energy distribution to component topology selection, significantly reducing the probability of excessive blank space or overcrowding in the initial screen layout.
[0037] In terms of implementation details, the noise tensor dimension is consistent with the layout resolution, using 512×320 pixels, which can maintain a video memory usage of no more than 4GB within a single graphics processing unit. Differentiable Boolean network loss weights. Automatic search in the range of 0.001 to 0.01 using cross-validation. Random walk durability coefficient. Setting it to 0.85 allows convergence within 5 iterations. All gradient calculations are performed based on an automatic differentiation framework, facilitating the enabling of half-precision inference acceleration on the edge.
[0038] The application effectiveness has been verified through multiple rounds of A / B testing. In 50 real-world business scenarios, the model using this noise scheduling and gradient injection scheme reduced the average number of backdiffusion steps from the baseline of 100 steps to 70 steps, shortening inference time by approximately 30%. Logical consistency, measured by the gated variable reconstruction rate, improved from 0.78 to 0.94. Visual balance, assessed using a five-level expert rating system, saw its average score increase from 3.6 to 4.4. Taking the "scrolling news card" scenario as an example, the traditional diffusion model still retains significant noise at step 12, resulting in blurred layout boundaries. This method, however, rapidly reduces early noise amplitude with cosine decay and is guided by Boolean gradients, resulting in a clear list container outline by step 8. After 10 steps, it stably outputs a complete subgraph with timestamps and title text. The interface constraint file automatically declares the scrolling direction as vertical and the update cycle as a constant one second, requiring no manual adjustment.
[0039] In summary, through the three collaborative mechanisms of cosine decay noise scheduling, Gumbel-Softmax gradient injection, and power spectrum excitation random walk, this invention achieves fast, interpretable, and logically constrained automatic layout generation in low-code scenarios, laying a strong consistency foundation for subsequent homomorphic compilation and decentralized deployment, and has high industrial application value.
[0040] Preferably, Gumbel-Softmax relaxation is used when converting the set of semantic primitives into a continuous probability distribution during the de-diffusion stage, and the temperature parameter is reduced linearly in each iteration until convergence.
[0041] This invention requires mapping the discrete semantic primitive set to a differentiable continuous probability distribution during the reverse diffusion stage of low-code component generation. This allows the generation network to simultaneously optimize visual layout and business logic during gradient descent. To achieve this, the system uses the Gumbel-Softmax relaxation technique to transform each Boolean variable gating value into a continuous gating probability following a smooth distribution, thereby avoiding the gradient non-transferability phenomenon caused by traditional hard gating. Specifically, let the semantic primitive set contain... There are n Boolean variables, and the prior probability of each variable is denoted as . Introduce corresponding independent Gumbel noise The temperature parameter is denoted as... Writing the relaxation formula: ; in, , For the first The continuous probability outputs of each variable provide a smooth gradient for the noise tensor during backpropagation. In the formula... This means taking the logarithm of the prior probability. It follows a standard Gumbel distribution. The sharpness of the distribution needs to be controlled. Excessive temperature can cause the distribution to become too smooth, affecting separability, while excessively low temperature can cause gradient vanishing. Therefore, this invention employs a linear annealing strategy, reducing the total number of anti-diffusion steps... Internal temperature parameter execution: ; in , , This ensures both sufficient search space in the early stages and that the probability of convergence in the later stages is close to that of one-hot encoding, which is beneficial for logical decision-making.
[0042] Gating vectors with continuous probability Substituting the differentiable Boolean satisfiability loss function, we construct the clause violation degree: ; in For the number of clauses, Indicates the first The clause contains a set of variable indices. When the clause satisfies a condition, the internal sum is not less than 1, and the violation degree is 0; when the clause does not satisfy a condition, the violation degree is positive and a negative gradient is generated on the noise tensor. This is calculated in each inverse diffusion iteration. The noise gradient is added to the system to dynamically narrow the layout representation to the logically feasible solution.
[0043] At the implementation level, temperature-based linear annealing only depends on the current step index, resulting in extremely low computational cost; Gumbel noise can be sampled and reused once using a pseudo-random number generator. The gating probability and loss gradient calculations are both automatically performed by the automatic differentiation framework, eliminating the need for manual differentiation.
[0044] In terms of performance, in evaluations of 50 real-world business scenarios including scrolling lists, paginated cards, and modal dialog boxes, the introduction of the aforementioned relaxation and annealing strategies reduced the interface constraint violation rate from 18% to 3%, and shortened the average number of steps for back-diffusion from 100 to 72. Taking the "scrolling news list" scenario as an example, the system forms the vertical container outline in step 10 and outputs a complete component subgraph containing scrolling attributes in step 15, while the baseline without relaxation requires 25 steps to achieve the same level of logical consistency.
[0045] In summary, by using Gumbel-Softmax relaxation and linear temperature annealing, this invention achieves deep coupling between discrete logic and continuous noise while maintaining gradient propagation, significantly improving the speed and accuracy of low-code component layout generation.
[0046] Preferably, the layout power spectrum is generated by the amplitude information obtained by performing a two-dimensional discrete Fourier transform on the layout image, and the amplitude information is used as the excitation signal input component of the hypergraph random walk solver.
[0047] This invention utilizes the layout power spectrum to guide random walks of meta-component hypergraphs, automatically selecting component combinations that match the visual density. The overall process consists of six steps: layout rendering, two-dimensional discrete Fourier transform, power spectrum construction, excitation vector normalization, random walk iteration, and subgraph extraction.
[0048] The system first places the inverse diffusion network in the second... The layout generated in each step is rendered as a grayscale matrix. The rendering process only preserves the component outlines, setting all internal pixels to 1 and background pixels to 0, so that frequency domain energy is concentrated on boundary information; the rendering resolution is fixed. Pixels correspond to the aspect ratio of the design canvas, ensuring frequency domain resolution while controlling video memory usage. To enhance sensitivity to fine-grained structures, Sobel gradient filtering is applied to the matrix after rendering to highlight high-frequency edges. The resulting matrix... Then, the system performs a two-dimensional discrete Fourier transform to obtain the complex frequency domain matrix. The magnitude matrix is defined as follows: ; in This represents the complex modulus. Each element in the amplitude matrix reflects the contribution of the corresponding frequency to the image energy. To transform the two-dimensional frequency domain into one-dimensional statistics, the system obtains the power spectrum vector by integrating concentric circles from the center outwards. , This is the discrete radius index. The power spectrum represents the energy distribution of the array at different frequency bands, with high-frequency peaks indicating densely detailed regions and low-frequency peaks corresponding to large areas. The power spectrum is then normalized to obtain the excitation vector: ; Its elements sum to 1, which makes it easy to integrate with probability vectors.
[0049] Meta-component hypergraph Building a node set during the offline phase. Includes all meta-component prototypes and hyper-edge collections. Describe composable patterns (e.g., if a scrolling container and a card share the same hyperedge, they can be combined to form a list). Define the transition matrix for continuous random walks on the hypergraph. ,element This indicates that nodes are located inside the same hyperedge. Jump to node The probability. Matrix The node activation probability vector is obtained by normalizing the nodes inside the hyperedge by degree, ensuring that the row sum is 1. The system initializes the node activation probability vector to a uniform distribution. At the end of each reverse diffusion step, perform the following: ; in The durability coefficient was set in the experiment. The first term inherits the historical activation state, and the second term injects the normalized power spectrum. The algorithm iterates until... Five consecutive occurrences are considered convergence. At this point, activation is determined. The largest front Each node and its associated hyperedge constitutes a component subgraph. Setting the canvas size and estimated component density to 20 is sufficient to cover common information flow layouts without causing redundancy.
[0050] The key principle of the frequency domain excitation mechanism lies in the fact that the power spectrum can characterize the global spatial frequency of the layout. Dominance of low-frequency energy indicates that the layout mainly consists of large blocks, requiring the selection of container-type components; dominance of high-frequency energy indicates that the layout contains a large number of small elements, making card or grid components more suitable. Using the power spectrum as an external excitation for random walks is equivalent to injecting visual density driving force into the topology search, ensuring that the final subgraph's visual distribution is consistent with the level of layout detail in the current noise recovery. For example, when the high-frequency peaks of the power spectrum are significant, random walks tend to activate compact components such as horizontal cards and tabs; when the low frequencies of the power spectrum dominate, large-area text and image containers are preferred, thus reducing the appearance of holes or crowding on the first screen.
[0051] At the implementation level, to avoid performance bottlenecks caused by the browser-side 2D Discrete Fourier Transform, the system uses a Fast Fourier Transform library encapsulated in WebAssembly. Transforming a 512×320 matrix in a JavaScript thread takes only about 6 milliseconds. Power spectrum normalization and random walk iteration are performed on the same WebGPU tensor, reducing latency through parallel multiply-accumulate operations. (Persistence coefficients...) Stored in a configuration file, it only needs to be re-evaluated when the meta-component library expands or the canvas resolution changes. This will maintain the convergence speed.
[0052] In A / B testing across three typical scenarios—news feed, image waterfall, and product list—the introduction of power spectrum excitation improved visual balance by an average of 1.2 points (out of 5) and reduced first-screen blank page time by approximately 15%. Taking the image waterfall as an example, the control group often rendered only two columns of images on the first screen, resulting in blank spaces on the left and right. Using this method, random walks activated node combinations containing three waterfall containers and progressively loading placeholders, increasing the first-screen fill rate from 64% to 92%. Furthermore, power spectrum excitation does not introduce any learnable parameters, has low maintenance costs, and can be directly migrated to new businesses.
[0053] like Figure 3 As shown, based on interface constraints, the privacy function in the component subgraph is identified, and the privacy function is vectorized using CKKS homomorphic encryption. It is then mixed with the other functions according to the compilation strategy determined by Bayesian optimization, and compiled and linked to generate a mixed bytecode package containing a homomorphic memory area. At the same time, a corresponding folded zero-knowledge security proof is generated. Once the component subgraph is determined, the interface constraints clearly define the data categories for each function's input and output. Paths containing sensitive fields such as user identity and transaction amount are marked as privacy paths. During the compilation phase, this invention first uses these tags to perform semantic-level static analysis, dividing the function set into a privacy function set and a normal function set. Then, a remainder field factorization homomorphic encryption scheme is applied to the privacy function set, and hybrid compilation, linking, and zero-knowledge proof generation are completed within the same pipeline. This process ensures that the code package loaded on the browser side maintains functional integrity while meeting the dual requirements of end-to-end data confidentiality and verifiable execution.
[0054] The homomorphic encryption vectorization of privacy functions follows the principle of separable linear operations. The symbolic layer analyzer detects linear operators such as addition, subtraction, constant-coefficient multiplication, and discrete convolution in the function body and rewrites them as a homomorphic gating instruction set. Let the sensitive input plaintext vector be... Using a coefficient modulus chain According to the remainder field decomposition scheme, Encoded as a plaintext polynomial, the ciphertext vector is obtained by a key pair generation algorithm that enables approximate numerical support: ; in This refers to the random polynomial used in the key generation process. For the first Layer modulus. In this formula... This indicates the decomposition in terms of modulus. coefficients on, This represents the homomorphic encryption result. Each encrypted operator is mapped to a homomorphic instruction set, and an independent homomorphic linear memory area is maintained in the compiler backend. During page load, browser security policies prevent ordinary instructions from writing to this memory area.
[0055] For a set of ordinary functions, the system employs a Bayesian meta-compiler to automatically search for compilation cascading strategies. First, a performance metric vector is defined. The components include the execution cycle after loop unrolling, the number of L1 cache misses, and the bytecode size. Let the policy parameter vector be... The prior distribution is an independent uniform distribution, and the posterior distribution satisfies: ; in For temperature hyperparameters, Weights are assigned to each performance metric. The posterior distribution is sampled using the Hamiltonian Monte Carlo algorithm with a trajectory step size of 0.05. During sampling, test segments are compiled and metric vectors are measured in real-time, forming a closed-loop search. Finally, the strategy combination with the highest posterior probability is selected. This strategy determines the optimization order of the front-end intermediate code, the loop vectorization depth, and the register allocation priority.
[0056] After the privacy segment and the normal segment generate their respective target intermediate representations through their respective pipelines, they are linked by an assembly backend that supports garbage collection extensions. The linker allocates fixed-length homomorphic memory pages for the privacy segment, which are restricted from access by normal load instructions through a prefix table. The normal segment uses a regular linear memory area, and its lifecycle is automatically managed by a garbage collection metadata table. The overall artifact is called a hybrid bytecode package, in which segment identifiers distinguish between the two types of function segments and their corresponding memory base addresses.
[0057] To ensure fast and correct verification on the browser side, this invention constructs a scalable and transparent knowledge proof STARK proof for each function. First, an air constraint system is generated based on the operation sequence. A trace table is obtained by expanding each function over the domain, with the number of rows rounded up to the power of two. Then, a three-level recursive folding is applied to all function proof fragments, compressing the fragment size to a single root proof. The root proof is less than 42,000 bytes in size and can be verified within 20 milliseconds using a pure WebAssembly validator in mainstream browsers.
[0058] The generated hybrid bytecode package and root proof are hashed together to obtain the content identifier, which is then uploaded to the content-addressed distributed file system. The blockchain registers transaction records containing the content identifier, component subgraph hash, and interface constraint hash to prevent version tampering. When the browser loads, it first retrieves the package body and proof; after successful verification, it instantiates the homomorphic function segment and the ordinary segment. After instantiation, the runtime table only grants homomorphic instruction permissions to the privacy segment and inserts a wrapper layer into the function call table to prevent the ordinary segment from directly passing plaintext parameters, ensuring homomorphic encapsulation consistency.
[0059] In this embodiment, the example business function set includes a monetary encryption processing pipeline and several rendering logics without sensitive data. The system statically analyzes and identifies the monetary pipeline as a privacy function, automatically inserting homomorphic addition and homomorphic constant-multiplication instructions. During the Bayesian optimization phase, a vectorized depth-four and latency-sensitive register allocation scheme is selected from 100 candidate strategies, reducing the average execution cycle of the rendering logic by 23%. The size of the linked mixed bytecode packet is approximately 1.6 megabytes, the root proof size is 41,000 bytes, and the browser verification time is 18 milliseconds. Compared to the traditional approach of uploading all logic to the cloud for encrypted computation, this invention avoids repeated remote calls, reduces first-screen latency by approximately one-third, and does not leak any sensitive monetary plaintext.
[0060] Preferably, the homomorphic encryption vectorization adopts the Remainder Field Decomposition Homomorphic Encryption Scheme CKKS, and when generating the hybrid bytecode packet, an independent homomorphic linear memory area is configured for the privacy function to store the ciphertext data.
[0061] This invention classifies component functions with interface constraints marked as "confidential" as privacy functions. In order to completely avoid plaintext leakage during the front-end execution stage, the system introduces a homomorphic encryption scheme CKKS based on remainder field decomposition for privacy functions, and allocates an independent homomorphic linear memory area for this type of function when generating mixed bytecode packets to load encryption vectors and intermediate ciphertext results.
[0062] The homomorphic encryption scheme CKKS is suitable for approximate numerical operations and supports addition and constant multiplication in the ciphertext field. The descriptive vector is... The system completes encoding and encryption according to the following steps: First, select the polynomial order. (value) ) and modular chain (Each modulus is approximately 40 bits), and then the real number vectors are mapped to coefficient vectors using embedding based on remainder field decomposition. The encoding process can be represented as: ; in This is a scaling factor used to amplify the value before encryption to suppress rounding errors. The key generation algorithm is then called to generate the public key. With private key and execute: ; In the above expression, and These represent vector encoding and encryption operators, respectively. and , The value of is declared uniformly in the compiler configuration file to ensure ciphertext compatibility between different privacy functions.
[0063] In terms of compiler pipeline modification, the symbolic layer analyzer uses data flow slicing to isolate privacy functions from ordinary functions, and then checks the operation type of each operator edge in the subgraph. If the operator satisfies the linear separability condition (addition, constant-multiplication, vector splitting, etc.), it is replaced with an equivalent homomorphic instruction; if a non-linear operation is detected, such as conditional branching or comparison operations, the analyzer automatically inserts a "decrypt-re-encrypt" placeholder and blocks the call chain through interface constraints to ensure that no sensitive plaintext flows into the ordinary segment. The replaced intermediate representation prohibits vectorization across privacy boundaries during the optimization phase to avoid register fusion leading to the cross-use of homomorphic memory areas and regular memory areas.
[0064] During the final assembly stage, the linker allocates a separate homomorphic linear memory region for the privacy segment. This memory region employs a sandbox strategy, where homomorphic instructions are written to and ordinary instructions are read only: when the browser instantiates the module at runtime, the main thread adds a non-executable flag to the homomorphic memory region's address space; any attempt to write to the ordinary segment will trigger a runtime exception. This strategy also applies to the JavaScript layer, because all access to the homomorphic memory region must go through a wrapper function, which verifies the input parameter types and blocks illegal write operations in the call stack trace.
[0065] To prove that the hybrid bytecode package is correctly executed on the browser side, this invention utilizes the Scalable Transparent Knowledge Argument STARK to generate zero-knowledge secure proofs. Each privacy function generates an air-constrained system during the intermediate representation stage, subsequently constructing a trace table and outputting fragmented proofs. Let the... The number of rows in the tracking table for the function is The size of the fragmented proof increases linearly with the number of rows. The system employs a three-level recursive folding mechanism, keeping the root proof size under 42,000 kilobytes. The browser-side validator can verify the root proof without a private key, with a verification time of approximately 18 milliseconds.
[0066] The practical effect evaluation used a financial payment prototype: the input amount vector was homomorphically encrypted and then executed in a browser pipeline, including currency conversion, transaction fee deduction, and threshold judgment. The experiment was run on a mobile device; the normal segment used a vectorization depth of 4, while the privacy segment maintained CKKS ciphertext. Results showed that compared to a purely backend encrypted calculation scheme, this invention reduced first-screen latency by approximately 35%, with a 150-millisecond reduction in network transmission overhead; compared to a local scheme without homomorphic security mechanisms, sensitive amount fields were invisible in any browser debugger, achieving zero leakage. After 10,000 transaction simulations, the error rate remained stable. Regarding memory usage, the homomorphic memory area is fixed at 4 megabits and does not dynamically expand with the ordinary segment.
[0067] By introducing CKKS homomorphic encryption vectorization based on remainder field decomposition into the privacy function and configuring a dedicated homomorphic linear memory area at the end of the compilation chain, this invention achieves end-to-end encrypted computation of sensitive data in the front-end runtime environment. Combined with zero-knowledge security proofs, this scheme combines data confidentiality and verifiability, providing solid technical support for the rapid delivery of low-code components in privacy-sensitive scenarios such as finance, e-commerce, and healthcare.
[0068] Preferably, the hybrid compilation process first performs loop vectorization optimization on the intermediate code, and then generates the target bytecode through a WebAssembly backend that supports garbage collection extensions.
[0069] The hybrid compilation process of this invention aims to obtain a bytecode package on the browser side that is both safe to load and has runtime memory reclamation capabilities in a single step, supporting incremental assembly and unloading of low-code components in dynamic scenarios. The entire process consists of a two-stage pipeline: a front-stage loop vectorization optimization and a back-stage bytecode generation that supports garbage collection extensions. The two-stage pipeline works together to improve computational density and shorten front-end execution time; on the other hand, it ensures that unused objects in the bytecode can be automatically reclaimed by the runtime during its execution lifecycle, avoiding the problem of traditional WebAssembly failing to release the memory occupied by the component tree.
[0070] The core idea of loop vectorization optimization is to expand the linear iterative patterns recognizable at the abstract syntax tree level into single-instruction multiple-data (SMD) instructions to leverage the SMD instruction set of modern processors. The system first performs a static single-assignment transformation on the intermediate code, establishing an explicit data dependency graph for each basic block, and then searches for loop inductive variables on the dependency graph. If the inductive variable is detected to have an increment step of 1, and there are no cross-iteration data dependencies within the loop body, the loop body is expanded into VF vector-width parallel blocks. The vector width VF is determined by the hardware information lookup interface: 4 is used by default in x86 environments; and 8 is used in ARM environments based on the NEON register. After expansion, the system attempts to perform loop nesting, merging adjacent loops with high data reuse rates at the same level, thereby reducing memory bandwidth. After this stage, each single-iteration instruction in the hot code is rewritten as a vectorized instruction, and the theoretical throughput improvement is roughly proportional to VF.
[0071] For privacy function segments, the loop vectorizer also considers the separability of homomorphic instructions. In the CKKS model, vector addition, constant multiplication, and rotation can be performed in the ciphertext domain. If the inner loop only contains these linear operations, it can be directly vectorized on the encrypted vector; if a multiplication-addition chain requiring re-linear operations appears, the system first decrypts in small batches in the plaintext domain according to the "alignment-grouping-re-encryption" strategy, then re-encrypts in the ciphertext domain and aggregates the results to ensure the correctness of homomorphic semantics.
[0072] After vectorization, the optimizer generates a static single-assignment intermediate representation with SSA labels and passes it to the WebAssembly backend that supports garbage collection extensions. This backend follows the WebAssembly garbage collection proposal, generating a `gc.struct` header for object references and declaring type information in the module header. For new vector data generated by loop vectorization, the backend assigns a `gc.array` type to each vector, with an embedded type of either i32 or f64, managed by the browser runtime during page instantiation. To minimize garbage collection pauses, an `incremental` flag is injected during linking, instructing the runtime to use an incremental mark-and-sweep strategy instead of a stop-and-copy strategy.
[0073] At the instruction generation level, ordinary function segments are transformed into WebAssembly computation codes by the backend instruction selection. Simultaneously, homomorphic instructions in privacy function segments are mapped to `call_indirect` calls, with target entries pointing to built-in CKKS primitives. To prevent accidental invocation of privacy instructions by ordinary segments, the linker inserts `nop` placeholders at table indexes, ensuring that the instruction can only be called after the loader explicitly writes the target offset according to the metadata table. Each privacy function is allocated an independent homomorphic linear memory region with a fixed page size of 4 megabytes. The allocation strategy employs on-demand lazy allocation, with actual memory requested by the runtime on the first call. This avoids mixing regular vectors and ciphertext vectors, reducing cache pollution.
[0074] After bytecode generation is complete, the system writes two types of custom sections into the module segment: one type records vectorized circular mapping relationships, used to quickly locate the original source code line when runtime exceptions occur; the other type records the garbage collection root set, facilitating the incremental collector to exclude objects in use during the marking phase. The final output hybrid bytecode package is hashed using BLAKE3 and uploaded to the content-addressed file system along with the folded zero-knowledge security proof, ensuring that the artifact downloaded by the browser can be uniquely verified.
[0075] The effect was verified in a news list rendering scenario. The input contained 100 records, each with 3 string fields and 1 encrypted amount field. Before vectorization, the loop processed only 1 record at a time; after vectorization, it processed 4 records (VF=4) simultaneously, reducing the rendering time from 58 milliseconds to 18 milliseconds on the same Intel i5 desktop processor. Garbage collection monitoring showed that in a traditional WebAssembly environment without incremental garbage collection extensions, the page's resident memory increased by 22 megabytes after 5 minutes of interactive scrolling; with the extensions enabled, incremental garbage collection continuously released unreachable vector objects in the background, and the resident memory increase was only 4 megabytes. The isolation of the encrypted memory area effectively blocked attacks attempting to write ordinary segments to encrypted pages, throwing runtime exceptions and being intercepted and reported during penetration testing.
[0076] Preferably, the zero-knowledge security proof adopts the Scalable Transparent Knowledge Argument STARK, and merges the fragmented proofs of each function into a single root proof through a three-level recursive folding method.
[0077] In the low-code component generation process of this invention, the browser needs to verify whether the hybrid bytecode package is completely consistent with the cloud compilation result and ensure that the homomorphic encrypted segment has not been tampered with during execution. To this end, the system introduces the Scalable Transparent Knowledge Argument STARK to generate zero-knowledge secure proofs and adopts a three-layer recursive folding technique to merge the fragmented proofs corresponding to each function into a single root proof. This design takes into account the engineering constraints of bytecode package size, verification latency, and front-end computing power, avoiding network round trips in traditional interactive proofs and saving more bandwidth than single-layer massive proofs.
[0078] First, for each compiled function, the system generates an air constraint system, which maps the instruction sequence to an intermediate algebraic representation, allowing the execution trajectory to be verified within a finite field. Let the... The number of rows in the tracking table for the function is , Rounding up ensures the table length is a power of two, facilitating subsequent Fast Fourier Commitments. The compiler processes the state of each line. The verification polynomial is computed, and low-degree polynomial constraints are obtained by randomly sampling over the domain. Then, a fast pseudo-random commitment algorithm is called to generate piecewise proofs. Its size is Linear dependence. To allow the front-end to complete validation on general-purpose hardware, the system imposes restrictions. Each fragment must be at least 256KB in size.
[0079] Transmitting the entire fragmented proof directly would result in a bloated bytecode packet. To reduce size, the system introduces recursive folding. Folding refers to combining two independent STARK proofs... and Polynomial commitments based on hash challenge random coefficients Linear combination generates shorter new proofs A single fold reduces the sum of the row numbers from... Down to The number of recursive folding levels is denoted as . The present invention is designed After three layers of folding, all the fragmented proofs are converged into a single root proof. The file is approximately 42KB in size. The root proof retains its transparency because the folding process relies solely on a random hash challenge, requiring no trusted parameters. The folding formula is written as: ; in , Indicates the folding level. It is generated by hashing the level, index and the commitment value of the previous level using a hash function, ensuring unpredictability.
[0080] When the browser loads the mixed bytecode package, it first extracts the root proof and the function hash set. The verifier works in the following order: 1. Verify the polynomial consistency within the root proof; 2. Backtrack the sampled row index according to the hash challenge chain; 3. Call the instruction interpreter to re-execute the sampled row and check whether the obtained state matches the promised value; 4. Verify whether the folding challenge is correctly derived. The entire process does not rely on the private key and is completed entirely on the user side, meeting the transparency requirements of STARK. In actual testing on mainstream mobile chips, the root proof verification takes about 18 milliseconds, far below the interactive experience threshold of less than 100 milliseconds.
[0081] To demonstrate the practical benefits of recursive folding, two deployment methods are compared: The first is a single-function, single-proof, foldless deployment, with a bytecode packet size of 1.8MB plus 256KB x 30 proofs, totaling over 9MB, significantly increasing browser download latency and memory usage. The second is the three-layer folding scheme of this invention, with a total size of only 1.8MB plus 42KB root proof, reducing download latency by approximately 65% and peak memory usage by 80%. Simultaneously, the root proof can still verify the correctness of all functions because folding preserves polynomial consistency and random sampling integrity.
[0082] In the "encrypted payment form" scenario, after a user submits a form containing an amount field, the browser needs to call the privacy function chain to calculate the fee rate. The rendering thread first verifies the hybrid root proof; if the verification passes, execution begins. No stuttering occurred on the same device at 60 frames per second. If bytecode is intentionally altered, causing the proof verification to fail, the system terminates loading and reports an exception within 20 milliseconds, confirming the security link is effective.
[0083] The content identifier is obtained by calculating the content hash of the hybrid bytecode packet and the security proof. The corresponding data is uploaded to the decentralized file system and the metadata is registered on the blockchain. After downloading and verifying the security proof with the help of the browser service worker thread, the hybrid bytecode packet is executed in the isolated running environment. The network latency is predicted based on the current round-trip latency and frame rate and the component prefetching strategy is adjusted. The edge weights of the meta-component hypergraph are updated based on user interaction events.
[0084] This invention introduces a four-step closed loop—"content addressing, blockchain registration, end-side verification, and adaptive execution"—at the final stage of the component generation chain, ensuring that the entire process of the bytecode package from generation to execution is both traceable and dynamically optimizable. First, the compiled hybrid bytecode package and the folded zero-knowledge security proof are used on the server side to calculate the content hash using the BLAKE3 algorithm. Let the binary data be... Abstract The calculation formula is denoted as ,in It uses a 256-bit fixed-length hash. BLAKE3, based on a Merkle tree structure, features parallelism-friendly operation, high throughput, and collision resistance, enabling it to process 2 MB files in 6 milliseconds within a single thread. The system subsequently... As the unique address, For uploads to the content-addressable file system. Because the file system uses append-only block logs and distributed hash table routing, any node can retrieve data as long as it has the hash, solving the single point of failure and version spoofing problems of centralized CDN.
[0085] After the upload is complete, the system creates a metadata transaction on the blockchain containing hashes, component subgraph hashes, and interface constraint hashes. Once this transaction achieves network consensus, it serves as timestamp evidence. If a malicious node subsequently replaces the content, the hash will not match, and the browser will refuse to load it. The ServiceWorker thread is responsible for downloading: when a user first visits the page, it broadcasts this information to the network. The corresponding block is returned by the most recently surviving node; if the preferred node is offline, the route automatically falls back to the node with the closest prefix, improving fault tolerance in weak networks.
[0086] After receiving the archive, the browser first calls the WebAssembly validator in an isolated thread to verify the zero-knowledge proof. The proof demonstrates that the bytecode package has not been tampered with and that the homomorphic logic of the privacy function is consistent with compile time. Verification takes approximately 18 milliseconds, which does not affect the initial screen rendering rhythm. Subsequently, the runtime instantiates the ordinary segment and homomorphic segment modules, allocates read-only homomorphic memory pages for the homomorphic segment, and encapsulates the parameters in a wrapper to prevent plaintext leakage.
[0087] To reduce latency caused by sudden network jitter, this invention embeds a Berkeley packet filtering-WebAssembly bridging module within the ServiceWorker to collect round-trip time (RTT) and frame rate (FPS) in real time. The system constructs a 30-bit state sequence matrix, uses dynamic pattern decomposition to solve for the state transition operator K, and then... Predicting the future Frame network latency. If the predicted value is higher than the threshold, the next batch of component segments is prefetched in parallel; if the latency stabilizes, prefetching is reduced to save bandwidth. At the same time, user click and scroll events are mapped as edge weight increments and written back to the meta-component hypergraph in real time, so that the next round of layout generation prioritizes the use of highly interactive components.
[0088] Examples show that, under an average mobile network latency of 80 milliseconds, this mechanism reduces the initial screen loading latency from 280 milliseconds to 190 milliseconds; during subsequent scrolling, due to dynamic adjustment of edge weights, the frame drop rate during interaction is reduced from 8% to 3%. More importantly, the entire chain uses content hash as the root index, and combined with the immutability of blockchain, it achieves a transparent and auditable secure client execution path without relying on additional signature infrastructure, making it suitable for low-code scenarios with extremely high supply chain security requirements, such as finance and e-commerce.
[0089] Preferably, the content hash is generated using the BLAKE3 algorithm, and the decentralized file system uses a content addressing mechanism to store the hybrid bytecode packet and security proof.
[0090] After the hybrid bytecode packet is generated, this invention uses the BLAKE3 algorithm to calculate the content hash and uploads the bytecode packet and corresponding zero-knowledge security proof to a decentralized file system using the hash value as a unique address. This process solves the problems of version fingerprints being easily forged and single points of failure in centralized object storage in traditional front-end hot updates.
[0091] BLAKE3 is a parallel hash algorithm based on a Merkle tree structure, which has advantages such as high throughput, easy implementation in constant time, and high collision resistance. Let the binary data to be uploaded be... The hash output is The core steps can be abstracted as follows: ; in This indicates that the compression function is computed in parallel blocks, and then the final 256-bit digest is obtained through tree aggregation. Because the algorithm uses a scalable output function, if subsequent business logic requires a shorter hash identifier, the first 128 bits can be directly extracted; if quantum security is required, the salt value can be concatenated and recalculated without modifying the upload interface. The hash calculation is implemented in the browser's ServiceWorker using the WebAssembly version, processing a 2MB file takes an average of 6 milliseconds, far lower than network transmission latency.
[0092] Get hash value Afterwards, the system... For the path Uploads are sent to a content-addressable distributed file system. This file system uses an append-only block log: whenever a node receives a data block, it will... As a block identifier, The data is divided into 256KB segments, and the linked list of segments is written into a distributed hash table and broadcast over the network. If the retrieval end has... This allows requesting the corresponding block from any node; if the connected node is offline, the nearest live copy is found using prefix routing. Because the file system uses immutable blocks, anyone attempting to forge a bytecode packet must generate a new hash; the browser only needs to compare the local cache index with... It can distinguish versions without requiring an additional signing mechanism.
[0093] To accommodate the differentiated loading of homomorphic and garbage-collected segments, the mixed bytecode package uses tar format to encapsulate three files—the ordinary segment (.wasm), the homomorphic segment (.wasm), and the root proof (.proof)—into a single archive before uploading. The archive header contains a hash table and a MIME type table, allowing the browser to map modules to the correct sandbox based on their MIME type during unpacking. ServiceWorker executes the following pseudocode during the install phase: constcar = awaitipfs.cat(h); const{wasmPlain,wasmFhe,proof}=untar(car); if(!verifyStark(proof,[wasmPlain,wasmFhe]))throw'invalid'; awaitWebAssembly.instantiate(wasmPlain, envPlain); awaitWebAssembly.instantiate(wasmFhe, envFhe); verifyStark is a pure WebAssembly validator that performs constant-time verification on the root proof; no code can be executed before the verification is successful to prevent time-side channel leakage.
[0094] Another advantage of content hashing is its browser caching friendliness. Browsers store content hashing in their caches... As the primary key, if a user upgrades to a new version, only incremental download of differential blocks is needed; unchanged blocks are directly cached due to identical addresses. Experiments show that under a normal network latency of 80 milliseconds, the initial loading of the mixed packet takes approximately 280 milliseconds; subsequent loadings, if the normal segments remain unchanged and only the homomorphic segments are updated, reduce the loading time to 95 milliseconds, saving approximately 66% of bandwidth.
[0095] Example: An e-commerce mini-program uses the low-code framework of this invention to implement the payment page. Each version iteration only updates the fee rate logic, corresponding to a normal segment bytecode size of 200KB; the hash value changes from... Updated to When a user opens a page, the ServiceWorker makes a request. The file system found two blocks in the ordinary segment with the same values as the old version's blocks, and only returned the new blocks, with a download size of 36KB. The browser verified the root proof and completed the hot update without having to re-download the homomorphic segment and proof. In the same scenario, if centralized storage were used, the entire 1.8MB packet would have to be re-downloaded, wasting bandwidth.
[0096] Preferably, the browser service worker thread collects round-trip latency and frame rate metrics through the Berkeley packet filter and the WebAssembly bridging mechanism, and updates the dynamic mode decomposition operator based on the metrics after each rendered frame.
[0097] The browser needs to detect minute fluctuations in network and rendering performance within milliseconds to determine the order of component prefetching and progressive loading. This invention introduces a Berkeley packet filtering bridge module into the ServiceWorker thread to collect round-trip latency and frame rate in real time, and updates the prediction operator using dynamic pattern decomposition at the end of each frame to construct a time-adaptive performance state space.
[0098] First, let's explain the structure of the Berkeley Packet Filtering Bridge module. The Berkeley Packet Filtering is a miniature virtual machine that executes safely in kernel space, capable of hooking socket send / receive events without interfering with the main thread. In this invention, the high-level link tracing script is compiled into Berkeley Packet Filtering bytecode during the compilation phase, with the core probe hooked to the `tcp_ack` path. After the browser completes a handshake or block download with the content addressing node, the kernel immediately writes a timestamp to the shared circular buffer. Simultaneously, the WebAssembly bridge module reads the buffer through memory mapping and quickly calculates the round-trip time in user space. The round-trip time is defined as the moving average of the time difference between two adjacent ACK events, denoted as . .
[0099] The frame rate metric is measured by the callback interval of `requestAnimationFrame`. At the end of each frame, the main rendering thread writes the duration of the current frame to shared memory; the `WebAssembly` module calculates the reciprocal of this duration to obtain the frame rate, denoted as . The two are combined to form a performance state vector: ; In order to capture the system dynamics over a short period of time, the system maintains the past... Frame length state matrix: ; ; in yes The adjoint matrix shifted forward by one time step. Dynamic mode decomposition requires solving a least-squares problem. Since frame-level data has extremely low dimensionality, the Moore-Penrose pseudoinverse can be used directly: ; Here For the prediction operator, express The pseudo-inverse. After the update is complete, the system utilizes: ; Predicting the future Round-trip latency of frames. If the predicted value exceeds three times the root mean square deviation threshold, the Service Worker immediately triggers the parallel prefetching of the next batch of component segments to reduce the impact of network jitter on the smoothness of interaction.
[0100] At the implementation level, the Berkeley packet filter shares memory with WebAssembly, achieving zero-copy transfer through SharedArrayBuffer; the bridging module runs only on the Service Worker thread, avoiding competition with the main UI thread for the event loop. (Performance status matrix length) The default is 30 frames, equivalent to a 0.5-second rolling window, which can cover most mobile network fluctuation cycles. If detected... This indicates that the value is unstable, and the system will automatically execute... The price has fallen back to ensure that the forecast does not diverge.
[0101] Example: On a news feed page, intermittent network jitter occurred during user scrolling, with peak round-trip latency increasing from 45 milliseconds to 180 milliseconds. The system... Frame detected If the delay exceeds a preset threshold in milliseconds, the next batch of image segments is requested earlier; simultaneously, the list placeholder strategy of the rendering pipeline is switched to low-resolution mode. In experiments comparing the situation with prediction disabled, the average first-screen loading latency decreased by 12%, and the scrolling frame drop rate decreased from 8% to 3%.
[0102] The effectiveness of this mechanism is reflected in two aspects. First, the bridging technology completely decouples round-trip delay measurement from page logic, avoiding the blocking caused by opening socket observations in the main program. Second, dynamic mode decomposition provides explicit linear operators, which can quickly perform multi-frame predictions through exponential operations at runtime, with a computational cost of only [missing information]. ,in Compared to traditional exponential smoothing, this operator can adapt to unsteady jitter and automatically back off when parameters become unstable, significantly improving the network adaptability of low-code components.
[0103] Preferably, a two-layer graph convolutional network is used when embedding the user interface structure data, and the root node embedding vector of the graph convolutional network is used as the representation of the user interface structure.
[0104] This step addresses the problem of converting user interface structure data (typically described as hierarchical JSON or XML) into fixed-length differentiable vectors that can align with natural language and sketch features in a multimodal space. Unlike traditional methods that expand each node into a bag-of-words representation, this invention treats the structure as a directed tree and introduces a two-layer graph convolutional network for structure embedding, ultimately using the root node embedding vector as the structural representation of the entire interface. This design follows a two-level strategy of "local aggregation—global convergence": the first convolutional layer captures parent-child relationships and sibling order, while the second convolutional layer crosses subtree boundaries to achieve global context exchange, thus obtaining a compact vector containing hierarchical, order, and attribute aggregation information at the cost of only two message passes.
[0105] The interface tree is first formalized as a graph. The set of nodes Includes each component instance in the interface, and the edge collection. It includes parent-child edges and sibling edges. To simplify the notation, the weight of parent-child edges is set to 1, and the weight of sibling edges is set to 0.5. The initial feature vector of a node is composed of two concatenated parts: one-hot encoding of component type and attribute hash encoding. Let the node be... The initial features are The first layer of graph convolution performs local aggregation, calculated using the following formula: ; in For nodes The set of adjacent nodes, For node degree, For trainable weight matrix, Activated for linear rectification. This layer integrates parent-child and sibling node information for each node. For example, after aggregating nodes in a list container, it will explicitly include the number of adjacent cards and scroll attribute vectors, providing context for the lower layers.
[0106] The second layer of graph convolution performs cross-subtree information exchange based on the output of the first layer, as shown in the formula: ; This is the weight for the second layer. After two layers, each node has obtained a structural summary of its two-hop neighborhood. Root node embedding vector. It has global semantics because the tree structure guarantees that all nodes are finitely far from the root node. The system will... As a representation of the user interface structure, the vector length is fixed at 128 dimensions in the implementation and can be concatenated with the unified semantic vector at the same scale.
[0107] Compared to deep graph networks, the two-layer design offers three advantages. First, the gradients of shallow networks are stable, avoiding oversmoothing. Second, the computational complexity is linearly related to the number of edges, making it suitable for environments with limited front-end resources. Third, the embedding dimension can be fixed, facilitating the sharing of normalization coefficients with other modal weights during the multimodal alignment stage.
[0108] In implementation, the graph convolutional network parameters are pre-trained offline on the server using 50,000 real page trees. The loss function is a hybrid objective of node attribute reconstruction and tree depth prediction. After pre-training, the weights are extracted and embedded into the WebAssembly module. The inference phase requires only two sparse matrix-vector multiplications, and each page tree takes approximately 2 milliseconds to process.
[0109] The effectiveness was validated using two types of interfaces: a news feed and a multi-level navigation drawer. Compared to the baseline bag-of-words structure encoding, the method of this invention can accurately predict the nesting level of containers in the early stages of layout generation: in 50 sets of tests, the prediction accuracy improved from 76% to 94%. Simultaneously, the cosine similarity of the embedded vectors and the actual hierarchical edit distance showed a high negative correlation of -0.82, indicating that the vectors better captured structural differences. Specific implementation: In a three-level tree scenario of a "side drawer + second-level menu," the bag-of-words method mistakenly lumped the second-level menu with sibling buttons, leading to duplicate buttons in subsequent layout generation; graph convolutional embedding correctly distinguished node depth, enabling the generation model to output three components—drawer container, menu list, and icon button—at a single, consistent level.
[0110] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for generating low-code components, characterized in that, Includes the following steps: Semantic parsing, shape feature extraction, and structure embedding are performed on natural language, sketch, and interface structure data. Features are aligned and fused through regularized optimal transport to generate a unified semantic vector and a set of semantic primitives. The layout is generated by a conditional diffusion model driven by a unified semantic vector. In the de-diffusion stage, the gradient is injected, which is composed of a set of semantic primitives and obtained by a differentiable Boolean satisfiability network. The layout power spectrum excitation element component hypergraph random walk is combined to determine the component subgraph and its interface constraints. The conditional diffusion model generates noise vectors in the forward diffusion stage with step sizes that increase at equal intervals, and uses a cosine decay sequence to control the noise amplitude at each step. In the de-diffusion stage, Gumbel-Softmax relaxation is used when converting the set of semantic primitives into a continuous probability distribution, and the temperature parameter is reduced linearly in each iteration until convergence. The layout power spectrum is generated by the amplitude information obtained by performing a two-dimensional discrete Fourier transform on the layout image, and the amplitude information is used as the excitation signal input component of the hypergraph random walk solver. Privacy functions in the component subgraph are identified based on interface constraints. The privacy functions are vectorized using CKKS homomorphic encryption and then mixed with the remaining functions according to the compilation strategy determined by Bayesian optimization to generate a mixed bytecode package containing a homomorphic memory area. At the same time, a corresponding folded zero-knowledge security proof is generated. The content identifier is obtained by calculating the content hash of the hybrid bytecode packet and the security proof. The corresponding data is uploaded to the decentralized file system and the metadata is registered on the blockchain. After downloading and verifying the security proof with the help of the browser service worker thread, the hybrid bytecode packet is executed in the isolated running environment. The network latency is predicted based on the current round-trip latency and frame rate and the component prefetching strategy is adjusted. The edge weights of the meta-component hypergraph are updated based on user interaction events.
2. The method according to claim 1, characterized in that, The homomorphic encryption vectorization adopts the CKKS homomorphic encryption scheme with remainder field decomposition, and configures an independent homomorphic linear memory area for the privacy function to store ciphertext data when generating the hybrid bytecode packet.
3. The method according to claim 2, characterized in that, The hybrid compilation process first performs loop vectorization optimization on the intermediate code, and then generates the target bytecode through a WebAssembly backend that supports garbage collection extensions.
4. The method according to claim 3, characterized in that, The zero-knowledge security proof adopts the Scalable Transparent Knowledge Argument STARK and merges the piecewise proofs of each function into a single root proof through a three-level recursive folding method.
5. The method according to claim 1, characterized in that, The content hash is generated using the BLAKE3 algorithm, and the decentralized file system uses a content addressing mechanism to store the hybrid bytecode packet and security proof.
6. The method according to claim 5, characterized in that, The browser service worker thread collects round-trip latency and frame rate metrics through the Berkeley packet filter and the WebAssembly bridging mechanism, and updates the dynamic mode decomposition operator based on these metrics after each rendered frame.
7. The method according to claim 1, characterized in that, When embedding user interface structure data, a two-layer graph convolutional network is used, and the embedding vector of the root node of the graph convolutional network is used as the representation of the user interface structure.
Citation Information
Patent Citations
Intelligent low-code development method and system based on deep learning model optimization
CN120215926A
Method and system for AI aided design workflow based on diffusion model
CN120597682A