A node compiling method and device and a storage medium

By determining the node attribute type in the quick application and creating listeners only for nodes with dynamic attributes, the high cost of building and maintaining front-end frameworks is solved, memory usage and performance are optimized, and application running efficiency is improved.

CN119718322BActive Publication Date: 2026-07-10BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2023-09-27
Publication Date
2026-07-10

Smart Images

  • Figure CN119718322B_ABST
    Figure CN119718322B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a node compiling method, device and storage medium. The node compiling method comprises: in response to performing fast application element node attribute binding, determining an attribute value type of the element node, the attribute value type being a dynamic attribute or a static attribute; based on the attribute value type, creating a listener for the element node, the listener being used for monitoring changes in data corresponding to the node attribute. Through the present disclosure, the application side memory occupation can be reduced, unnecessary memory consumption is reduced, the performance of the application program is improved, and the continuous running time of a large fast application is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of application services - front-end technology, and in particular to a node compilation method, apparatus and storage medium. Background Technology

[0002] To allow users to experience application content smoothly without downloading and installing software, Quick Apps were created. Quick Apps combine the advantages of HTML5 (HyperText Markup Language) pages and apps, enabling users to use them instantly without downloading or installing, while also enjoying the perfect performance experience of an app.

[0003] For Quick Apps, the large number of states in the view layer makes the construction and maintenance of the front-end framework in the model layer relatively costly. In addition, the reactive data in Quick Apps will create listeners to monitor the data, which is relatively performance-intensive. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a node compilation method, apparatus and storage medium.

[0005] According to a first aspect of the present disclosure, a node compilation method is provided, comprising, in response to performing quick app element node attribute binding, determining the attribute value type of the element node, wherein the attribute value type is a dynamic attribute or a static attribute; and, based on the attribute value type, creating a listener for the element node, wherein the listener is used to monitor changes in data corresponding to the node attribute.

[0006] In one implementation, creating a listener for the element node based on the attribute value type includes: if it is determined that the attribute value type is a static attribute, then not creating a listener for the element node.

[0007] In one implementation, creating a listener for the element node based on the attribute value type includes: if it is determined that the attribute value type is a dynamic attribute, then creating a listener for the element node.

[0008] In one implementation, determining the attribute value type of the element node includes:

[0009] The static modifier of the element node is queried. The static modifier is used to identify that the attribute value type is a static attribute. If the static modifier is found, the attribute value type of the element node is determined to be a static attribute. If the static modifier is not found, the attribute value type of the element node is determined to be a dynamic attribute.

[0010] In one implementation, the static modifier is pre-added to the corresponding attribute of the element node.

[0011] According to a second aspect of the present disclosure, a node compilation apparatus is provided, comprising a determining unit configured to determine the attribute value type of the element node in response to performing quick app element node attribute binding, wherein the attribute value type is a dynamic attribute or a static attribute; and a creating unit configured to create a listener for the element node based on the attribute value type, wherein the listener is configured to monitor changes in data corresponding to the node attribute.

[0012] In one implementation, the creation unit creates a listener for the node based on the attribute value type in the following manner: if the attribute value type is determined to be a static attribute, then no listener is created for the element node.

[0013] In one implementation, the creation unit creates a listener for the element node based on the attribute value type in the following manner: if it is determined that the attribute value type is a dynamic attribute, then a listener is created for the element node.

[0014] In one embodiment, the determining unit determines the attribute value type of the element node in the following manner: querying the static modifier of the element node, the static modifier being used to identify that the attribute value type is a static attribute; if the static modifier is found, the attribute value type of the element node is determined to be a static attribute; if the static modifier is not found, the attribute value type of the element node is determined to be a dynamic attribute.

[0015] In one embodiment, the static modifier is pre-added to the corresponding attribute of the element node.

[0016] According to a third aspect of the present disclosure, a node compilation apparatus includes: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the node compilation method described in the first aspect or any embodiment of the first aspect.

[0017] According to a fourth aspect of the present disclosure, a storage medium is characterized in that the storage medium stores instructions that, when executed by a processor of a terminal, enable the terminal to execute the node compilation method described in the first aspect or any embodiment of the first aspect.

[0018] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: in response to the binding of quick app element nodes, the attribute value type of the element node is determined, and a listener is created based on the attribute type of the element node to monitor changes in data. Through this disclosure, the number of observers on component instances is reduced, thereby reducing the memory footprint on the application's JavaScript (scripting language) side, improving application performance, increasing the continuous running time of large quick apps, and significantly improving the application's memory usage.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0021] Figure 1 This is a block diagram illustrating an MVVM framework according to an exemplary embodiment.

[0022] Figure 2 This is a flowchart illustrating a node compilation method according to an exemplary embodiment.

[0023] Figure 3 This is a flowchart illustrating a method for creating a listener according to an exemplary embodiment.

[0024] Figure 4 This is a flowchart illustrating a method for determining the attribute value type of an element node according to an exemplary embodiment.

[0025] Figure 5 This is a block diagram illustrating test data according to an exemplary embodiment.

[0026] Figure 6 This is a block diagram illustrating a node compilation apparatus according to an exemplary embodiment.

[0027] Figure 7 This is a block diagram of an apparatus for node compilation according to an exemplary embodiment.

[0028] Figure 8 This is a block diagram of an apparatus for node compilation according to an exemplary embodiment. Detailed Implementation

[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure.

[0030] This disclosure provides a scenario applicable to node compilation.

[0031] In related technologies, under the MVVM (Model-View-ViewModel) model in the front end, the goal of different frameworks is to use data to drive the page. However, each framework has different solutions for how to handle data changes. The core of the MVVM framework is how to notify the page to update after the data changes. For example, the three major front end frameworks have different ways of handling data: (1) Dirty checking, which means checking whether the data has changed every time the user interacts. If there is a change, the DOM (DomActions) method is updated. (2) Virtual DOM, which means that a virtual DOM is designed on top of the browser DOM when the page is initialized. It is to use a JavaScript object to describe the entire DOM tree. The React framework allows developers to calculate the changed data through the virtual DOM and make precise modifications. (3) Reactive data, similar to the Vue framework, the solution of the Quick App front end framework is to use reactivity. When the component is initialized, the listener listens to each property of the data. When the data changes, it can accurately know that a certain key of the data has changed, and then modify the corresponding DOM accordingly.

[0032] like Figure 1The diagram illustrates an MVVM framework according to an exemplary embodiment. Existing related technologies are part of the MVVM framework. In a quick app, the view layer (View) is a component template described using HTML tags; the viewmodel layer is a VM object representing component instances; and the data layer (Model) refers to objects such as data, computed, and methods. The process involves initializing the MVVM object, compiling the template, parsing directives, and performing different processing based on the directives. When directives or the `{{}}` symbol are encountered during parsing, it indicates the need for dynamic DOM rendering. Therefore, a listener is instantiated, and initialization parameters are rendered first, passing in the data-bound parameters corresponding to the directive (attr = "{{data.a}}"). When the data changes, the listener listens for the data in `data.a`, and can then obtain the latest value to partially update the view. The quick app framework uses `defineProperty` to intercept data and rewrite the object's get / set functions, ensuring that each data modification triggers the listener to render the latest data.

[0033] Therefore, the MVVM framework enables data binding between the data layer and the view layer, and binding between the view layer and the data layer. When the data in the data layer changes, it can automatically trigger the view layer to render the data, allowing application developers to focus more on business logic rather than frequent DOM manipulation.

[0034] Currently, the mainstream front-end framework Vue, during component initialization, iterates through the `data` object passed to the Vue instance and proxies all property keys of this `data` object. This is achieved by using `Object.defineProperty` to set getters and setters for all properties of the `data` object. The proxied object allows the framework to collect dependencies, meaning it notifies the framework of changes when a property key is accessed or modified.

[0035] The Vue framework creates a listener for each piece of data bound to a component template, and this listener monitors each property of that data. When the data changes, i.e., when the data's setter is triggered, the listener is notified, causing its associated component to re-render. In other words, the framework creates listeners for static data, even if the data never changes, meaning the listener will never be triggered, ultimately leading to high application memory costs.

[0036] In one example, the template section defines a text component where a name is input. The template section, similar to HTML's tag language, combines basic components, custom components, and events to construct the page structure. The script section inputs values ​​for `name` and `isAutofocus`. `name` retrieves the input name, and `isAutofocus` indicates whether the current component can automatically gain focus. The script section defines page data and implements lifecycle interfaces, including options for defining page data, page lifecycle parameters, and user-defined functions such as event callbacks.

[0037] In related technologies, the listener object (vm._watchers) on the component instance stores listeners for these data functions. If a large amount of "static data" is bound in the component template, then the component instance's vm._watchers will correspondingly contain many listeners used to monitor property data. This data is never modified, meaning these listeners are never triggered in the application, which is performance-intensive and causes unnecessary memory consumption.

[0038] In view of this, this disclosure proposes a method for node compilation using listeners. This method includes determining whether a node attribute has a static modifier, and creating a listener based on the presence or absence of the static modifier, thereby optimizing application memory usage.

[0039] This disclosure provides a node compilation method.

[0040] Figure 2 This is a flowchart illustrating a node compilation method according to an exemplary embodiment. (See also...) Figure 2 As shown, the compilation method for this node includes the following steps:

[0041] In step S11, in response to performing quick application element node attribute binding, the attribute value type of the element node is determined, and the attribute value type is either dynamic attribute or static attribute.

[0042] In this embodiment, in response to binding the attributes of quick app element nodes, the application typically running on the device is a built quick app. After development, the quick app needs to be built using the hap-toolkit (development and compilation) tool to generate a quick app rpk artifact. After the application is built, it can run on the device. During runtime, the application first reads its manifest (configuration) information and common library configuration, followed by application creation. During quick app runtime, the application framework performs tag interpretation, node compilation, data binding, change monitoring, and generates the corresponding VDO DOM tree. Finally, it sends the operation instructions representing the DOM tree to the Native rendering layer to map them into a View tree, completing the entire rendering process of the application.

[0043] In this embodiment of the disclosure, when compiling a node, the Quick App binds attributes, styles, events, etc., to the element node, giving the element certain capabilities. Binding attributes refers to iterating through the element's attributes and binding them one by one. Specifically, for attributes with function values, the Quick App framework determines whether the attribute value is a dynamic or static attribute.

[0044] Static properties can be understood as static data, which refers to data primarily used for control or reference during runtime. They do not change over a long period and generally do not change with runtime. This runtime process can be understood as allowing developers to statically mark components or properties when data is requested from the server or initialized. Dynamic properties, on the other hand, can be understood as dynamic data, including all data that changes during runtime, as well as data that needs to be input or output during runtime and data that needs to be changed during online operations—in other words, properties other than static properties.

[0045] In this embodiment, marking an attribute as static indicates that the current element node already has a static modifier; that is, the attribute value type of the current element node is a static attribute, and the attribute value of the current node will not change. This embodiment prevents the creation of listeners associated with the node attribute on the component instance, avoiding unnecessary memory consumption.

[0046] In step S12, a listener is created for the element node based on the attribute value type. The listener is used to monitor changes in the data corresponding to the node attributes.

[0047] In the disclosed embodiments, a listener is created for the element node based on whether the attribute value is a dynamic attribute or a static attribute.

[0048] The following embodiments of this disclosure describe the process of creating listeners for element nodes based on attribute value types, as described in the above embodiments.

[0049] In one implementation, if the attribute type is a static attribute, no listener is created for the element node.

[0050] In this embodiment of the disclosure, if the attribute value is determined to be static data, that is, the data will not change after it is requested from the server or initialized, then if the attribute value type is determined to be a static attribute, a listener will not be created for the element node, and the function calculation value will be returned directly to avoid bringing additional performance overhead to the application.

[0051] In one implementation, if the attribute type is a dynamic attribute, a listener is created for the element node.

[0052] In this embodiment, if the attribute value is determined to be a dynamic attribute, i.e., an attribute other than a static attribute, then the attribute value type is determined to be dynamic. A listener is then created for the element node. When the node's attribute is updated, i.e., after the data changes, the listener monitors the data change and notifies the page to update. A corresponding VDOM tree is generated, and finally, the operation instructions representing the DOM tree are sent to the rendering layer to complete the entire rendering process.

[0053] The following embodiments of this disclosure describe the process of creating a listening device.

[0054] Figure 3 This is a flowchart illustrating a method for creating a listener according to an exemplary embodiment. See also... Figure 3 As shown, the method for creating a listener includes the following steps:

[0055] In step S21, the attribute value type is determined.

[0056] In step S22a, the attribute type is determined to be a static attribute, and no listener is created for the element node.

[0057] In step S22b, the attribute value type is determined to be a dynamic attribute, and a listener is created for the element node.

[0058] This embodiment of the disclosure determines whether a listener is needed by using attribute values, which can save application memory and optimize system performance.

[0059] In one implementation, a static modifier is created to identify that the attribute value type is a static attribute. The attribute value type is determined by querying the static modifier of the element node.

[0060] The following describes the determination of the attribute value type of the element node in this embodiment.

[0061] Figure 4 This is a flowchart illustrating a method for determining the attribute value type of an element node according to an exemplary embodiment. See also... Figure 4As shown, the method for determining the attribute value type of an element node includes the following steps:

[0062] In step S31, the static modifier of the element node is queried. The static modifier is used to identify that the attribute value type is a static attribute.

[0063] In this embodiment, during application build and project compilation, components automatically generate nodes. Each node contains a modifier object, which represents the modifiers of the data bound to the current component node. In one example, a static modifier is marked for the `name` attribute on the component instance. After component build, a `modifiers` object is generated in the component template section; that is, an object containing modifiers is generated. In this embodiment, this can be understood as generating an object containing static modifiers. The corresponding attributes all contain static modifiers, which are used to identify that the attribute value type is static. In other words, if an element node has a static modifier, its attribute value is determined to be a static attribute. If no static modifier exists, the attribute value is determined to be a dynamic attribute.

[0064] In step S32, if a static modifier is found, the attribute value type of the element node is determined to be a static attribute.

[0065] In the disclosed embodiments, when the Quick App framework binds attributes to a node, it retrieves the modifiers from the current element node. In one example, if both the `autofocus` and `value` properties in the `modifiers` object are modified with the `static` modifier, it indicates that the current element node contains the `static` modifier, and thus the attribute value type of the current element node is determined to be a static attribute. In this case, instead of creating a listener for the current element node, the framework directly returns the current function-computed value of the current element node.

[0066] In step S33, if no static modifier is found, the attribute value type of the element node is determined to be dynamic attribute.

[0067] In this embodiment, when the Quick App framework binds attributes to a node, the framework retrieves modifiers from the current element node. If no modifiers object is generated and no static modifiers exist, it indicates that the current element node does not contain static modifiers, and the attribute value type of the current element node is determined to be a dynamic attribute. After determining that the attribute value type of the current element node is a dynamic attribute, a listener can be created for the current element node to monitor data changes.

[0068] In this embodiment, the attribute value type of the current element node is determined by whether a static modifier can be found on the current element node. A listener is then created, which reduces the number of listeners on component instances, decreases application-side memory usage, improves application performance, and extends the continuous runtime of large, fast applications. This embodiment describes the determination of the static modifier.

[0069] In this embodiment of the disclosure, the static modifier is pre-added to the corresponding attribute of the element node.

[0070] The static modifiers used to decorate the current element node are pre-added to the corresponding element node. Developers statically mark components or properties within the Quick App framework and add static modifiers. That is, the developer determines whether the attribute value of the current element node will change. If it won't change, a static mark is made and a static modifier is added, preventing the creation of listeners associated with that node's attribute on the component instance. If the developer determines that the attribute value of the current element node will change, no static mark is made and no static modifier is added; that is, the developer does not perform any action on this node. When the node is compiled, if the attribute value type of the current element node is found to be a dynamic attribute, a listener is created directly.

[0071] The embodiments disclosed herein pre-add static modifiers, which can serve as the basis for determining whether to create a listener, thus avoiding additional performance overhead for the application.

[0072] This disclosure describes the basic process of developing and running a quick app.

[0073] In one example, during application development, the basic information of the application configuration and the application's public library configuration are read first to create the page. Then, the application is built using a build tool, compiling the components written during application development. At this point, a modifiers object is generated, which generates static modifiers for attributes marked as static data, serving as a basis for not creating listeners later. During application runtime, the Quick App framework focuses on the framework node compilation stage. When compiling nodes, the Quick App framework binds attributes, styles, events, etc., to element nodes, giving the elements certain capabilities. Specifically, binding node attributes involves binding each template.attr attribute individually; that is, for attr attributes with function values, the Quick App framework first checks whether the attribute has a static modifier.

[0074] In this embodiment of the disclosure, when an element is given and an attribute is bound, the system queries the node modifier table to see if there is a static modifier for the corresponding attribute. If it exists, it means that the attribute value type of the current element node is a static attribute, and the function-calculated value is returned directly. If it does not exist, it means that the attribute value type of the current element node is a dynamic attribute, and a listener for the attribute value function is created. The created listener is attached to the vm._watchers(listener) object.

[0075] In one example, when the current element node attribute value type is dynamic, a listener will be created and attached to the listener object to monitor data changes, update node attributes, and notify the page to update.

[0076] The above implementation process of the present disclosure can reduce the code in the front-end framework, reduce the construction and maintenance costs, reduce the creation of listeners, and reduce application-side memory while optimizing performance.

[0077] This disclosure illustrates the effectiveness of the node compilation method from the perspective of test data.

[0078] Figure 5 This is a block diagram illustrating test data according to an exemplary embodiment. See also... Figure 5 As shown, the test data includes the following:

[0079] In this embodiment of the disclosure, the memory difference before and after the pull-down was tested, and the memory difference before and after the pull-down was tested after the optimization. Through the static modifier scheme implemented in the quick app information flow page, it can be seen that the optimized scheme greatly improves the application's memory usage.

[0080] Based on the above embodiments, this disclosure embodiment responds to binding the attributes of quick app element nodes by determining the attribute value type of the element node and deciding whether to create a listener based on the attribute value type of the element node. In this approach, by reducing the number of listeners on component instances, the memory usage on the application side is reduced; at the same time, the performance of the application can be improved, as well as the continuous running time of large quick apps can be increased.

[0081] Based on the same concept, embodiments of this disclosure also provide a node compilation apparatus.

[0082] It is understood that the node compilation apparatus provided in this disclosure includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. In conjunction with the units and algorithm steps of the various examples disclosed in this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of this disclosure.

[0083] Figure 6 This is a block diagram of a node compilation apparatus according to an exemplary embodiment. (See also...) Figure 6 As shown, the device 100 includes a determining unit 101 and a creating unit 102.

[0084] The determining unit 101 is used to determine the attribute value type of the element node in response to performing quick application element node attribute binding. The attribute value type is either a dynamic attribute or a static attribute.

[0085] The creation unit 102 is used to create listeners for element nodes based on attribute value types. The listeners are used to monitor changes in the data corresponding to the node attributes.

[0086] In one implementation, the creation unit 102 creates a listener for a node based on the attribute value type in the following manner: if it is determined that the attribute value type is a static attribute, then no listener is created for the element node.

[0087] In another implementation, the creation unit 102 creates a listener for the element node based on the attribute value type in the following manner: if it is determined that the attribute value type is a dynamic attribute, then a listener is created for the element node.

[0088] In another embodiment, the determining unit 101 determines the attribute value type of the element node in the following manner: querying the static modifier of the element node, the static modifier being used to identify that the attribute value type is a static attribute; if the static modifier is found, the attribute value type of the element node is determined to be a static attribute; if the static modifier is not found, the attribute value type of the element node is determined to be a dynamic attribute.

[0089] In another implementation, the static modifier is pre-added to the corresponding attribute of the element node.

[0090] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0091] Figure 7 This is a block diagram illustrating an apparatus 200 for node compilation according to an exemplary embodiment. For example, apparatus 200 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0092] Reference Figure 7 The device 200 may include one or more of the following components: processing component 202, memory 204, power component 206, multimedia component 208, audio component 210, input / output (I / O) interface 212, sensor component 214, and communication component 216.

[0093] Processing component 202 typically controls the overall operation of device 200, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 202 may include one or more modules to facilitate interaction between processing component 202 and other components. For example, processing component 202 may include a multimedia module to facilitate interaction between multimedia component 208 and processing component 202.

[0094] Memory 204 is configured to store various types of data to support the operation of device 200. Examples of such data include instructions for any application or method operating on device 200, contact data, phonebook data, messages, pictures, videos, etc. Memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0095] The power supply component 206 provides power to the various components of the device 200. The power supply component 206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 200.

[0096] Multimedia component 208 includes a screen that provides an output interface between device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 208 includes a front-facing camera and / or a rear-facing camera. When device 200 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0097] Audio component 210 is configured to output and / or input audio signals. For example, audio component 210 includes a microphone (MIC) configured to receive external audio signals when device 200 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 204 or transmitted via communication component 216. In some embodiments, audio component 210 also includes a speaker for outputting audio signals.

[0098] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0099] Sensor assembly 214 includes one or more sensors for providing state assessments of various aspects of device 200. For example, sensor assembly 214 may detect the on / off state of device 200, the relative positioning of components such as the display and keypad of device 200, changes in the position of device 200 or a component of device 200, the presence or absence of user contact with device 200, the orientation or acceleration / deceleration of device 200, and temperature changes of device 200. Sensor assembly 214 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 214 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0100] Communication component 216 is configured to facilitate wired or wireless communication between device 200 and other devices. Device 200 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 216 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 216 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0101] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0102] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, which can be executed by a processor 220 of the device 200 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0103] Figure 8 This is a block diagram illustrating an apparatus 300 for node compilation according to an exemplary embodiment. For example, apparatus 300 may be provided as a server. (Refer to...) Figure 8 The device 300 includes a processing component 322, which further includes one or more processors, and memory resources represented by memory 332 for storing instructions, such as application programs, that can be executed by the processing component 322. The application programs stored in memory 332 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 322 is configured to execute instructions to perform the methods described above.

[0104] Device 300 may also include a power supply component 326 configured to perform power management of device 300, a wired or wireless network interface 350 configured to connect device 300 to a network, and an input / output (I / O) interface 358. Device 300 may operate on an operating system stored in memory 332, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0105] It is understood that in this disclosure, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.

[0106] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this disclosure, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.

[0107] It can be further understood that, unless otherwise specified, "connection" includes both direct connections where no other components exist between the two parties and indirect connections where other components exist between them.

[0108] It is further understood that although operations are described in a specific order in the accompanying drawings in the embodiments of this disclosure, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all of the shown operations to be performed to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0109] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.

[0110] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A node compilation method, characterized in that, include: In response to performing quick app element node attribute binding, the attribute value type of the element node is determined. The attribute value type is either a dynamic attribute or a static attribute. The dynamic attribute is an attribute that changes during the operation of dynamic data, and the static attribute is an attribute that does not change during the operation of static data. If the attribute value type is determined to be a static attribute, then no listener is created for the element node. If the attribute value type is determined to be a dynamic attribute, then the listener is created for the element node. The listener is used to monitor changes in the data corresponding to the node attribute.

2. The method according to claim 1, characterized in that, Determining the attribute value type of the element node includes: Query the static modifier of the element node, whereby the static modifier is used to identify that the attribute value type is static. If the static modifier is found, then the attribute value type of the element node is determined to be a static attribute; If the static modifier is not found, the attribute value type of the element node is determined to be dynamic.

3. The method according to claim 2, characterized in that, The static modifier is added in advance to the corresponding attribute of the element node.

4. A node compilation apparatus, characterized in that, include: The determining unit is configured to determine the attribute value type of the element node in response to performing quick application element node attribute binding. The attribute value type is either a dynamic attribute or a static attribute. The dynamic attribute is an attribute that changes during the operation of dynamic data, and the static attribute is an attribute that does not change during the operation of static data. A creation unit is used to not create a listener for the element node when the attribute value type is a static attribute, and to create the listener for the element node when the attribute value type is a dynamic attribute. The listener is used to monitor changes in the data corresponding to the node attribute.

5. The apparatus according to claim 4, characterized in that, The determining unit determines the attribute value type of the element node in the following manner: Query the static modifier of the element node, whereby the static modifier is used to identify that the attribute value type is static. If the static modifier is found, then the attribute value type of the element node is determined to be a static attribute; If the static modifier is not found, the attribute value type of the element node is determined to be dynamic.

6. The apparatus according to claim 5, characterized in that, The static modifier is added in advance to the corresponding attribute of the element node.

7. A node compilation apparatus, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the node compilation method according to any one of claims 1 to 3.

8. A storage medium, characterized in that, The storage medium stores instructions that, when executed by the terminal's processor, enable the terminal to perform the method described in any one of claims 1 to 3.