Equipment control method and device, electronic equipment and storage medium
By deploying WASM containers on the control end of embedded devices and dynamically configuring system capabilities, the problem of fixed control end system capabilities in the existing technology is solved, flexible control of multiple devices is achieved, and user learning costs are reduced.
Patent Information
- Application Number
- CN202311533357.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
The control end system capabilities of existing embedded devices are fixed and difficult to adjust flexibly, resulting in users needing to frequently brush new control ends, increasing learning costs and operational complexity.
By deploying WASM containers on the control end, information about access devices is obtained and system capabilities are configured in the WASM container based on the information, so as to dynamically expand or adjust the system capabilities of the control end to meet the control needs of different devices.
It realizes flexible control of multiple devices at the same control end, reduces user learning costs, improves user experience, and simplifies the process of device control.
Smart Images

Figure CN120010275A_ABST
Abstract
Description
Background Art
[0002] With the development of intelligent technology, most electronic devices can provide certain intelligent control capabilities. In related technologies, since most electronic devices are embedded devices, the control terminals deployed on them are customized embedded systems, and their system capabilities are fixed during development. If the system capabilities need to be changed, it is necessary to flash a re-customized control terminal into the embedded device, which is very cumbersome. And because the control terminal is re-customized, its operating logic may change, which brings additional learning costs to users. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a device control method, an apparatus, an electronic device and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a device control method is provided, which is applied to a control end, where a WASM container is deployed. The method includes:
[0005] Obtain device information of the device connected to the control terminal;
[0006] Configure the system capabilities of the control end in the WASM container based on the device information;
[0007] Control the devices accessing the control terminal based on system capabilities.
[0008] In some embodiments, according to the device information, the system capabilities of the control end are configured in the WASM container, including:
[0009] According to the device information, determine the application corresponding to the device information;
[0010] Load the application into the WASM container to realize the system capabilities provided by the application.
[0011] In some embodiments, the operating environment of the WASM container is isolated from the operating environment of the control end.
[0012] In some embodiments, the application is compiled by a WASM compiler, and the WASM compiler is used to compile the program to be compiled into machine code instructions to generate an application, wherein the program to be compiled is a program written in machine language.
[0013] In some embodiments, based on system capabilities, controlling the device of the access control terminal includes:
[0014] The application is run so that the application controls the device connected to the control terminal through the interface pre-packaged in the control terminal, wherein the control terminal is pre-packaged with the interface corresponding to each device supported by the control terminal.
[0015] In some embodiments, the method further comprises:
[0016] When a new device is detected to be connected to the control terminal, the control authority of the current user is verified;
[0017] If the current user has control authority for the new device, the system capabilities of the control terminal are expanded to control the new device.
[0018] In some embodiments, the system capabilities of the control terminal are expanded to control new devices, including:
[0019] Load a new application to control a new device; or
[0020] Expand the control scope of the currently loaded application to control new devices.
[0021] According to a second aspect of an embodiment of the present disclosure, a device control apparatus is provided, which is applied to a control end, and a WASM container is deployed on the control end. The apparatus includes:
[0022] An acquisition module, used to acquire device information of a device accessing the control terminal;
[0023] The configuration module is used to configure the system capabilities of the control end in the WASM container based on the device information;
[0024] The control module is used to control the devices connected to the control terminal based on the system capabilities.
[0025] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of the first aspect of the embodiment of the present disclosure by executing the executable instructions.
[0026] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect of the embodiment of the present disclosure is implemented.
[0027] The device control method provided in the embodiment of the present disclosure can flexibly configure the system capabilities of the control terminal in the WASM container according to the device information connected to the control terminal. Among them, different system capabilities configured in the control terminal can be used to control different devices. The solution provided in the embodiment of the present disclosure can use the same control terminal to control multiple devices, thereby reducing the learning cost of users to control various types of devices and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of a system architecture in an embodiment of the present disclosure is shown.
[0029] Figure 2 A schematic flow chart of a device control method in an embodiment of the present disclosure is shown.
[0030] Figure 3 A schematic diagram of a process flow of a device access method in an embodiment of the present disclosure is shown.
[0031] Figure 4 A schematic structural diagram of a device control apparatus in an embodiment of the present disclosure is shown.
[0032] Figure 5 A schematic structural diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0034] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0035] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0036] First, the application scenarios of the embodiments of the present disclosure will be introduced.
[0037] Please refer to Figure 1 , Figure 1 A schematic diagram of an exemplary system architecture that can be applied to a device control method or a device control apparatus according to an embodiment of the present disclosure is shown.
[0038] like Figure 1As shown, the system architecture 100 includes a control terminal 101 and a controlled terminal 102. The control terminal 101 may be a control system installed on any electronic device. The electronic device may be any electronic device with program execution capability, such as a mobile phone, a tablet computer, a smart watch, a smart refrigerator, a smart air conditioner, a smart washing machine, etc.
[0039] Similarly, the controlled terminal 102 may also be a control system installed on the above electronic device. The control terminal 101 can control the electronic device where the controlled terminal 102 is located by communicating with the controlled terminal 102.
[0040] For example, the control terminal 101 installed on the mobile phone can communicate with the controlled terminal 102 installed on the smart refrigerator, so as to control the temperature, operation mode and other parameters of the smart refrigerator.
[0041] In some embodiments, the control terminal 101 can communicate with the controlled terminal 102 through a network, where the network can be a wired network or a wireless network. Of course, the control terminal 101 can also communicate with the controlled terminal 102 through communication technologies such as Bluetooth or near field communication, which is not limited in the embodiments of the present disclosure.
[0042] Exemplarily, the control end 101 and the controlled end 102 may be different forms of the same control system. The control system can switch between the roles of the control end 101 and the controlled end 102, so that the electronic device running the control system can switch between the roles of the control end device and the controlled end device.
[0043] Next, exemplary embodiments of the present disclosure will be described in detail in conjunction with the above application scenarios.
[0044] The present disclosure provides a device control method, which can be executed by any electronic device. Specifically, the electronic device is deployed with a control terminal in the present disclosure, and a WASM (WebAssembly) container is deployed in the control terminal, so that the method provided by the present disclosure can be implemented.
[0045] Figure 2 A schematic diagram showing a flow chart of a device control method in an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the device control method provided in the embodiment of the present disclosure includes the following steps.
[0046] S201, obtaining device information of a device accessing a control terminal.
[0047] It should be noted that the device accessing the control end can be understood as a device that can be called by the control end, which may include hardware resources in the control end device running the control end, and may also include device information of the controlled end device, wherein a controlled end is deployed on the controlled end device, and a communication link is established between the controlled end and the control end.
[0048] Similarly, the device information of the device accessing the control end may include the device information of the control end device, such as the device type, processor, network module and other device information of the control end device, and may also include the device information of the controlled end device, such as the device type of the controlled end device, the control capabilities that can be supported, etc.
[0049] S202: Configure the system capabilities of the control end in the WASM container according to the device information.
[0050] It should be noted that the system capability of the control end can be understood as the system functions that the control end can implement, and can also be understood as the control capability of the control end over the controlled end device.
[0051] In some embodiments, the control terminal can determine the application corresponding to the device information based on the acquired device information. By loading the application on the control terminal, the control terminal can realize the system capabilities provided by the application, thereby completing the configuration of the control terminal system capabilities.
[0052] For example, in the acquired device information, the type of the controlled terminal device is a smart air conditioner, and the smart air conditioner can support remote switching capability and remote temperature adjustment capability.
[0053] At this time, the control end can first determine the application corresponding to the remote switching capability and remote temperature adjustment capability. By loading the application, the control end can have the system capability of controlling the smart air conditioner to perform remote switching capability and remote temperature adjustment.
[0054] Among them, the remote switching capability and the remote temperature adjustment capability may correspond to different applications respectively, or may be different capabilities that can be implemented by the same application, and the embodiments of the present disclosure do not limit this.
[0055] Exemplarily, the application corresponding to the device information can be determined in a program library pre-deployed in the cloud and downloaded to the control terminal for loading. It can also be determined in a program library preset locally on the control terminal and loaded, which is not limited in the embodiments of the present disclosure.
[0056] Among them, the system capabilities that need to be implemented can be determined based on the device information of the controlled end, and then the corresponding application can be determined. Of course, the device information of the control end device running the control end can also be considered to ensure that the control end has sufficient hardware resources to execute the application locally, avoiding freezes and errors in the application execution process.
[0057] In some embodiments, the control end can load the application into a WASM container, wherein the operating environment of the WASM container is isolated from the operating environment of the control end, so that the variables of the application in the WASM container are isolated from the system variables of the control end, thereby allowing the application and the control end to be developed independently.
[0058] Exemplarily, one WASM container may load one application or multiple applications, which is not limited in the embodiments of the present disclosure.
[0059] It should be noted that WASM is a portable, small-sized, fast-loading binary instruction. WASM containers can provide a running environment for WASM-based applications. By deploying WASM containers in the control end, developers can package WASM-based applications into portable modules, allowing applications to be loaded and run in various control ends, thereby improving the efficiency and flexibility of cross-platform development.
[0060] The embodiment of the present disclosure deploys a unified WASM container in the control end, so that the control end can dynamically expand the system capabilities by loading different applications in the WASM container.
[0061] In some embodiments, since the application is ultimately loaded and run in a WASM container, the application needs to be compiled by a WASM compiler.
[0062] The WASM compiler can compile a program to be compiled into machine code instructions to generate an application program, wherein the program to be compiled is a program written in machine language.
[0063] Exemplarily, the WASM compiler can compile a program written in a machine language (e.g., Java, C, C++, etc.) into machine code instructions that can run on a WASM container. In other words, the application in the embodiments of the present disclosure refers to an application in the form of machine code instructions.
[0064] Therefore, in the solution provided by the embodiment of the present disclosure, since the control end finally obtains the application in the form of machine code instructions, the control end developer does not need to obtain the source code of the application (i.e., the program to be compiled), and only needs to deploy the corresponding WASM container during the development process of the control end to ensure that the application can be loaded and run in the control end. The application developer does not need to know the system architecture of the control end in advance, and can write the application in any machine language, and finally compile it into machine code instructions that can run in the WASM container.
[0065] That is to say, the solution provided by the embodiments of the present disclosure can provide developers with certain conveniences in program design, and there is no need to force any developer's work results to be open source, which can provide certain protection for the source code.
[0066] S203, based on the system capability, control the device accessing the control terminal.
[0067] Exemplarily, the application can be run to control the device connected to the control terminal through the pre-packaged interface in the control terminal, wherein the control terminal is pre-packaged with the interface corresponding to each device that the control terminal supports controlling.
[0068] It should be noted that the control terminal can pre-package corresponding control interfaces for each device that it can control. The devices here include both local devices of the control terminal, such as processors, memory, network modules, etc., and devices connected to the control terminal, such as smart refrigerators, smart air conditioners, etc.
[0069] Exemplarily, the application program may call a local network module through a pre-packaged interface, and send a control instruction to the controlled terminal device through an interface of the controlled terminal device.
[0070] The solution provided by the embodiments of the present disclosure can use the same control terminal to control multiple devices, thereby reducing the user's learning cost for controlling various types of devices and improving the user experience.
[0071] Figure 3 A schematic diagram of a device access method in an embodiment of the present disclosure is shown. Figure 3 As shown, the device access method provided in the embodiment of the present disclosure includes the following steps.
[0072] S301, when a new device is detected to be connected to the control terminal, verify the control authority of the current user.
[0073] It should be noted that the new device can be understood as a new controlled-end device, that is, a device that can be controlled by the control end.
[0074] In some embodiments, the controlled terminal device can access the control terminal through a network, where the network can be a wired network or a wireless network. It is understandable that when the controlled terminal device and the control terminal are in the same network, the control terminal can actively scan the controlled terminal device in the network so as to connect the controlled terminal device to the control terminal, thereby establishing communication with the controlled terminal device. Of course, the controlled terminal device can also actively initiate an access request to the control terminal to access the control terminal.
[0075] It is understandable that the controlled terminal device can also be connected to the control terminal through communication technologies such as Bluetooth or near field communication. In this case, the distance between the controlled terminal device and the control terminal device can be shortened, and the controlled terminal device can be brought close to the control terminal device so that the control terminal can find the controlled terminal device, and then the controlled terminal device can be connected to the control terminal, which is not limited in the embodiments of the present disclosure.
[0076] S302: If the current user has control authority over the new device, the system capability of the control terminal is expanded to control the new device.
[0077] It should be noted that the current user may be the user currently operating the control terminal. When it is verified that the current user has the control authority for the new device, the system capability of the control terminal may be expanded so that the current user can control the new device through the control terminal.
[0078] In some embodiments, the system capabilities of the control terminal can be expanded by loading a new application program, or by expanding the control scope of a currently loaded application program, thereby achieving control over a new device.
[0079] For example, after the control end detects that a smart air conditioner is connected, an application corresponding to the smart air conditioner can be loaded, so that the control end can control the smart air conditioner. If the control end has currently loaded a control program for a smart washing machine, the smart air conditioner can also be controlled through the application for controlling the smart washing machine. For example, both a smart washing machine and a smart air conditioner may support remote on / off capabilities. By running an application corresponding to the remote on / off capability, both the smart washing machine and the smart air conditioner can be controlled.
[0080] In some embodiments, when it is detected that the controlled-end device is out of the control of the current control end, for example, the controlled-end device is shut down, the controlled-end device is offline, etc., the system capacity of the control end can be retracted, that is, the corresponding application is released in the WASM container, or the corresponding application is put to sleep, thereby releasing the system resources of the control-end device.
[0081] Therefore, the solution provided by the embodiment of the present disclosure can flexibly expand and shrink the control end system capabilities, so that the same control end can dynamically control various types of equipment.
[0082] Based on the same inventive concept, the present disclosure also provides a device control apparatus, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0083] Figure 4 The schematic diagram of the structure of a device control device in an embodiment of the present disclosure is shown. The device can be applied to a control end, and a WASM container is deployed on the control end. Figure 4 As shown, the device control apparatus 400 includes: an acquisition module 401 , a configuration module 402 and a control module 403 .
[0084] The acquisition module 401 is used to acquire device information of a device accessing the control terminal.
[0085] The configuration module 402 is used to configure the system capabilities of the control end in the WASM container according to the device information.
[0086] The control module 403 is used to control the devices accessing the control terminal based on the system capability.
[0087] In some embodiments, the configuration module 402 is used to determine, based on the device information, an application corresponding to the device information; and load the application into the WASM container to implement the system capabilities provided by the application.
[0088] In some embodiments, the configuration module 402 is also used to isolate the operating environment of the WASM container from the operating environment of the control end.
[0089] In some embodiments, the application is compiled by a WASM compiler, and the WASM compiler is used to compile the program to be compiled into machine code instructions to generate an application, wherein the program to be compiled is a program written in machine language.
[0090] In some embodiments, the control module 403 is used to run an application so that the application controls a device connected to the control terminal through an interface pre-packaged in the control terminal, wherein the control terminal is pre-packaged with an interface corresponding to each device supported by the control terminal.
[0091] In some embodiments, the control module 403 is also used to verify the control authority of the current user when a new device is detected to be connected to the control terminal; if the current user has control authority for the new device, the system capabilities of the control terminal are expanded to control the new device.
[0092] In some embodiments, the control module 403 is also used to load a new application program to control a new device, or to expand the control scope of a currently loaded application program to control a new device.
[0093] It should be noted that the device control device provided in the above embodiment is only illustrated by the division of the above functional modules when used for device control. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device control device provided in the above embodiment and the device control method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0094] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0095] Refer to the following Figure 5 hereinafter, an electronic device 500 capable of implementing the embodiments of the present disclosure is described. Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of application of the embodiments of the present disclosure.
[0096] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).
[0097] The storage unit stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of the present disclosure.
[0098] In some embodiments, the processing unit 510 may perform the following steps of the above method embodiment: obtaining device information of the device accessing the control end; configuring the system capabilities of the control end in the WASM container according to the device information; and controlling the device accessing the control end based on the system capabilities.
[0099] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .
[0100] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0101] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0102] The electronic device 500 may also communicate with one or more external devices 540 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 560. Figure 5 As shown, the network adapter 560 communicates with other modules of the electronic device 500 via the bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0103] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0104] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above-mentioned method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above-mentioned "Exemplary Method" section of the present disclosure.
[0105] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0107] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0108] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0109] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0110] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0111] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0112] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A device control method, characterized in that: Applied to a control end, the control end is deployed with a WASM container, and the method includes: Acquire device information of a device connected to the control terminal; According to the device information, configure the system capability of the control end in the WASM container; Based on the system capability, the device connected to the control terminal is controlled.
2. The method according to claim 1, characterized in that The configuring the system capability of the control end in the WASM container according to the device information includes: Determining, based on the device information, an application corresponding to the device information; The application is loaded into the WASM container to implement the system capabilities provided by the application.
3. The method according to claim 1, characterized in that The operating environment of the WASM container is isolated from the operating environment of the control end.
4. The method according to claim 1, characterized in that The application is compiled by a WASM compiler, and the WASM compiler is used to compile the program to be compiled into machine code instructions to generate the application, wherein the program to be compiled is a program written in machine language.
5. The method according to claim 2, characterized in that: The controlling the device accessing the control terminal based on the system capability includes: The application is run so that the application controls the device connected to the control terminal through the pre-packaged interface in the control terminal, wherein the control terminal is pre-packaged with the interface corresponding to each device supported by the control terminal.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When a new device is detected to be connected to the control terminal, verifying the control authority of the current user; If the current user has control authority over the new device, the system capability of the control terminal is expanded to control the new device.
7. The method according to claim 6, characterized in that The expanding the system capability of the control terminal so as to control the new device includes: loading a new application to control the new device; or The control scope of the currently loaded application is expanded to control the new device.
8. A device control device, characterized in that: Applied to the control end, the control end is deployed with a WASM container, and the device includes: An acquisition module, used to acquire device information of a device connected to the control terminal; A configuration module, configured to configure the system capability of the control end in the WASM container according to the device information; The control module is used to control the equipment connected to the control terminal based on the system capability.
9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Proxy service method, screen projection method, terminal device, electronic device and storage medium
CN113543364A
WebAssey-based trusted execution environment runtime device, equipment, method and medium
CN114186243A
Application program compiling and running method and device and storage medium
CN114443051A
Application installation method and device, electronic equipment and readable storage medium
CN114968278A
Application program running method and device, equipment and medium
CN115994025A