A smart lock application program construction method, device and equipment and storage medium

By generating structured requirement information through a cloud platform and AI coding engine, the smart lock application file is automatically generated, and an independent task is generated on the hardware terminal. This solves the problems of high difficulty in personalized customization and high development threshold of smart locks, and realizes the efficient realization and stable operation of diverse user needs.

CN122135465APending Publication Date: 2026-06-02SHENZHEN KAADAS INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN KAADAS INTELLIGENT TECH CO LTD
Filing Date
2026-03-13
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The pre-configured nature of existing smart locks makes personalized customization difficult, resulting in repetitive development work for developers, high development barriers, and a lack of end-to-end customization platforms, thus failing to meet diverse user needs.

Method used

By building a platform with cloud-based functions to obtain user needs, generate structured requirement information, use an AI coding engine to automatically generate application files, and debug and verify them in a simulation environment, the platform generates independent tasks through smart lock hardware terminals, and the bridging layer calls the components to run, thus achieving the stable implementation of personalized functions.

Benefits of technology

It achieves standardized processing of diverse user needs, reduces development work, ensures code and hardware compatibility, achieves seamless integration of development debugging and hardware loading, and ensures the stable operation of personalized functions on smart lock hardware terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135465A_ABST
    Figure CN122135465A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for building a smart lock application. It acquires user functional requirements through a cloud-based functional building platform and generates structured requirement information, standardizing diverse user needs, accurately extracting core elements, and adapting to various submission methods. An AI coding engine generates application files, automating the conversion from requirements to code, reducing development work, and ensuring code compatibility with hardware. An executable file is compiled and distributed via the cloud platform, verifying functional effectiveness in a simulation environment, promptly correcting problems, and the compiled file can be directly run on the hardware terminal, achieving seamless integration between development debugging and hardware loading. An independent task is generated on the smart lock hardware terminal, triggered and executed via a bridging layer, isolating the custom application from the core system. The bridging layer performs instruction verification and mapping, ensuring accurate and standardized hardware calls, and enabling stable operation of personalized functions on the smart lock hardware terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart locks, and more particularly to a method, apparatus, device, and storage medium for building smart lock applications, specifically involving technical solutions for cloud-based requirement parsing, AI automatic coding, and dynamic loading and isolated operation of embedded terminals. Background Technology

[0002] As a core security device for smart homes, smart locks have been widely used in homes, offices and other scenarios. With the development of IoT and AI technologies, users are increasingly demanding personalized and scenario-based functions from smart locks, which urgently require smart locks to have flexible function customization and expansion capabilities to adapt to the diverse needs of different usage scenarios.

[0003] Existing smart locks all adopt a hardware-fixed and function-pre-built model. The core functions are determined before leaving the factory, and users can only make simple parameter configurations within the preset range and cannot define the functional logic themselves. When developers customize development, they need to rewrite the complete code based on specific hardware interfaces. This not only involves a lot of repetitive development work, but also requires familiarity with exclusive hardware interface protocols, resulting in high development thresholds and long development cycles.

[0004] Existing technological models severely limit the scalability of smart lock functions, making it impossible to meet the personalized needs of ordinary users. Custom development is inefficient for developers, and the high coupling between hardware and software, coupled with the lack of standardized interfaces and flexible program loading mechanisms, further exacerbates the difficulty of personalized customization of smart locks. Moreover, the lack of a full-process customization platform that supports "user needs - AI transformation - real-time debugging - hardware loading" in existing technologies hinders the innovative development of the industry. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and storage medium for building smart lock applications, which solves the technical problems of existing smart locks, such as the difficulty of prefabricating and customizing functions, repetitive development by developers, high development threshold and long cycle, and lack of a platform for full-process customization.

[0006] According to one aspect of the present invention, a method for building a smart lock application is provided, applied to a smart lock system, comprising: a smart lock hardware terminal, a cloud-based function building platform, and an AI coding engine, wherein the smart lock hardware terminal is configured with an operating system abstraction layer, a bridging layer, and functional components, and the method includes: The platform is built using cloud-based functions to obtain user-submitted functional requirements and generate structured requirement information based on those requirements. The application file is generated based on structured requirements information using an AI coding engine. The platform is built using cloud-based functions to debug and verify application files. Once debugging is successful, the application files are compiled into executable files, which are then distributed to the smart lock hardware terminal. The smart lock hardware terminal generates independent tasks for the application based on the executable file. When the application trigger conditions are met, the functional components are called through the bridging layer to run the independent tasks.

[0007] Optionally, generate structured requirement information based on functional requirements, including: determining the submission method of functional requirements, wherein the submission method includes natural language description and visual drag-and-drop arrangement; when the submission method is natural language description, perform semantic analysis and structured processing on the functional requirements to extract core requirement elements; when the submission method is visual drag-and-drop arrangement, directly map the component arrangement logic and configuration parameters corresponding to the functional requirements to the core requirement elements; and encapsulate the core requirement elements into structured requirement information according to a preset format.

[0008] Optionally, the method also includes: performing initialization operations by powering on the smart lock hardware terminal, triggering self-tests and parameter configurations of each functional component, and simultaneously starting message queue management and standardized component interface services to synchronize the running status of functional components and interfaces to the cloud-based functional building platform.

[0009] Optionally, an application file is generated based on structured requirements information, including: matching corresponding standardized component interfaces from functional components and interface runtime statuses based on structured requirements information to generate a requirements interface mapping table; generating application code based on the requirements interface mapping table and predefined hardware adaptation code templates; performing syntax checks, redundant code removal, and hardware resource adaptation optimization on the application code to generate optimized application code; and encapsulating the optimized application code into a debuggable application file.

[0010] Optionally, the application file can be debugged and verified, including: setting up a virtual simulation environment to simulate the operating state of the smart lock hardware terminal; obtaining test parameters input by the user, inputting test parameters in the virtual simulation environment to trigger the execution of the application file, and obtaining and displaying the execution log of the application in real time; judging whether the application function meets the user's expectations based on the execution log, and if not, receiving the user's parameter adjustment instructions and repeatedly triggering the execution operation until the application function meets the user's expectations.

[0011] Optionally, the smart lock hardware terminal specifically includes: an embedded real-time operating system, a system management framework, and a task manager. It generates independent tasks for the application based on the executable file, including: performing legality verification and resource allocation on the executable file through the system management framework; after the verification is successful, submitting a task registration request to the task manager; registering the executable file as an independent task of the application through the task manager based on the task registration request, and assigning a task identifier and task priority to the independent task.

[0012] Optionally, when the application triggering conditions are met, the bridging layer calls a functional component to run an independent task, including: when the application triggering conditions are met, the task manager switches the independent task from a ready state to a running state and sends a component call instruction to the bridging layer; the bridging layer and the operating system abstraction layer work together to perform a validity check on the component call instruction, and after the check passes, the component call instruction is mapped to the corresponding functional component interface, and the component call instruction is sent to the functional component based on the functional component interface; the functional component executes the corresponding hardware operation according to the component call instruction, and feeds back the operation execution result to the task manager.

[0013] According to another aspect of the present invention, a smart lock application building apparatus is provided for use in a smart lock system, comprising: a smart lock hardware terminal, a cloud-based function building platform, and an AI coding engine. The smart lock hardware terminal is configured with an operating system abstraction layer, a bridging layer, and functional components. The apparatus includes: The requirement structuring module is used to build a platform through cloud functions, obtain the functional requirements submitted by users, and generate structured requirement information based on the functional requirements. The application file generation module is used to generate application files based on structured requirement information through an AI coding engine; The executable file generation module is used to build a platform through cloud functions, debug and verify the application file, compile the application file into an executable file after debugging, and distribute the executable file to the smart lock hardware terminal. The independent task generation and execution module is used to generate independent tasks for the application based on the executable file through the smart lock hardware terminal. When the application triggering conditions are met, the independent task is executed by calling the functional components through the bridging layer.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to execute a smart lock application construction method according to any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement a smart lock application construction method according to any embodiment of the present invention.

[0016] The technical solution of this invention obtains user functional requirements and generates structured requirement information through a cloud-based functional construction platform. This standardizes diverse user needs, accurately extracts core elements, and adapts to various submission methods. An AI coding engine generates application files, automating the conversion from requirements to code, reducing development work, and ensuring code compatibility with hardware. Executable files are compiled and distributed through the cloud platform, verifying functional effectiveness in a simulation environment, identifying and correcting application defects in real time, and the compiled files can be run directly on the hardware terminal, achieving seamless integration between development debugging and hardware loading. Independent tasks are generated on the smart lock hardware terminal, triggered, and run via a bridging layer. Based on the task isolation mechanism of the embedded real-time operating system, custom applications are isolated from the core system, avoiding the impact of application anomalies. The bridging layer completes instruction verification and mapping, ensuring accurate and standardized hardware calls, and enabling stable operation of personalized functions on the smart lock hardware terminal.

[0017] The core innovations of this invention include: a three-tier architecture design, dual-mode requirement submission, three AI coding modules, RTOS task isolation, component publish / subscribe communication, seamless integration of cloud simulation and hardware, and online hot updates for applications.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a smart lock application construction method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of another smart lock application construction method provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of a smart lock application building device according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements a smart lock application construction method according to an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] Example 1 Figure 1 This is a flowchart illustrating a method for building a smart lock application, as provided in Embodiment 1 of the present invention. This embodiment is applicable to the self-building scenario of smart lock systems. The method can be executed by a smart lock application building device, which can be implemented in hardware and / or software. This smart lock application building device can be configured within a smart lock system. The smart lock system includes: a smart lock hardware terminal, a cloud-based function building platform, and an AI coding engine. The smart lock hardware terminal is configured with an operating system abstraction layer, a bridging layer, and functional components. Figure 1 As shown, the method includes: S110. Build a platform through cloud functions, obtain user-submitted functional requirements, and generate structured requirement information based on the functional requirements.

[0024] The cloud-based function building platform is a service platform deployed in the cloud. It serves as the interaction hub between users and smart lock hardware terminals and the AI ​​coding engine, providing web and mobile interaction entry points. It features functions such as requirement parsing, real-time parameter debugging, application management, breakpoint debugging, and version rollback. It can receive and structure user requirements, simulate and debug applications, distribute executable files, and remotely manage terminal tasks. Functional requirements refer to the personalized functional demands that users make of the smart lock based on their own usage scenarios. These can be submitted to the cloud-based function building platform through natural language descriptions, such as requesting a courier to temporarily open the door and send a notification between 3 PM and 5 PM, or through visual drag-and-drop arrangement. Structured requirement information refers to the standardized, structured data formed after the cloud-based function building platform's requirement parsing layer performs semantic analysis and element extraction on the user's original functional requirements. This data includes triggering conditions, such as time, identity verification, and device status; execution actions, such as door opening control, notification push, and device linkage; and feedback mechanisms, such as logging and anomaly alarms.

[0025] Optionally, generate structured requirement information based on functional requirements, including: determining the submission method of functional requirements, wherein the submission method includes natural language description and visual drag-and-drop arrangement; when the submission method is natural language description, perform semantic analysis and structured processing on the functional requirements to extract core requirement elements; when the submission method is visual drag-and-drop arrangement, directly map the component arrangement logic and configuration parameters corresponding to the functional requirements to the core requirement elements; and encapsulate the core requirement elements into structured requirement information according to a preset format.

[0026] The submission methods include natural language description and visual drag-and-drop arrangement, both of which are implemented through the user interaction layer of the cloud-based function building platform. Natural language description refers to users directly describing the smart lock functions they want to achieve in everyday language. Visual drag-and-drop arrangement refers to users dragging and dropping preset functional components such as identity verification, time judgment, and device linkage in the visual interface provided by the platform, and configuring the execution logic and related parameters between components to express functional requirements. After the specific submission method is determined, it will be processed accordingly to extract the core requirement elements.

[0027] Specifically, when a user submits a request in natural language, the cloud-based feature building platform sends the request text to the requirement parsing layer. This layer performs professional semantic analysis of the natural language, first identifying key information and then processing it structurally to accurately extract core requirement elements from the otherwise disorganized description. These core elements typically include three categories: trigger conditions, execution actions, and feedback mechanisms. Trigger conditions refer to the prerequisites for activating a smart lock's custom function, such as a time range, authentication results, or device status. Execution actions refer to the specific operations the smart lock needs to perform after the trigger conditions are met, such as controlling the lock to open, sending notifications, or linking with other smart home devices. Feedback mechanisms refer to the subsequent operations required after the function is executed, such as recording operation logs, triggering alarms, and providing feedback on the execution results. For example, a user might describe: "Every day from 3 PM to 5 PM, the courier enters a temporary password to open the door, sends a WeChat notification, and records the time." The cloud-based feature building platform would then extract the trigger conditions as "time 15:00-17:00" and "temporary password verification successful," the execution actions as "controlling the lock to open" and "sending a WeChat notification," and the feedback mechanism as "storing the opening time in the log."

[0028] Similarly, when a user submits their work via visual drag-and-drop arrangement, the cloud-based function building platform directly identifies the user's operational data in the visual interface. It maps the user's completed functional component arrangement logic—that is, the execution order and trigger relationships between components—as well as the specific parameters configured by the user for each component, such as the specific time period for the time component and the specific verification object for the identity verification component, directly to the corresponding core requirement elements. Semantic analysis is no longer required because the drag-and-drop arrangement process itself is a structured expression of the user's functional logic. The platform can directly extract the triggering conditions, execution actions, and feedback mechanisms from this expression. For example, if a user drags and drops components such as "Face Recognition Verification (Zhang San)," "Time Judgment (18:00-24:00)," "Door Lock Unlock," and "Indoor Lighting Control" and configures the logic "When face recognition is successful and the time condition is met, open the door first and then turn on the lights," the platform will directly map the triggering conditions as "Face recognition (Zhang San) passed" and "Time 18:00-24:00," and the execution actions as "Control the door lock to unlock and send the indoor light turn-on command." Without an additional feedback mechanism, this type of element will be empty.

[0029] Furthermore, after extracting the core requirement elements, the cloud-based function building platform encapsulates the three categories of core requirement elements—trigger conditions, execution actions, and feedback mechanisms—in accordance with an internally preset unified data format, forming structured requirement information. This preset format is designed to enable the subsequent AI coding engine to accurately identify and read the content of each element. During the encapsulation process, each type of core requirement element is filled with fixed fields, clarifying the meaning and corresponding data of each field. For example, the trigger condition field clearly indicates the specific condition type and condition parameters; the execution action field indicates the specific action type, action execution order, associated hardware interface, etc.; and the feedback mechanism field indicates the specific feedback method, feedback content storage location, etc. The encapsulated structured requirement information is transmitted to the AI ​​coding engine in a standardized data format, providing a unified and standardized input basis for subsequent interface matching and code generation, ensuring that the AI ​​coding engine can accurately understand the user's functional requirements and achieve precise conversion from requirements to code.

[0030] Optionally, the method also includes: performing initialization operations by powering on the smart lock hardware terminal, triggering self-tests and parameter configurations of each functional component, and simultaneously starting message queue management and standardized component interface services to synchronize the running status of functional components and interfaces to the cloud-based functional building platform.

[0031] Specifically, after the smart lock hardware terminal is powered on, it first starts the embedded real-time operating system. This system completes core system-level initialization operations, such as process management, memory allocation, file system setup, and network connection initialization configuration. This establishes the basic system operating environment for the subsequent operation of the entire hardware terminal, ensuring that various functional modules can operate within a standardized and stable system framework. After system initialization is complete, the hardware terminal, through the bridging layer and the operating system abstraction layer, coordinates to send initialization commands to all core functional components in the functional component layer. This triggers each functional component to execute its own initialization interface in sequence. During this process, each component completes power-on startup, configuration of preset parameters, and hardware self-tests. For example, the fingerprint component checks whether the sensor is working properly, the lock body component checks the working status of the motor drive and bolt status detection modules, and the communication component verifies the connectivity of communication modules such as Wi-Fi and Bluetooth. After completing their self-tests, each component feeds back its working status to the bridging layer, ensuring that all functional components are in a callable state and ready to receive task commands and execute hardware operations.

[0032] In addition, while each functional component completes its self-check and parameter configuration, the hardware terminal will start message queue management and standardized component interface services. The message queue management, implemented using a circular buffer, will immediately enter working mode and begin coordinating all message transmission between the application layer and the bridging layer. It will also provide stable message support for the task manager's scheduling operations. This manager supports a multi-producer, single-consumer mode, ensuring the orderliness and reliability of message transmission from the very beginning, avoiding message loss, conflicts, and blocking. After the standardized component interface services are started, all standardized application programming interfaces (APIs), such as identity recognition interfaces, execution control interfaces, communication interaction interfaces, and status feedback interfaces, will be enabled. The parameters of the interfaces will be configured and services will be started according to the unified RESTful protocol specification, ensuring that each interface can normally receive external call commands and provide feedback on execution results.

[0033] Finally, the smart lock hardware terminal will use the activated communication module to synchronously upload the real-time operating status of all functional components, including whether the components are available, occupied, or faulty, as well as the service status of all standardized component interfaces, including whether the interfaces are normally open and callable, to the cloud-based function building platform. The cloud platform will receive and store the operating status of functional components and interfaces, enabling the cloud-based function building platform and AI coding engine to grasp the resource availability and overall operating status of the smart lock hardware terminal in real time and accurately. This will allow the cloud platform's requirement parsing layer and the AI ​​coding engine's interface mapping module to perform requirement parsing, interface matching, and code generation based on the actual status of the hardware terminal after the user submits a functional request, thus avoiding the situation where unavailable components or interfaces are matched.

[0034] S120: Generate application files based on structured requirement information using an AI coding engine.

[0035] The AI ​​coding engine is a module that automatically generates application code for smart locks. It pre-stores standardized interface documents for hardware terminals, matches hardware interfaces based on structured requirements, generates code based on predefined code templates, performs syntax checks and resource optimization, and outputs debuggable application files, achieving automated conversion from requirements to code. The application file refers to the raw code file generated by the AI ​​coding engine after matching structured requirements with standardized hardware terminal interfaces. It includes trigger condition judgments, action calls, exception handling, etc., and supports debugging and modification on the cloud platform; it is an uncompiled code carrier.

[0036] Optionally, an application file is generated based on structured requirements information, including: matching corresponding standardized component interfaces from functional components and interface runtime statuses based on structured requirements information to generate a requirements interface mapping table; generating application code based on the requirements interface mapping table and predefined hardware adaptation code templates; performing syntax checks, redundant code removal, and hardware resource adaptation optimization on the application code to generate optimized application code; and encapsulating the optimized application code into a debuggable application file.

[0037] Specifically, the interface mapping module of the AI ​​coding engine reads the structured requirement information transmitted by the cloud-based function building platform. This module pre-stores complete documents of all standardized component interfaces of the smart lock hardware terminal, and simultaneously retrieves the latest operating status of the smart lock hardware terminal functional components and interfaces synchronized in the cloud platform to ensure that all matched interfaces are available. Then, the interface mapping module matches the corresponding standardized component interfaces one by one according to the core requirement elements of triggering conditions, execution actions, and feedback mechanisms in the structured requirement information. For example, the action of controlling the door lock to open will match the motor forward rotation control API in the execution control interface, the action of pushing notifications will match the third-party application notification API in the communication interaction interface, and the triggering condition of fingerprint verification will match the fingerprint verification result return API in the identity recognition interface. After sorting out the matching relationship between all core requirement elements and corresponding standardized component interfaces, a requirement interface mapping table will be generated according to a preset format.

[0038] Then, the AI ​​coding engine's code generation module automatically generates application code based on the generated requirement interface mapping table and predefined hardware-compatible code templates. It's worth noting that the predefined code templates support programming languages ​​compatible with smart lock hardware, such as C and Python, and include a basic code framework and logic specifications. The code generation process strictly adheres to three core logic categories: first, trigger condition judgment logic, which sets judgment code based on requirements such as time range and authentication results to ensure that subsequent actions are only initiated when the conditions are met; second, action invocation logic, which writes code to call the corresponding standardized component interfaces sequentially according to the user's needs, such as explicitly reflecting the logic of verifying a temporary password before controlling the motor to open the door; and third, exception handling logic, which writes code to handle situations such as interface call failures and component execution errors, such as triggering hardware alarms and logging errors. Simultaneously, the interface call information from the requirement interface mapping table is accurately integrated into the code framework to ensure that the code accurately drives the hardware components to perform the corresponding operations, ultimately generating complete application code.

[0039] Furthermore, the AI ​​coding engine's code optimization module optimizes the code. First, it performs a syntax check, verifying each line of code for syntax errors and non-standard syntax, ensuring the code conforms to the syntax rules of the corresponding programming language and can be parsed and executed correctly. Next, the module removes redundant code, cleaning up and simplifying repetitive interface calls, invalid logical judgments, and unnecessary parameter definitions, streamlining the code structure and improving execution efficiency. Finally, the module performs hardware resource adaptation optimization. It considers the hardware parameters of the smart lock terminal, such as MCU memory size and computing power, to adjust the code's space usage and execution logic, preventing excessive hardware resource consumption that could cause the smart lock to lag. It also ensures the code is compatible with the embedded real-time operating system of the hardware terminal, allowing for stable operation. After code optimization, the AI ​​coding engine encapsulates the optimized application code in a file format recognizable and debuggable by the cloud-based functional building platform, generating a debuggable application file. During the encapsulation process, the code is standardized and formatted, and corresponding identification information is configured for the file, including requirement number, matching interface information, hardware adaptation information, etc., so that the cloud platform can quickly identify the user requirements and hardware adaptation requirements corresponding to the application file. The encapsulated application file will be fed back to the real-time debugging layer of the cloud function building platform in real time, waiting for the user to perform subsequent debugging and verification operations.

[0040] S130: Build a platform using cloud functions, debug and verify the application files, compile the application files into executable files after successful debugging, and then distribute the executable files to the smart lock hardware terminal.

[0041] Among them, the executable file refers to the file format generated by the cloud-based function building platform after compiling the debugged application file, which can be run directly on the smart lock hardware terminal. It can be sent to the storage module of the hardware terminal through the communication module of the smart lock and is the final file form of the application running on the hardware.

[0042] Optionally, the application file can be debugged and verified, including: setting up a virtual simulation environment to simulate the operating state of the smart lock hardware terminal; obtaining test parameters input by the user, inputting test parameters in the virtual simulation environment to trigger the execution of the application file, and obtaining and displaying the execution log of the application in real time; judging whether the application function meets the user's expectations based on the execution log, and if not, receiving the user's parameter adjustment instructions and repeatedly triggering the execution operation until the application function meets the user's expectations.

[0043] It is known that the real-time debugging layer of the cloud-based functional building platform will build a virtual simulation environment. This simulation environment will completely replicate the actual operating architecture and logic of the smart lock hardware terminal, simulating the working state of the core hardware modules, operating system layer, bridging layer, and functional component layer of the hardware terminal. It can also simulate the calling methods of various standardized component interfaces, the transmission mechanism of message queues, and the scheduling rules of the task manager. At the same time, it can simulate various actual operating states of the smart lock hardware terminal, such as fingerprint verification success / failure, lock tongue opening / closing status, password input correct / incorrect, and different time points. This ensures that the operating architecture and logic of the application files in this environment, the code execution logic, and the interface calling methods are completely consistent with the real hardware terminal, providing a realistic simulation foundation for subsequent debugging and verification.

[0044] Specifically, the cloud platform provides users with input channels for test parameters. Users can input corresponding test parameters according to their functional requirements. For example, if the user's requirement is to open a door with a temporary password at a specific time, they can input parameters such as the test time and the temporary password. If the requirement is to open a door with facial recognition, they can input parameters such as the simulated facial recognition success / failure indicator. After the user completes the parameter input, the cloud platform will import the test parameters into the virtual simulation environment, triggering the application file to start executing according to the preset code logic. During execution, the simulation environment will capture every step of the application's execution in real time, including whether the trigger conditions are met, which standardized component interfaces are called, whether the interface calls are successful, what operations each functional component performs, whether the execution result is normal, and whether the feedback mechanism is effective. The generated information is organized into a complete execution log according to the execution sequence and displayed in real time on the debugging interface of the cloud platform, allowing users to clearly and intuitively see the entire process of the application's execution. The execution log includes information on the entire process, such as trigger condition verification, interface calls, component execution, and result feedback.

[0045] Furthermore, users will use the real-time execution logs to verify whether the application's execution process and results meet their functional expectations. This includes checking the accuracy of trigger condition judgments, the correctness of component interface calls, the orderly completion of execution actions, the completeness of feedback information records, and the appropriateness of exception handling. If users find discrepancies in the execution logs, such as incorrect trigger condition judgments, unexecuted notifications, or missing log entries, they can issue parameter adjustment commands on the cloud platform to modify relevant parameters, such as adjusting the time range, changing the notification method, or modifying the password length. Upon receiving the user's parameter adjustment commands, the cloud platform will synchronously update the corresponding code logic in the application file. Then, the adjusted test parameters will be re-entered in the virtual simulation environment, triggering the application file execution again and generating new execution logs for user verification. This process will repeat until the user confirms from the execution logs that every step of the application's execution process and results fully meet their functional expectations; only then is the debugging and verification phase complete.

[0046] S140. Through the smart lock hardware terminal, generate an independent task for the application based on the executable file. When the application triggering conditions are met, call the functional components through the bridging layer to run the independent task.

[0047] The smart lock hardware terminal specifically includes an embedded real-time operating system, a system management framework, and a task manager. The smart lock hardware terminal is the physical device of the smart lock and the actual runtime environment for custom applications. It integrates a multi-layered architecture including core hardware modules, an operating system layer, an operating system abstraction layer, a bridging layer, and a functional component layer. It possesses basic capabilities such as identity recognition, lock control, communication, and storage, and supports dynamic loading, runtime monitoring, and hardware resource access for applications. It forms the hardware foundation for realizing personalized functions. The bridging layer is the hub connecting the functional component layer and the application layer in the smart lock hardware terminal. Running in a C application layer task, it is responsible for data transmission and instruction adaptation between the underlying hardware, the operating system abstraction layer, and the application layer. It is the core relay carrier for task calls to hardware components; it can perform legality verification and format conversion on component call instructions issued by the task, and map them to standardized hardware interfaces, while simultaneously feeding back the component execution results to the task. Functional components refer to the various standardized functional modules integrated in the functional component layer of the smart lock hardware terminal. They are the basic units for realizing the specific functions of the smart lock, including fingerprint components, face recognition components, lock body components, numeric keypad components, voice broadcast components, communication components, and storage components. Each component provides three standardized interfaces: initialization, message processing, and status query, and supports inter-component communication through a publish / subscribe message mechanism. Independent tasks refer to application runtime units that are isolated from core system tasks, generated by the system management framework after the smart lock hardware terminal receives the executable file, and registered through the task manager after the system management framework completes the legality verification and resource allocation. Each independent task has a unique identifier and exclusive priority, is included in the task list for unified management, runs in a dedicated isolated environment, and cannot directly access core system resources, ensuring the security and stability of the core system. Application trigger conditions refer to the prerequisites for starting an independent task of the application as defined in the structured requirements information. They are the start switch for user-defined functions and usually include time conditions, such as Monday to Friday 14:00-18:00; authentication conditions, such as successful fingerprint, face, or temporary password verification; and device status conditions, such as door lock malfunction or sensor trigger. When the conditions are met, the task manager will switch the corresponding independent task from the ready state to the running state.

[0048] The technical solution of this invention obtains user functional requirements and generates structured requirement information through a cloud-based functional construction platform. This standardizes diverse user needs, accurately extracts core elements, and adapts to various submission methods. An AI coding engine generates application files, automating the conversion from requirements to code, reducing development work, and ensuring code compatibility with hardware. Executable files are compiled and distributed through the cloud platform, verifying functional effectiveness in a simulation environment, promptly correcting problems, and the compiled files can be run directly on the hardware terminal, achieving seamless integration between development debugging and hardware loading. Independent tasks are generated on the smart lock hardware terminal, and upon triggering, components are called via a bridging layer to run, isolating custom applications from the core system, avoiding the impact of application anomalies. The bridging layer completes instruction verification and mapping, ensuring accurate and standardized hardware calls, and allowing personalized functions to be stably implemented.

[0049] Example 2 Figure 2 This is a flowchart of a smart lock application construction method provided in Embodiment 2 of the present invention. This embodiment adds an independent task to the smart lock hardware terminal, based on an executable file, to generate the application. When the application triggering conditions are met, the independent task is executed by calling functional components through a bridging layer. The specific content of steps S250-S260 is largely the same as steps S120-S130 in Embodiment 1, and therefore will not be repeated in this embodiment. Figure 2 As shown, the method includes: S210. Build a platform through cloud functions, obtain user-submitted functional requirements, and generate structured requirement information based on the functional requirements.

[0050] Optionally, generate structured requirement information based on functional requirements, including: determining the submission method of functional requirements, wherein the submission method includes natural language description and visual drag-and-drop arrangement; when the submission method is natural language description, perform semantic analysis and structured processing on the functional requirements to extract core requirement elements; when the submission method is visual drag-and-drop arrangement, directly map the component arrangement logic and configuration parameters corresponding to the functional requirements to the core requirement elements; and encapsulate the core requirement elements into structured requirement information according to a preset format.

[0051] Optionally, the method also includes: performing initialization operations by powering on the smart lock hardware terminal, triggering self-tests and parameter configurations of each functional component, and simultaneously starting message queue management and standardized component interface services to synchronize the running status of functional components and interfaces to the cloud-based functional building platform.

[0052] S220: Generates application files based on structured requirement information using an AI coding engine.

[0053] Optionally, an application file is generated based on structured requirements information, including: matching corresponding standardized component interfaces from functional components and interface runtime statuses based on structured requirements information to generate a requirements interface mapping table; generating application code based on the requirements interface mapping table and predefined hardware adaptation code templates; performing syntax checks, redundant code removal, and hardware resource adaptation optimization on the application code to generate optimized application code; and encapsulating the optimized application code into a debuggable application file.

[0054] S230: Through cloud-based functional platform construction, the application file is debugged and verified. After successful debugging, the application file is compiled into an executable file and then distributed to the smart lock hardware terminal.

[0055] Optionally, the application file can be debugged and verified, including: setting up a virtual simulation environment to simulate the operating state of the smart lock hardware terminal; obtaining test parameters input by the user, inputting test parameters in the virtual simulation environment to trigger the execution of the application file, and obtaining and displaying the execution log of the application in real time; judging whether the application function meets the user's expectations based on the execution log, and if not, receiving the user's parameter adjustment instructions and repeatedly triggering the execution operation until the application function meets the user's expectations.

[0056] S240. The system management framework performs legality verification and resource allocation on the executable file. After the verification is successful, a task registration request is submitted to the task manager.

[0057] Specifically, after the smart lock hardware terminal receives the application executable file from the cloud-based function building platform, the system management framework built into the operating system layer first performs processing. The system management framework will first conduct a comprehensive legality check on the executable file. The check includes checking the integrity of the file to confirm that the file has not been damaged or missing during transmission. At the same time, it verifies the digital signature and authorization authentication of the file to ensure that the executable file is legally issued by the cloud platform, complies with the operating specifications of the smart lock hardware terminal, and does not contain malicious code or illegal programs, thus avoiding the impact of illegal files on the operational security of the hardware terminal from the source. After completing the legality verification and confirming its success, the system management framework will allocate dedicated independent resources to the application based on the current hardware resource status of the smart lock hardware terminal. This includes allocating independent memory space to ensure the application has its own dedicated memory area during runtime, preventing memory conflicts with core system tasks or other custom tasks. It will also allocate corresponding hardware resource quotas, such as the CPU usage percentage and interface call permissions. Furthermore, it will designate an independent task management area for the application, using the Real-Time Operating System (RTOS) task isolation mechanism to ensure that the application cannot directly access the core system's task area and resources during subsequent runtime, thus ensuring the stability of the core system from an architectural perspective. After completing the legality verification and all resource allocation, the system management framework will formally submit a task registration request to the hardware terminal's task manager. This request includes the application's executable file information, allocated resource information, and preset basic operating requirements.

[0058] S250: Register the executable file as an independent task of the application through the task manager based on the task registration request, and assign a task identifier and task priority to the independent task.

[0059] Specifically, after receiving a task registration request from the system management framework, the task manager parses and verifies the information in the request. Once it confirms that resource allocation is reasonable and file information is correct, it officially registers the executable file as an independent application task on the smart lock hardware terminal. This makes the application a unified task unit managed by the task manager, and it is included in the task list for management along with core system tasks and other custom application tasks. During the registration process, the task manager assigns a unique task identifier to this independent task. This identifier is associated with the task's running status, resource usage, priority, and other information, facilitating precise scheduling, monitoring, and management by the task manager. It also allows the cloud-based function building platform to obtain the corresponding task's running status in real time through this identifier. Simultaneously, the task manager assigns a task priority to this independent task. By default, the priority of independent tasks of custom applications is lower than that of core system tasks of the smart lock, such as basic door unlocking and security alarms—tasks that ensure the basic operation and security of the smart lock. This ensures that core system tasks are prioritized for execution, guaranteeing that the basic functions of the smart lock are not affected. Users can subsequently fine-tune this priority according to their own needs through the cloud-based function building platform. After assigning task identifiers and priorities, the Task Manager will enter all the information of the independent task into the task list and record its initial running status in real time, preparing for subsequent task scheduling and execution.

[0060] S260. When the application triggering conditions are met, the independent task is switched from the ready state to the running state through the task manager, and a component call instruction is sent to the bridge layer.

[0061] Specifically, when the task manager of the smart lock hardware terminal detects that the current scenario meets the application's preset triggering conditions, such as reaching a specified time range, successful authentication, or the device status meeting preset requirements, it will immediately adjust the status of the independent task corresponding to the application, officially switching it from the ready state to the running state. Simultaneously, this independent task will send component call instructions to the bridge layer of the smart lock hardware terminal according to its preset interface call logic. The component call instructions include the type of functional component to be called, the specific operation to be performed, and relevant configuration parameters. For example, calling the numeric keypad component to verify a 6-digit temporary password or calling the lock body component to drive the motor to open the door, thereby initiating a hardware resource call request.

[0062] S270. The component call instruction is validated by the collaboration of the bridging layer and the operating system abstraction layer. After the validation is passed, the component call instruction is mapped to the corresponding functional component interface, and the component call instruction is sent to the functional component based on the functional component interface.

[0063] Specifically, after receiving a component call instruction from an independent task, the bridging layer collaborates with the operating system abstraction layer to conduct a comprehensive legality check on the instruction. This check includes verifying whether the sender of the instruction is a registered, legitimate, independent task; whether the instruction format conforms to the standardized component interface protocol specifications; whether the functional component requested in the instruction is available; and whether the requested operation is within the task's resource quota and permission range. This comprehensive check prevents illegal and erroneous instructions from impacting the system. Once the check passes, the bridging layer accurately maps the component call instruction to the corresponding functional component interface according to the standardized component interface mapping rules of the smart lock hardware terminal. For example, the door opening instruction is mapped to the motor drive interface of the lock body component, and the password verification instruction is mapped to the message processing interface of the numeric keypad component. Based on the mapped functional component interfaces, the bridging layer accurately sends the component call instruction to the corresponding functional component, becoming the direct basis for the functional component to execute its operation.

[0064] S280: The functional component executes the corresponding hardware operation according to the component call instruction, and feeds back the operation execution result to the task manager.

[0065] Specifically, after receiving the component call instruction from the bridging layer, the corresponding functional component first parses the instruction parameters, extracts the key information required for the operation, and then executes the corresponding hardware operation according to the instruction requirements. Different functional components will complete the corresponding operation according to their own hardware attributes. For example, the fingerprint component will activate the sensor to collect fingerprint images and compare them; the lock body component will drive the motor to rotate forward and backward to open or close the door; the communication component will push notifications or link other smart home devices according to the instruction; and the voice broadcast component will play the specified voice content according to the instruction. After the functional component completes the hardware operation, it will immediately generate the operation execution result, which includes the operation success or failure indicator, specific status data, and exception information. The operation execution result will first be fed back to the bridging layer, and then the bridging layer will send it back to the independent task that initiated the call. Finally, the independent task will synchronize the operation execution result to the task manager. The task manager will record the result in real time and update the task's running status. If the operation fails, it will also trigger corresponding alarms, log recordings, and abnormal task restarts according to the application's preset exception handling logic, ensuring that the entire task operation process is monitorable and traceable.

[0066] The technical solution of this invention verifies the legitimacy of executable files through a system management framework, intercepting illegal and corrupted program files and ensuring the security of hardware terminal operation from the source. The task manager registers executable files as independent tasks, enabling separate management of custom applications and core system tasks. Assigning unique task identifiers allows for precise monitoring and scheduling of tasks, while configuring task priorities ensures that core system tasks of the smart lock are executed first, ensuring that basic functions are not affected. The bridging layer verifies and maps instructions before distribution, preventing illegal and erroneous instructions from calling hardware. Standardized interface mapping ensures precise matching between instructions and functional components, guaranteeing the standardization of hardware calls. Functional components execute operations and provide feedback, accurately implementing the hardware control logic of the application. Real-time result feedback also allows the task manager to promptly grasp the running status, providing a basis for subsequent task scheduling and exception handling.

[0067] Example 3 Figure 3 This is a schematic diagram of a smart lock application building device provided in Embodiment 3 of the present invention, applied to a smart lock system. It includes: a smart lock hardware terminal, a cloud-based function building platform, and an AI encoding engine. The smart lock hardware terminal is configured with an operating system abstraction layer, a bridging layer, and functional components, such as... Figure 3 As shown, the device includes: The requirement structuring module 310 is used to build a platform through cloud functions, obtain the functional requirements submitted by users, and generate structured requirement information based on the functional requirements. Application file generation module 320 is used to generate application files based on structured requirement information through an AI encoding engine; The executable file generation module 330 is used to build a platform through cloud functions, debug and verify the application file, compile the application file into an executable file of the application after the debugging is successful, and send the executable file to the smart lock hardware terminal. The independent task generation and execution module 340 is used to generate independent tasks for the application based on the executable file through the smart lock hardware terminal. When the application triggering conditions are met, the independent task is executed by calling the functional components through the bridging layer.

[0068] Optionally, the requirement structuring module 310 is specifically used for: determining the submission method of functional requirements, wherein the submission method includes natural language description and visual drag-and-drop arrangement; when the submission method is natural language description, performing semantic analysis and structuring processing on the functional requirements to extract core requirement elements; when the submission method is visual drag-and-drop arrangement, directly mapping the component arrangement logic and configuration parameters corresponding to the functional requirements to core requirement elements; and encapsulating the core requirement elements into structured requirement information according to a preset format.

[0069] Optionally, the device also includes: an initialization module, used to perform initialization operations through the power-on of the smart lock hardware terminal, trigger self-tests and parameter configurations of each functional component, and simultaneously start message queue management and standardized component interface services to synchronize the running status of functional components and interfaces to the cloud function building platform.

[0070] Optionally, the application file generation module 320 is specifically used for: matching the corresponding standardized component interfaces from the functional components and interface running status according to the structured requirement information to generate a requirement interface mapping table; generating application code based on the requirement interface mapping table and a predefined hardware adaptation code template; performing syntax checking, redundant code deletion, and hardware resource adaptation optimization on the application code to generate optimized application code; and encapsulating the optimized application code into a debuggable application file.

[0071] Optionally, the executable file generation module 330 is specifically used for: building a virtual simulation environment, wherein the virtual simulation environment is used to simulate the operating state of the smart lock hardware terminal; obtaining test parameters input by the user, inputting test parameters in the virtual simulation environment to trigger the execution of the application file, obtaining and displaying the execution log of the application in real time; judging whether the application function meets the user's expectations based on the execution log, and if not, receiving the user's parameter adjustment instruction and repeatedly triggering the execution operation until the application function meets the user's expectations.

[0072] Optionally, the independent task generation and execution module 340 specifically includes: an independent task registration unit, used to: perform legality verification and resource allocation on the executable file through the system management framework, and submit a task registration request to the task manager after the verification is passed; register the executable file as an independent task of the application through the task manager based on the task registration request, and assign a task identifier and task priority to the independent task.

[0073] Optionally, the independent task generation and execution module 340 is specifically used for: when the application triggering conditions are met, switching the independent task from a ready state to a running state through the task manager, and sending a component call instruction to the bridging layer; the bridging layer and the operating system abstraction layer work together to perform a validity check on the component call instruction, and after the check is passed, mapping the component call instruction to the corresponding functional component interface, and issuing the component call instruction to the functional component based on the functional component interface; the functional component executes the corresponding hardware operation according to the component call instruction, and feeds back the operation execution result to the task manager.

[0074] The technical solution of this invention obtains user functional requirements and generates structured requirement information through a cloud-based functional construction platform. This standardizes diverse user needs, accurately extracts core elements, and adapts to various submission methods. An AI coding engine generates application files, automating the conversion from requirements to code, reducing development work, and ensuring code compatibility with hardware. Executable files are compiled and distributed through the cloud platform, verifying functional effectiveness in a simulation environment, identifying and correcting application defects in real time, and the compiled files can be run directly on the hardware terminal, achieving seamless integration between development debugging and hardware loading. Independent tasks are generated on the smart lock hardware terminal, triggered, and run via a bridging layer. Based on the task isolation mechanism of the embedded real-time operating system, custom applications are isolated from the core system, avoiding the impact of application anomalies. The bridging layer completes instruction verification and mapping, ensuring accurate and standardized hardware calls, and enabling stable operation of personalized functions on the smart lock hardware terminal.

[0075] The smart lock application building device provided in this embodiment of the invention can execute the smart lock application building method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0076] Example 4 Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0077] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0078] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0079] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as a method for building a smart lock application.

[0080] In some embodiments, a smart lock application building method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. The computer storage medium may be a storage module of a smart lock hardware terminal or a storage unit of a cloud server. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the smart lock application building method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute a smart lock application building method by any other suitable means (e.g., by means of firmware).

[0081] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0083] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0084] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0085] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0086] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0087] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0088] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for constructing a smart lock application, characterized in that, The method, applicable to smart lock systems, includes: a smart lock hardware terminal, a cloud-based function building platform, and an AI coding engine. The smart lock hardware terminal is configured with an operating system abstraction layer, a bridging layer, and functional components. The platform is built using cloud-based functions to obtain user-submitted functional requirements and generate structured requirement information based on those requirements. The application file is generated based on the structured requirements information using an AI encoding engine; The application file is debugged and verified by building a platform using cloud functions. After successful debugging, the application file is compiled into an executable file and then sent to the smart lock hardware terminal. The smart lock hardware terminal generates an independent task for the application based on the executable file. When the application triggering conditions are met, the functional components are called through the bridging layer to run the independent task.

2. The method according to claim 1, characterized in that, The step of generating structured requirement information based on the functional requirements includes: Determine the submission method for the functional requirements, wherein the submission method includes natural language description and visual drag-and-drop arrangement; When the submission method is natural language description, semantic analysis and structured processing are performed on the functional requirements to extract the core requirement elements; When the submission method is visual drag-and-drop orchestration, the component orchestration logic and configuration parameters corresponding to the functional requirements are directly mapped to the core requirement elements; The core requirement elements are encapsulated into structured requirement information according to a preset format.

3. The method according to claim 1, characterized in that, The method further includes: The smart lock hardware terminal performs initialization operations upon power-on, triggering self-tests and parameter configurations of each functional component. Simultaneously, it starts message queue management and standardized component interface services, synchronizing the running status of functional components and interfaces to the cloud-based functional building platform.

4. The method according to claim 3, characterized in that, The step of generating the application file based on the structured requirements information includes: Based on the structured requirement information, the corresponding standardized component interfaces are matched from the functional components and interface operating status to generate a requirement interface mapping table; Based on the aforementioned requirement interface mapping table and predefined hardware adaptation code templates, application code is generated. The application code is subjected to syntax checking, redundant code removal, and hardware resource adaptation optimization to generate optimized application code. The optimized application code is packaged into a debuggable application file.

5. The method according to claim 1, characterized in that, The debugging and verification of the application file includes: A virtual simulation environment is set up, wherein the virtual simulation environment is used to simulate the operating state of the smart lock hardware terminal; The test parameters input by the user are obtained, and the test parameters are entered in the virtual simulation environment to trigger the execution of the application file. The execution log of the application is obtained and displayed in real time. Based on the execution log, determine whether the application function meets the user's expectations. If not, receive the user's parameter adjustment instruction and repeatedly trigger the execution operation until the application function meets the user's expectations.

6. The method according to claim 1, characterized in that, The smart lock hardware terminal specifically includes: an embedded real-time operating system, a system management framework, and a task manager. The independent task of generating the application based on the executable file includes: The system management framework performs legality verification and resource allocation on the executable file. After the verification is successful, a task registration request is submitted to the task manager. The Task Manager registers the executable file as an independent task of the application based on the task registration request, and assigns a task identifier and task priority to the independent task.

7. The method according to claim 6, characterized in that, When the application triggering condition is met, the process of calling the functional component through the bridge layer to run the independent task includes: When the application triggering conditions are met, the independent task is switched from the ready state to the running state through the task manager, and a component call instruction is sent to the bridge layer. The bridging layer and the operating system abstraction layer work together to perform a validity check on the component call instruction. After the check is passed, the component call instruction is mapped to the corresponding functional component interface, and the component call instruction is sent to the functional component based on the functional component interface. The functional components execute corresponding hardware operations according to the component call instructions, and the operation execution results are fed back to the task manager.

8. A smart lock application building device, characterized in that, The device, applied to a smart lock system, includes: a smart lock hardware terminal, a cloud-based function building platform, and an AI coding engine. The smart lock hardware terminal is configured with an operating system abstraction layer, a bridging layer, and functional components. The device comprises: The requirement structuring module is used to build a platform through cloud functions, obtain the functional requirements submitted by users, and generate structured requirement information based on the functional requirements. An application file generation module is used to generate application files based on the structured requirements information using an AI encoding engine; The executable file generation module is used to build a platform through cloud functions, debug and verify the application file, compile the application file into an executable file of the application after the debugging is successful, and send the executable file to the smart lock hardware terminal. The independent task generation and execution module is used to generate independent tasks for the application based on the executable file through the smart lock hardware terminal. When the application triggering conditions are met, the module calls the functional components through the bridging layer to run the independent task.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions that are used to cause a processor to execute the method of any one of claims 1-7.