A method and system for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios.
By allocating static offset addressing in the low-code component and replacing string deserialization with typed array access, the thread pause problem caused by garbage collection mechanism in high-frequency sensor message data processing of the low-code component is solved, and smooth and continuous execution of data reading and view rendering is achieved.
Patent Information
- Application Number
- CN202611474407.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-21
- Publication Date
- 2026-11-17
AI Technical Summary
When processing high-frequency sensor message data, existing low-code components generate a large number of temporary memory objects due to the reliance on string deserialization parsing, causing the automatic garbage collection mechanism to be triggered frequently, resulting in the main business thread being paused and affecting the continuity of system data interaction.
By resolving the object model configuration file, the measurement point data specifications are extracted, static offset addressing is allocated in the shared storage area at the bottom layer of the host runtime environment, and string deserialization calls are replaced with typed array accesses at the abstract syntax tree level, generating a reconstructed syntax tree that enables the target business logic block to be read directly with zero copy, avoiding thread pauses caused by the garbage collection mechanism.
This effectively avoids the garbage collection mechanism being woken up due to the accumulation of temporary memory objects, ensuring the smooth and continuous execution of data reading and view rendering tasks when the system receives high-frequency hardware sensor messages, and improving the system's processing efficiency and stability.
Smart Images

Figure CN123114479A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a method and system for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios. Background Technology
[0002] In industrial control and IoT scenarios, underlying physical hardware devices typically report sensor data packets to the system continuously and frequently. To adapt to changing business needs and improve application interface development efficiency, engineers often use low-code platforms for visual orchestration of business logic and rapid assembly of front-end interfaces. Existing low-code runtime environments generally employ text-based communication protocols for data exchange when processing these underlying packet data. When the host runtime environment receives continuous high-frequency sensor packets, conventional low-code business components often rely on their internally encapsulated parsing engines to perform string deserialization processing on the packet payload, thereby converting the underlying data structure into an object format that can be directly recognized and processed by high-level languages.
[0003] This processing mechanism has good versatility and can adapt to payload structures of various communication protocols. However, when executed in a host runtime environment with automatic garbage collection, the string deserialization and object conversion processes trigger a large number of dynamic memory object allocations during program execution. As the sampling frequency of hardware devices increases and the number of connected sensor channels increases, a large number of short-lived temporary memory objects will be generated intensively within the system's main execution thread.
[0004] The rapid accumulation of these temporary deserialized objects in the memory heap periodically awakens the host runtime environment's underlying automatic garbage collection mechanism to perform memory scanning and space cleanup operations. During operation, the automatic garbage collector consumes processor resources and suspends the currently running main business thread. This pause in business threads caused by frequent memory object allocation and garbage collection disrupts the system's ability to process high-frequency sensor data, potentially leading to delays and stuttering in underlying message reading and front-end view rendering, making it difficult to meet the requirements of smooth data interaction in some industrial scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios, in order to solve the technical problem that existing low-code business components generate a large number of temporary memory objects due to string deserialization parsing when processing high-frequency sensor message data, which in turn frequently triggers the automatic garbage collection mechanism and causes the main business thread to pause.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A low-code component intelligent recommendation and dynamic assembly method for specific business scenarios, applied to a host runtime environment with automatic garbage collection mechanism, includes: Parse the object model configuration file corresponding to the specific business scenario and extract the measurement point data specifications of the sensors to be connected; Based on the specifications of the measurement point data, low-code business components with typed array access interfaces are recommended in the pre-built component library; In response to the assembly instructions for the recommended low-code service components, static offset addressing amounts are allocated for each measurement point in the shared storage area at the underlying layer of the host runtime environment. The assembled low-code business components are converted into an abstract syntax tree, and the call expression node responsible for performing string deserialization parsing is searched in the abstract syntax tree; The searched call expression node is replaced by the underlying typed array access syntax branch, and the static offset address is injected as a constant parameter into the index parameter position of the underlying typed array access syntax branch to generate a reconstructed syntax tree; The target business logic block, constructed based on the reconstructed syntax tree, is deployed to the host runtime environment for execution. This allows the target business logic block to initiate a zero-copy read by using the static offset addressing value when the underlying communication protocol stack within the host runtime environment overwrites the pure binary stream to the shared storage area, thereby avoiding thread pauses caused by the automatic garbage collection mechanism.
[0007] Optionally, based on the measurement point data specifications, recommending low-code business components with typed array access interfaces from the pre-built component library includes: Detect the recent garbage collection pause time parameters of the host operating environment; When the garbage collection pause time parameter exceeds a preset safety threshold, conventional components that use traditional string binding are blocked in the preset component library; Components with pre-compiled underlying templates that support the specified measurement point data specifications are selected and presented as candidate resources in the visual orchestration panel.
[0008] Optionally, allocating static offset addressing values for each measurement point within the shared storage area at the underlying layer of the host runtime environment includes: Based on the physical device access order set in the object model configuration file, a directed graph of data flow for all measurement points is generated. Starting from the 0-bit base address of the shared storage area, and according to the sequential node order set in the directed graph of the data flow, the byte width bound to each measurement point is accumulated one by one. The endpoint pointer position generated during the accumulation process is recorded as the static offset addressing amount of the adjacent subsequent measurement points until all measurement points have been traversed, forming a continuous and fragment-free memory mapping table.
[0009] Optionally, the step of converting the assembled low-code business component into an abstract syntax tree, and searching for the call expression node responsible for performing string deserialization parsing in the abstract syntax tree, includes: The lexical analysis engine is invoked to perform a character-by-character scan of the business source code, generating the abstract syntax tree in a tree-like hierarchical distribution; Within the tree-like hierarchical distribution, a visitor pattern is applied to perform a depth-first search, intercepting node branches whose feature signatures are derived from the native character parsing method; Verify whether the source of the input parameters of the intercepted node branch can be traced back to the parameter field of the network request callback function. If so, mark the intercepted node branch as the calling expression node that needs to be replaced.
[0010] Optionally, the step of injecting the static offset address as a constant parameter into the index input position of the underlying typed array access syntax branch to generate a reconstructed syntax tree includes: Instantiate a system interface call node that has the ability to read views across different contexts; When performing node replacement, the variable declaration statements of the instantiated system interface call node are hoisted to the top-level module scope of the component, so that the refactored low-code business component only establishes a static memory mapping handle during the initialization phase, and can then reuse the static memory mapping handle in subsequent rendering cycles.
[0011] Optionally, after generating the reconstructed syntax tree, the method further includes: The system detects whether the output byte order of the underlying hardware device connected to the host operating environment is big-endian or little-endian. When it is determined that the output byte order is inconsistent with the local architecture byte order of the host runtime environment, an additional bitwise operation node is inserted into the reconstructed syntax tree to perform high-low byte flipping, ensuring that the binary data extracted through the underlying typed array access syntax branch is consistent with the local architecture byte order of the host runtime environment.
[0012] Optionally, the host runtime environment is internally divided into the underlying communication protocol stack and the high-level language interpreter; The underlying communication protocol stack is responsible for calling the polling script to continuously pull raw sensor messages from the underlying hardware device; The high-level language interpreter is responsible for carrying the view rendering logic and business calculation logic of the target business logic block; The shared storage region is a static random access storage block mapped within the physical memory space and accessible concurrently across processes by the underlying communication protocol stack and the high-level language interpreter.
[0013] Optionally, when the underlying communication protocol stack overwrites a pure binary stream to the shared storage area, it specifically includes: After receiving the original sensing message, the underlying communication protocol stack strips the protocol header and checksum tail carried in the original sensing message. The pure sensing payload remaining after stripping is directly overwritten into the shared storage area according to the predefined static offset addressing amount corresponding to each measurement point; Throughout the overwrite process, the action of dispatching cross-language call events to the high-level language interpreter is intercepted.
[0014] Optionally, the process of generating the reconstructed syntax tree further includes: In the reconstructed syntax tree, a memory out-of-bounds protection syntax node is woven in before the execution entry point of the underlying typed array access syntax branch; The memory out-of-bounds protection syntax node encapsulates comparison and verification logic, which is used to compare the static offset addressing amount with the extreme boundary of the shared storage region during program execution. If the value exceeds the specified extreme value boundary, the pointer read operation will be blocked and an out-of-bounds exception warning will be thrown.
[0015] This invention also provides a low-code component intelligent recommendation and dynamic assembly system for specific business scenarios, applied in a host runtime environment with an automatic garbage collection mechanism, including: The specification extraction module is used to parse the object model configuration file corresponding to the specific business scenario and extract the measurement point data specifications of the sensor to be connected. The resource recommendation module is used to recommend low-code business components with typed array access interfaces from the preset component library based on the specifications of the measurement point data. An assembly offset module is used to respond to assembly instructions for the recommended low-code service components by allocating static offset addressing values for each measurement point in the shared storage area at the bottom layer of the host runtime environment. The node search module is used to convert the assembled low-code business components into an abstract syntax tree, and search for the call expression node responsible for performing string deserialization parsing in the abstract syntax tree; The refactoring and replacement module is used to replace the searched call expression node with the underlying typed array access syntax branch, and inject the static offset address as a constant parameter into the index parameter position of the underlying typed array access syntax branch to generate a refactored syntax tree. The zero-copy execution module is used to send the target business logic block constructed based on the reconstructed syntax tree to the host runtime environment for execution. When the underlying communication protocol stack inside the host runtime environment overwrites the pure binary stream to the shared storage area, the target business logic block initiates a zero-copy read based on the static offset address, thereby avoiding thread pauses caused by the automatic garbage collection mechanism.
[0016] The present invention has achieved the following beneficial effects: This invention extracts measurement point data specifications from the parsing object model configuration file, allocates static offset addressing values to each measurement point in the shared storage area at the underlying level of the host runtime environment, and replaces the call expression node responsible for string deserialization parsing in the business component with the underlying typed array access syntax branch at the abstract syntax tree level. Simultaneously, the static offset addressing value is injected as a constant parameter to generate the reconstructed syntax tree. During the actual execution phase of the business logic, when the underlying communication protocol stack overwrites a pure binary stream to the shared storage area, the target business logic block can directly initiate a zero-copy read using this static offset addressing value. This data processing mechanism skips the conventional text deserialization step, cuts off the trigger path for frequent allocation of dynamic temporary memory objects, eliminates the precondition of high-frequency wake-up of the automatic garbage collection mechanism due to the accumulation of temporary objects, avoids the blocking of the main business thread caused by the garbage collection process, and ensures the smooth and continuous execution of data reading and view rendering tasks when the system faces dense hardware sensor message access.
[0017] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 A flowchart of a low-code component intelligent recommendation and dynamic assembly method provided in an embodiment of the present invention; Figure 2 A flowchart of the intelligent recommendation process for low-code business components provided in this embodiment of the invention; Figure 3 This is a flowchart of static offset addressing allocation and memory mapping provided in an embodiment of the present invention; Figure 4A flowchart of call expression node search and abstract syntax tree reconstruction provided in an embodiment of the present invention; Figure 5 This is a diagram illustrating the zero-copy read architecture of the host runtime environment provided in this embodiment of the invention. Figure 6 This is a structural diagram of the functional modules of the low-code component intelligent recommendation and dynamic assembly system provided in this embodiment of the invention. Detailed Implementation
[0020] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0021] In specific business scenarios, due to the continuous and high-frequency reporting of sensor messages by underlying hardware devices, traditional low-code components typically rely on string deserialization parsing when processing message data. In a host runtime environment with an automatic garbage collection mechanism, this parsing process triggers the allocation of dynamic memory objects, which in turn frequently wakes up the automatic garbage collection mechanism to perform scanning and cleanup work, causing business threads to pause. To solve the above technical problems, embodiments of the present invention provide a method and system for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios.
[0022] Reference Figure 1 As shown, this invention discloses a low-code component intelligent recommendation and dynamic assembly method for specific business scenarios, applied to a host runtime environment with an automatic garbage collection mechanism, including the following steps: Step S101: Parse the object model configuration file corresponding to the specific business scenario and extract the measurement point data specifications of the sensor to be connected.
[0023] The host runtime environment is internally divided into a low-level communication protocol stack and a high-level language interpreter. The low-level communication protocol stack is responsible for continuously retrieving raw sensor packets from the underlying hardware devices by calling a polling script; the high-level language interpreter is responsible for carrying the view rendering logic and business calculation logic of the target business logic block. The shared storage area is a static random access storage block mapped in physical memory space that can be accessed concurrently across processes by the low-level communication protocol stack and the high-level language interpreter. In this architecture, the packet payload intercepted by the network protocol stack can be directly overwritten to the shared storage area, while the high-level language interpreter accesses the data in this area across processes through virtual address pointers to avoid the overhead of data transfer between different system processes.
[0024] The configuration loading module within the host runtime environment loads the serialized data stream of the object model configuration file into a memory buffer via a file system interface. The configuration parsing module recursively scans the hierarchical structure of the object model configuration file using a syntax tree traversal engine to locate the branch node array responsible for defining the telemetry and sensing channel attributes of the device status. For each physical measurement point node attached to this node array, the configuration parsing module extracts its corresponding measurement point data specifications. The object model configuration file uses a standard JSON or YAML data structure format. The precise extraction rules and logical judgment conditions set within the configuration parsing module are as follows: traversing the hierarchical tree downwards using "properties" or "telemetry" as the specific key name; when a branch node is found to contain three fixed key-value pairs simultaneously: "identifier" (corresponding to the physical identifier of the measurement point), "dataType" (corresponding to the physical data type), and "accessMode," the branch is determined to be a valid measurement point node.
[0025] The system has a pre-built static mapping table between physical data types and byte widths. When extracting specifications, if the value of "dataType" is "int32", the system determines that its byte width is 4 bytes and the sign specifier is signed according to the mapping table. If the value is "uint16", it is mapped to 2 bytes and is unsigned. This enables the deterministic extraction of configuration attributes from text format to concrete memory allocation specifications.
[0026] Regarding the numerical scaling factor, after confirming that the current branch is a valid measurement point node, the configuration parsing module continues to search whether the node contains the preset key name "scale" (scale) or "multiplier" (multiplier factor). If the search is successful, the value corresponding to the key name is extracted and converted into a floating-point constant, which is then stored in the registry as the numerical scaling factor for that measurement point. If the above key name is not found, the system defaults to the assumption that the data of this sensing channel does not need to be scaled, and assigns a default value of 1.0 to the numerical scaling factor for that measurement point.
[0027] The numerical scaling factor was extracted through the aforementioned precise key-value pair detection and default value assignment logic.
[0028] The measurement point data specification includes a measurement point physical identifier, physical data type, byte width, sign bit specifier, and corresponding numerical scaling factor. The physical data type specifies the numerical representation of the arithmetic logic unit corresponding to the received payload; the byte width establishes the fixed number of bytes occupied by the specific measurement point state in contiguous physical memory space. After extraction, the configuration parsing module converts the above parameters into a configuration structure object and stores it in the measurement point specification registry in the system's global memory.
[0029] Step S102: Based on the measurement point data specifications, recommend low-code business components with typed array access interfaces from the preset component library.
[0030] like Figure 2 As shown, the system detects recent garbage collection pause time parameters in the host runtime environment. By calling the performance monitoring probes exposed by the underlying virtual machine of the high-level language interpreter, the system measures the cumulative time the main business thread is suspended due to the automatic garbage collection mechanism within a fixed sampling period, and quantifies the garbage collection pause time parameters. The preset safety threshold is calibrated based on the target view refresh rate of the industrial visualization terminal.
[0031] Taking a baseline refresh rate of 60Hz as an example, the upper limit of physical time for a single rendering cycle is constrained to 16.67ms. During the initialization phase, the system performs an idle benchmark test to calculate the average base time for the high-level language interpreter to perform pure view redraw operations without garbage collection overhead. The system calculates and fixes the preset safety threshold using the following formula: ; ; In the formula, Indicates the maximum physical time for a single rendering loop; Indicates the average base time; The calculated single-frame temporal redundancy; 0.8 is the anti-shake tolerance coefficient; This is the preset safety threshold.
[0032] In specific implementation, the preferred value range for the anti-jitter tolerance coefficient is [0.70, 0.85]. This coefficient is determined as follows: by calling the system's underlying probe to read the thread scheduling logs of the operating system running the host environment, the average operating system thread scheduling jitter deviation of the device within a fixed historical period (e.g., the past 60 minutes) is extracted; then, 1 is subtracted from the upper limit of the single rendering loop time occupied by this average deviation. The percentage of the image stabilization tolerance factor can be obtained.
[0033] In this embodiment, the default value is 0.8 because conventional industrial gateways and edge computing hardware typically experience about 20% system scheduling time jitter when concurrently handling network interruptions and peripheral I / O. Using 0.8 as a safety benchmark ensures the reserved time redundancy without introducing the computational overhead of complex real-time prediction algorithms. This mechanism can stably cover the pause time of automatic garbage collection, ensuring frame rate stability during peak system load periods. This calculation logic establishes the time limit for the garbage collector to preempt computing resources, determining whether the system faces the risk of frame drops and stuttering from a physical timing perspective. Subsequently, the recommendation rule engine compares the garbage collection pause time parameter with a preset safety threshold.
[0034] When the garbage collection pause time parameter exceeds a preset safety threshold, conventional components using traditional string binding are blocked in the pre-built component library. The recommendation rule engine traverses the feature declaration files of the pre-built component library. For conventional components that declare dependencies on regular expression text transformation, dynamic attribute boxing, or implicit closure allocation parameters, their load access permission fields are set to blocked. Specifically, the feature declaration files are the "manifest.json" or "package.json" descriptive configuration files within the low-code component package, which internally define a "memory_allocation_type" feature array field specifically for characterizing memory consumption. The specific logical condition for the blocking action is as follows: the parsing engine reads this feature array field, and when it detects that the array contains any of the enumeration string markers representing regular expression transformation ("RegExp_Alloc"), dynamic boxing ("Dynamic_Boxing"), or closure references ("Implicit_Closure"), the blocking condition is met. Once the conditions are met, the system modifies the access mask status bit corresponding to the hash key of the component to zero through a bitwise AND operation in the component hash table in the working memory, thereby completing the substantial filtering and shielding of the regular component at the data source level of the visual orchestration panel.
[0035] Components with pre-compiled direct memory access templates and supporting the specified measurement data specifications are selected and presented as candidate resources to the visual orchestration panel. Within the set of available components, the recommendation rule engine identifies components with pre-compiled direct memory access templates. These templates allow components to extract binary data from a specified contiguous memory block by passing a memory address pointer and a byte length parameter. The recommendation rule engine compares the set of supported data types declared by the template with the measurement data specifications in the measurement data specification registry. Components that match the comparison are pushed as candidate resources to the external visual orchestration panel via a network interface.
[0036] Step S103: In response to the assembly instruction for the recommended low-code service components, allocate static offset addressing values for each measurement point in the shared storage area at the underlying layer of the host runtime environment.
[0037] like Figure 3As shown, according to the physical device access order set in the object model configuration file, a directed graph of data flow for all measurement points is generated. The memory layout allocation engine parses the data binding relationship dictionary encapsulated within the assembly instructions and extracts the set of measurement point identifiers to be mapped. The polling priority order of the underlying hardware device communication bus defined in the object model configuration file is used to obtain the order of physical devices in the query script and the data space arrangement structure within the message payload.
[0038] Specifically, the logical judgment conditions for the association and acquisition are as follows: The memory layout allocation engine reads the "pollingInterval" and "priorityLevel" fields under each underlying hardware device node in the object model configuration file, and performs list sorting with "priorityLevel" in descending order as the primary sorting key and "pollingInterval" in ascending order as the secondary sorting key, thereby establishing the absolute order of physical devices in the bus query script; for the data space arrangement structure within the packet payload, the parsing engine traverses the set of measurement points attached to each device node, extracts the "registerAddress" or "offsetIndex" field bound to each measurement point, and performs topology reorganization according to the ascending order of the field values, thereby reconstructing the actual physical memory space arrangement order of sensor data within a single binary packet payload. Based on this, the memory layout allocation engine instantiates a graph data structure, using each measurement point as a graph vertex and the arrangement order on the continuous memory space as directed edges, to construct the directed graph reflecting the order of packet data arriving at the kernel space.
[0039] Starting from the 0-bit base address of the shared memory region, and according to the node order defined in the directed graph of the data flow, the byte width bound to each test point is accumulated sequentially. The memory layout allocation engine sets the physical starting address offset scalar of the shared memory region to zero, thus establishing the 0-bit base address. An addressing cursor register variable is allocated and initialized with the 0-bit base address. Each test point node is accessed sequentially according to the node order determined by the topology sorting of the directed graph of the data flow. When processing the currently accessed test point, its corresponding byte width is extracted from the test point specification registry. The value currently stored in the addressing cursor register is established as the static offset addressing amount of the test point in the shared memory region. The arithmetic logic unit performs an addition operation on the extracted byte width and the current value of the addressing cursor register variable.
[0040] For the temporary endpoint address generated by the addition operation, the system extracts the basic alignment byte span of adjacent subsequent measurement points, limited by their physical data type. The basic alignment byte span is 2, 4, or 8 bytes according to the specification. The arithmetic logic unit executes the following boundary alignment and compensation calculation formula: ; ; ; In the formula, This is the temporary endpoint address generated by the addition operation; Align the byte span based on the base; The remainder obtained from the modulo operation; when This indicates misalignment, meaning the temporary endpoint address has broken the natural read boundary of the processor cache line. To determine the size of the compensation gap; This is the static offset addressing amount that is aligned to the nearest bus hardware boundary after superposition compensation. The null byte offset corresponding to this compensation gap is directly superimposed on the temporary endpoint address, forcing the addressing cursor to move forward and align to the nearest valid bus hardware boundary.
[0041] The endpoint pointer position generated during the accumulation process is recorded as the static offset addressing value for adjacent subsequent test points, until all test points have been traversed, forming a continuous, fragment-free memory mapping table. The endpoint pointer position after alignment is overwritten into the addressing cursor register, serving as the basis for calculating the static offset addressing value for the next loop node. After the loop ends, the memory layout allocation engine combines the physical identifier of each test point, the corresponding static offset addressing value, and the byte width to generate and output a continuous, fragment-free memory mapping table.
[0042] Step S104: Convert the assembled low-code business component into an abstract syntax tree, and search for the call expression node responsible for performing string deserialization parsing in the abstract syntax tree.
[0043] like Figure 4As shown, the lexical analysis engine is invoked to perform a character-by-character scan of the business source code, generating the abstract syntax tree in a tree-like hierarchical distribution. The compiler front-end module receives the business source code stream generated by the low-code business component, starts the lexical analysis engine to perform lexical unit segmentation on the character stream according to the state machine matching rules, and generates a lexical token stream. The state machine matching rules are specifically built based on a deterministic finite automaton (DFA), and its internal logic flow includes an initial state, an object identifier state, an operator state, and a target hit state. For text deserialization features, the state machine has a specific trigger transition path hard-coded internally: when the character scan continuously reads the characters "J", "S", "O", and "N" without any state interruption, the state machine transitions to the object identifier state; then, if the attribute access operator (dot ".") is read, and the subsequent state sequence successfully matches the characters "p", "a", "r", "s", and "e" in sequence, the state machine determines that the target hit state has been reached, and immediately outputs a target call token with the native character parsing label to the syntax parsing module. This explicit character-by-character flow recognition ensures the accurate extraction of target grammatical units that could cause drastic fluctuations in heap memory from the massive business source code. The syntax parsing module extracts this token stream, performs a reduction operation according to the grammar rules, instantiates node objects with parent-child linked pointer attributes in the working memory, and constructs the abstract syntax tree in a tree-like hierarchical distribution.
[0044] Within the tree-like hierarchical distribution, a visitor pattern is applied to perform a depth-first search, intercepting node branches whose signatures are native character parsing methods. The system instantiates a visitor pattern object and, starting from the top-level root node of the abstract syntax tree, performs a depth-first search algorithm along the internal child node references. Upon entering a syntax node, its type is determined; if it is a call expression node, the target object identifier and the called function attribute are extracted and concatenated to generate a signature. In the signature extraction stage, the lexical analysis engine extracts the object identifier string representing the host environment's execution subject and the method name string representing the specific action, and uses dot characters to strictly concatenate literals according to the call hierarchy, for example, assembling the text "JSON.parse" or "TextDecoder.decode". The pre-built native character parsing method signature library is constructed in the kernel as a read-only hash map, whose key-value fields hard-coded include the full names of all parsing interfaces that can trigger high-frequency allocation of temporary objects in heap memory in the low-code platform. The comparison process calculates the hash value of the concatenated signature and performs collision addressing with constant time complexity in this hash map. The signature is compared with a pre-built native character parsing method signature library. If a match is found, it indicates that the node branch will call the parsing engine at runtime to convert the text payload into a dynamic memory object. The visitor object will then intercept the memory reference pointer of that node branch.
[0045] The compiler verifies whether the input parameters of the intercepted node branch originate from the parameter field of the network request callback function. If so, the intercepted node branch is marked as the calling expression node that needs to be replaced. The source tracing and verification analysis engine recursively searches for the initial declaration position of the input parameter variable of the node by following the context scope link attached to the node. If it is confirmed that the assignment and propagation link of the variable originates from inside the parameter field of the network request callback function, it proves that the data being processed is a communication sensor message, and the compiler officially marks the node branch as the calling expression node that needs to be replaced.
[0046] The process of generating the reconstructed syntax tree also includes: weaving in a memory out-of-bounds protection syntax node in the reconstructed syntax tree before the execution entry point of the underlying typed array access syntax branch.
[0047] The memory out-of-bounds protection syntax node encapsulates comparison and verification logic to compare the static offset addressing amount with the extreme boundary of the shared memory region during program runtime. If the value exceeds the extreme boundary, the pointer read operation is blocked and an out-of-bounds exception warning is thrown, thereby preventing illegal memory access from causing system crashes. The code refactoring engine retrieves the total physical byte length span parameter of the shared memory region actually allocated during the current process's lifetime from the operating system's memory management interface, and generates the extreme boundary constant node representing the absolute safety limit. Simultaneously, a binary arithmetic addition expression syntax node containing the static offset addressing amount and the measurement point width is constructed. The memory out-of-bounds protection syntax node is instantiated in the abstract syntax tree, and its judgment condition is set to the comparison and verification logic. This logic compares the binary addition expression node with the extreme boundary constant node using the greater than operator. Within the branch where the condition is true, a statement blocking the execution flow is instantiated, and then this security control gateway is woven into the main execution path of the underlying typed array access syntax branch.
[0048] Step S105: Replace the searched call expression node with the underlying typed array access syntax branch, and inject the static offset address as a constant parameter into the index input parameter position of the underlying typed array access syntax branch to generate a reconstructed syntax tree.
[0049] The code generation engine instantiates a system interface call node with view-crossing read capabilities. It dynamically allocates and instantiates a cluster of child nodes conforming to binary read call instruction specifications within the memory workspace, constructing the underlying typed array access syntax branch. This syntax branch internally defines the system interface call node with view-crossing read capabilities. In a high-level language interpreter (such as the V8 engine or JavaScriptCore), this system interface call node is specifically mapped to the DataView application programming interface, which directly manipulates SharedArrayBuffer objects. Based on the extracted physical data types, the code generation engine hard-matches the specific instance methods of the DataView object in the native API dictionary: for example, when the physical data type is "int32", it matches and instantiates the "DataView.prototype.getInt32" call node; when it is "uint16", it instantiates the "DataView.prototype.getUint16" call node. During the assembly and reconstruction of the syntax tree, the system injects the reference handle of the SharedArrayBuffer as the underlying data source and directly loads the static offset addressing quantity calculated in the preceding steps into the "byteOffset" parameter field of the specific instance method, thereby establishing a copy-free direct addressing data flow channel based on physical shared memory blocks at the AST node level. The code refactoring engine queries the continuous, fragment-free memory mapping table to extract the specific value of the static offset addressing quantity of the corresponding test point of the marked call expression node and converts it into a numeric constant syntax node. A pointer replacement operation is performed within the syntax tree to sever the connection between the original call expression node and its context execution pointer structure, connect to the constructed underlying typed array access syntax branch, and after converting the static offset addressing quantity into a numeric constant syntax node, inject it as a constant parameter into the input parameter position of the underlying typed array access syntax branch for receiving the address index.
[0050] To prevent the repeated creation of closure environments within the high-frequency rendering loop of the view, during node replacement, the variable declaration statements of the instantiated system interface call nodes are hoisted to the top-level module scope of the component. This ensures that the refactored low-code business component only establishes a static memory mapping handle during the initialization phase, allowing it to be reused in subsequent rendering loops. The abstract syntax tree optimization module searches for the variable declaration statement node responsible for executing the system physical channel binding request within the newly accessed branch, removes it from the scope of the local data update rendering function body, and hoists it across levels along the parent reference chain to the top-level module scope representing the global runtime lifecycle of the component. This allows the refactored component to generate the static memory mapping handle during initialization and scheduling loading, and the handle can be reused directly through the environment variable chain during subsequent view refresh loop execution phases, eliminating memory consumption caused by dynamically allocating closure space in the local loop environment.
[0051] The system detects whether the output byte order of the underlying hardware device connected to the host runtime environment is big-endian or little-endian. When it is determined that the output byte order is inconsistent with the local architecture byte order of the host runtime environment, an additional bitwise operation node is inserted into the reconstructed syntax tree to perform high-low byte flipping, ensuring that the binary data extracted through the underlying typed array access syntax branch matches the local architecture byte order of the host runtime environment.
[0052] The system verification and interception module extracts the register addressing layout markers of the source hardware chip control structure from the object model configuration file, determining whether its byte order is big-endian or little-endian. Simultaneously, it calls the local operating system interface to determine the local architecture byte order of the instruction set of the hardware environment where the high-level language interpreter resides. When a reverse architecture conflict is determined, the code refactoring engine dynamically embeds a set of bitwise operation nodes between the read node of the underlying typed array access syntax branch and the subsequent computational logic node. These bitwise operation nodes utilize bitwise truncation mechanisms, logical left shift, and logical right shift instructions to perform single-byte segment separation and span shifting on the extracted continuous multi-byte data fragments.
[0053] Taking the processing of 16-bit unsigned integer sensor messages commonly found in industrial settings as an example, the bitwise flip logic for span shifting is as follows: ; ; ; In the formula, This represents the received raw heterogeneous end-sequence sensor data scalar; The high-order byte segment is separated by applying bit logic to the original data and shifting it to the right. This represents the low-order byte segment separated after applying bit logic truncation to the original data and shifting it left; This indicates the new end-order data generated after the high and low bytes are flipped and recombined bitwise.
[0054] The operation is performed within the arithmetic logic unit, and then compounded into a normal endian arithmetic scalar using a bitwise OR (|) instruction. This process completes the physical swapping of heterogeneous endianness without dynamically allocating any intermediate byte arrays in the memory heap, thus preventing byte misinterpretation anomalies caused by heterogeneous devices.
[0055] like Figure 5 As shown, when the underlying communication protocol stack overwrites the pure binary stream to the shared storage area, the process specifically includes: after receiving the original sensor message, the underlying communication protocol stack strips the protocol header and checksum tail carried by the original sensor message; the pure sensor payload remaining after stripping is directly overwritten to the shared storage area according to the static offset addressing amount corresponding to each predefined measurement point; during the entire overwriting process, the action of dispatching cross-language call events to the high-level language interpreter is intercepted, thereby ensuring that the object allocator inside the high-level language interpreter is not woken up.
[0056] The message parsing module performs a byte scan on the raw sensor messages arriving at the network buffer according to the underlying industrial bus protocol. It uses a memory cursor to identify the message timing control header and verifies the integrity sequence through cyclic redundancy check (CRC) logic. After confirming the message is undamaged, it performs a step-by-step skip operation, skipping the protocol header and the subsequent check tail, extracting only the continuous data structure containing the measurement status scalar to form the clean sensor payload. The underlying communication protocol stack, combined with the identified device addressing identifier, queries the associated static offset addressing value and calls a block copy overwrite instruction to directly physically refresh and overwrite the clean sensor payload to the allocated address range within the shared storage area. Throughout the entire underlying overwrite cycle, the cross-process event routing management module is configured in a silent interception state, completely blocking the delivery of data-ready asynchronous messages and callback notification events to the high-level language interpreter. This silent interception state is not merely application-layer logic ignoring, but rather an interception deep within the system call layer. The specific implementation steps are as follows: In the event multiplexing polling mechanism at the underlying level of the host runtime environment (such as the operating system's epoll or select mechanism), the cross-process event routing management module locates the inter-process communication (IPC) socket file descriptor bound between the underlying communication protocol stack and the high-level language interpreter; and forcibly removes the read-ready (EPOLLIN) listening flag on the socket file descriptor through bitwise operations (such as bit clearing instructions). This underlying configuration change ensures that when the underlying communication protocol stack writes data to the shared memory area, the operating system kernel will not set the socket to the ready state, thus completely blocking the path to send a wake-up interrupt signal to the high-level language interpreter process. This achieves true silence, ensuring that the temporary memory object allocator associated with the high-level language interpreter remains suspended and dormant during high-frequency refresh of sensor data. Because it is bypassed and isolated, the high-level language interpreter does not receive the trigger signal for communication changes, and the object allocator of its internal associated memory allocation control configuration remains in a dormant and suspended state, which physically and logically cuts off the transmission link of object heap space consumption allocation action caused by communication access refreshing memory.
[0057] Step S106: The target business logic block constructed based on the reconstructed syntax tree is sent to the host runtime environment for execution. When the underlying communication protocol stack inside the host runtime environment overwrites the pure binary stream to the shared storage area, the target business logic block initiates a zero-copy read based on the static offset addressing value, thereby avoiding thread pauses caused by the automatic garbage collection mechanism.
[0058] The bytecode just-in-time compiler parses the finalized refactored syntax tree, compiles and transforms it into a sequence of machine code instructions that the host virtual machine can directly execute, forming the target business logic block. The system control scheduler loads this target business logic block into the main execution thread stack of the high-level language interpreter for deployment. The program execution is independent of network packet callback triggering dependencies, relying solely on a pre-defined monitoring view redraw clock cycle-triggered execution mechanism. Within each data reading branch that is woken by the clock to perform rendering calculations, the target business logic block, after verifying the boundary through the security gateway using verification instructions, reuses the global static memory access mapping channel saved during the initialization phase and directly reads and extracts data using the static offset addressing quantity (a read-only scalar) with zero-copy physical addressing and no intermediate buffer. The directly acquired data segment is fed back to the front-end interface for rendering via an additional displacement adjustment component. Because the business extraction process is strictly limited to fixed physical boundary access instructions, no new system object capacity allocation requests are generated, thus eliminating the prerequisite for suspending the business process by activating the system garbage collection management thread, ensuring a stable and low-latency operation for high-frequency sensor industrial packet reading.
[0059] It should be noted that, in order to implement the above method, this embodiment of the invention configures multiple software engines and components in the underlying architecture to collaboratively constitute the corresponding system modules. The configuration parsing module mentioned above collaboratively constitutes the specification extraction module; the recommendation rule engine supports the resource recommendation module; the memory layout allocation engine supports the assembly offset module; the lexical analysis engine and the source tracing and verification analysis engine collaboratively implement the function of the node search module; the code refactoring engine executes the logic of the refactoring and replacement module; and the message parsing module and the bytecode just-in-time compiler jointly implement the zero-copy execution module.
[0060] Based on the same inventive concept, embodiments of the present invention also provide a low-code component intelligent recommendation and dynamic assembly system for specific business scenarios, applicable to a host runtime environment with an automatic garbage collection mechanism, such as... Figure 6 As shown, it includes: The specification extraction module is used to parse the object model configuration file corresponding to the specific business scenario and extract the measurement point data specifications of the sensor to be connected. The resource recommendation module is used to recommend low-code business components with typed array access interfaces from the preset component library based on the specifications of the measurement point data. An assembly offset module is used to respond to assembly instructions for the recommended low-code service components by allocating static offset addressing values for each measurement point in the shared storage area at the bottom layer of the host runtime environment. The node search module is used to convert the assembled low-code business components into an abstract syntax tree, and search for the call expression node responsible for performing string deserialization parsing in the abstract syntax tree; The refactoring and replacement module is used to replace the searched call expression node with the underlying typed array access syntax branch, and inject the static offset address as a constant parameter into the index parameter position of the underlying typed array access syntax branch to generate a refactored syntax tree. The zero-copy execution module is used to send the target business logic block constructed based on the reconstructed syntax tree to the host runtime environment for execution. When the underlying communication protocol stack inside the host runtime environment overwrites the pure binary stream to the shared storage area, the target business logic block initiates a zero-copy read based on the static offset address, thereby avoiding thread pauses caused by the automatic garbage collection mechanism.
[0061] In this embodiment, each module of the system is permanently stored in the memory of the electronic device as a resident computer program instruction segment, and the modules interact with each other through a data transmission mechanism. The specification extraction module is equipped with a text analysis engine and a dictionary mapping structure to locate and parse the sensor channel attribute nodes of the configuration file, extract the physical data type, byte width, and sign bit specifier, and convert them into a standard structure to be stored in the measurement point specification registry. The resource recommendation module monitors the garbage collection pause time through the underlying interface to obtain the pause time parameter. When the pause time exceeds the safety threshold extreme value, the implicit closure allocation and regular expression extraction components are blocked, and a recommendation list is generated for resources that support direct memory access instructions. The assembly offset module captures the front-end connection parameters to generate a directed graph reflecting the time sequence of data flow, accumulates the data based on the node span, and performs step modulus alignment operation to generate a memory mapping table for absolute displacement allocation. The node search module uses lexical segmentation and context-independent rules to construct an AST abstraction layer, and applies a search cursor with source environment check and verification rules to extract and confirm the original deserialized node position. The reconstruction and replacement module dynamically requests array syntax objects with cross-boundary access interfaces to replace the main path nodes, hard-codes and binds address constant input parameters, elevates the scope level of global variables, and performs end-to-end reversal correction sequence weaving and anti-outboundion comparison statement gateway construction operations. The zero-copy execution module compiles the reconstruction model and, while performing physical protocol division, purification, extraction, and silent overwrite operations on the protocol stack, completes real-time stable view redrawing output by cutting off external wake-up communication and the built-in reuse read mode of business components, completely eliminating the need for object container request environments.
[0062] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios, characterized in that, Applicable to host runtime environments with automatic garbage collection mechanisms, including: Parse the object model configuration file corresponding to the specific business scenario and extract the measurement point data specifications of the sensors to be connected; Based on the specifications of the measurement point data, low-code business components with typed array access interfaces are recommended in the pre-built component library; In response to the assembly instructions for the recommended low-code service components, static offset addressing amounts are allocated for each measurement point in the shared storage area at the underlying layer of the host runtime environment. The assembled low-code business components are converted into an abstract syntax tree, and the call expression node responsible for performing string deserialization parsing is searched in the abstract syntax tree; The searched call expression node is replaced by the underlying typed array access syntax branch, and the static offset address is injected as a constant parameter into the index parameter position of the underlying typed array access syntax branch to generate a reconstructed syntax tree; The target business logic block, constructed based on the reconstructed syntax tree, is deployed to the host runtime environment for execution. This allows the target business logic block to initiate a zero-copy read by using the static offset addressing value when the underlying communication protocol stack within the host runtime environment overwrites the pure binary stream to the shared storage area, thereby avoiding thread pauses caused by the automatic garbage collection mechanism.
2. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, Based on the specifications of the measurement point data, the following low-code business components with typed array access interfaces are recommended from the pre-built component library: Detect the recent garbage collection pause time parameters of the host operating environment; When the garbage collection pause time parameter exceeds a preset safety threshold, conventional components that use traditional string binding are blocked in the preset component library; Components with pre-compiled underlying templates that support the specified measurement point data specifications are selected and presented as candidate resources in the visual orchestration panel.
3. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, The allocation of static offset addressing values for each measurement point within the shared storage area at the underlying layer of the host runtime environment includes: Based on the physical device access order set in the object model configuration file, a directed graph of data flow for all measurement points is generated. Starting from the 0-bit base address of the shared storage area, and according to the sequential node order set in the directed graph of the data flow, the byte width bound to each measurement point is accumulated one by one. The endpoint pointer position generated during the accumulation process is recorded as the static offset addressing amount of the adjacent subsequent measurement points until all measurement points have been traversed, forming a continuous and fragment-free memory mapping table.
4. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, The process of converting the assembled low-code business component into an abstract syntax tree, and searching within the abstract syntax tree for the call expression node responsible for performing string deserialization parsing, includes: The lexical analysis engine is invoked to perform a character-by-character scan of the business source code, generating the abstract syntax tree in a tree-like hierarchical distribution; Within the tree-like hierarchical distribution, a visitor pattern is applied to perform a depth-first search, intercepting node branches whose feature signatures are derived from the native character parsing method; Verify whether the source of the input parameters of the intercepted node branch can be traced back to the parameter field of the network request callback function. If so, mark the intercepted node branch as the calling expression node that needs to be replaced.
5. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, The step of injecting the static offset address as a constant parameter into the index input position of the underlying typed array access syntax branch to generate a reconstructed syntax tree includes: Instantiate a system interface call node that has the ability to read views across different contexts; When performing node replacement, the variable declaration statements of the instantiated system interface call node are hoisted to the top-level module scope of the component, so that the refactored low-code business component only establishes a static memory mapping handle during the initialization phase, and can then reuse the static memory mapping handle in subsequent rendering cycles.
6. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, After generating the reconstructed syntax tree, the process also includes: The system detects whether the output byte order of the underlying hardware device connected to the host operating environment is big-endian or little-endian. When it is determined that the output byte order is inconsistent with the local architecture byte order of the host runtime environment, an additional bitwise operation node is inserted into the reconstructed syntax tree to perform high-low byte flipping, ensuring that the binary data extracted through the underlying typed array access syntax branch is consistent with the local architecture byte order of the host runtime environment.
7. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, The host runtime environment is internally divided into the underlying communication protocol stack and the high-level language interpreter; The underlying communication protocol stack is responsible for calling the polling script to continuously pull raw sensor messages from the underlying hardware device; The high-level language interpreter is responsible for carrying the view rendering logic and business calculation logic of the target business logic block; The shared storage region is a static random access storage block mapped within the physical memory space and accessible concurrently across processes by the underlying communication protocol stack and the high-level language interpreter.
8. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 7, characterized in that, When the underlying communication protocol stack overwrites a pure binary stream to the shared storage area, the specific steps include: After receiving the original sensing message, the underlying communication protocol stack strips the protocol header and checksum tail carried in the original sensing message. The pure sensing payload remaining after stripping is directly overwritten into the shared storage area according to the predefined static offset addressing amount corresponding to each measurement point; Throughout the overwrite process, the action of dispatching cross-language call events to the high-level language interpreter is intercepted.
9. The method for intelligent recommendation and dynamic assembly of low-code components for specific business scenarios according to claim 1, characterized in that, The process of generating the reconstructed syntax tree also includes: In the reconstructed syntax tree, a memory out-of-bounds protection syntax node is woven in before the execution entry point of the underlying typed array access syntax branch; The memory out-of-bounds protection syntax node encapsulates comparison and verification logic, which is used to compare the static offset addressing amount with the extreme boundary of the shared storage region during program execution. If the value exceeds the specified extreme value boundary, the pointer read operation will be blocked and an out-of-bounds exception warning will be thrown.
10. A low-code component intelligent recommendation and dynamic assembly system for specific business scenarios, characterized in that, Applicable to host runtime environments with automatic garbage collection mechanisms, including: The specification extraction module is used to parse the object model configuration file corresponding to the specific business scenario and extract the measurement point data specifications of the sensor to be connected. The resource recommendation module is used to recommend low-code business components with typed array access interfaces from the preset component library based on the specifications of the measurement point data. An assembly offset module is used to respond to assembly instructions for the recommended low-code service components by allocating static offset addressing values for each measurement point in the shared storage area at the bottom layer of the host runtime environment. The node search module is used to convert the assembled low-code business components into an abstract syntax tree, and search for the call expression node responsible for performing string deserialization parsing in the abstract syntax tree; The refactoring and replacement module is used to replace the searched call expression node with the underlying typed array access syntax branch, and inject the static offset address as a constant parameter into the index parameter position of the underlying typed array access syntax branch to generate a refactored syntax tree. The zero-copy execution module is used to send the target business logic block constructed based on the reconstructed syntax tree to the host runtime environment for execution. When the underlying communication protocol stack inside the host runtime environment overwrites the pure binary stream to the shared storage area, the target business logic block initiates a zero-copy read based on the static offset address, thereby avoiding thread pauses caused by the automatic garbage collection mechanism.
