CN112596815B - Method and device for generating functional component, storage medium and electronic device - Google Patents

Method and device for generating functional component, storage medium and electronic device Download PDF

Info

Publication number
CN112596815B
CN112596815B CN202011568983.0A CN202011568983A CN112596815B CN 112596815 B CN112596815 B CN 112596815B CN 202011568983 A CN202011568983 A CN 202011568983A CN 112596815 B CN112596815 B CN 112596815B
Authority
CN
China
Prior art keywords
function
component
target
combined
components
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011568983.0A
Other languages
Chinese (zh)
Other versions
CN112596815A (en
Inventor
万晓飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202011568983.0A priority Critical patent/CN112596815B/en
Publication of CN112596815A publication Critical patent/CN112596815A/en
Application granted granted Critical
Publication of CN112596815B publication Critical patent/CN112596815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30094Condition code generation, e.g. Carry, Zero flag
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for generating a functional component, a storage medium and an electronic device, wherein the method comprises the following steps: in response to the received target configuration operation, acquiring a plurality of single-function components, wherein the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components; determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling the target equipment; generating a resource file corresponding to the combined functional component according to the plurality of single functional components and the execution sequence; loading a resource file through a terminal, and rendering a combined functional component in a control interface according to the resource file; and responding to the operation received by the combined functional component, and sending a target control command to the target equipment through the terminal, wherein the target control command comprises a plurality of control commands. The invention solves the technical problem that the combined functional component cannot be generated in the related technology.

Description

Method and device for generating functional component, storage medium and electronic device
Technical Field
The invention relates to the technical field of data calculation, in particular to a method and a device for generating a functional component, a storage medium and an electronic device.
Background
At present, many intelligent device access platforms support visual configuration of a user operation interface, but in the prior art, only a single device function attribute can be configured for a function component, that is, only a single function component can be configured, and a device is controlled to execute a single function by operating the single function component, for example, taking a device as an air conditioner, and an air conditioner on/off, an air speed adjustment, a setting mode and the like in the user operation interface for controlling the air conditioner are all single function components. If a plurality of functions are to be simultaneously realized, for example, when an "alps air" combined functional component is configured for an air conditioner, the combined functional component relates to the combined control of a plurality of functions of the temperature, the wind speed and the humidity of the air conditioner, the "alps air" combined functional component cannot be directly configured in a visual mode in a user operation interface in the related art, but developers need to separately develop a device detail page resource package, write execution logic into the detail page resource package, and realize the function control of the device through the device detail page resource package. However, it is a very tedious matter to develop the device detail page, and the device detail page needs to be subjected to the processes of requirement review, UI design, function development, logic development, detail page test, review and release, and the cost for developing the device detail page alone is high.
Aiming at the technical problem that the combined functional components cannot be generated in the related technology, an effective technical scheme is not provided yet.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating a functional component, a storage medium and an electronic device, which are used for at least solving the technical problem that a plurality of functions of intelligent equipment cannot be directly and simultaneously realized on a user interface in the related art.
According to an embodiment of the present invention, there is provided a method for generating a functional component, including: in response to a received target configuration operation, acquiring a plurality of single-function components, wherein the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components; determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device; generating a resource file corresponding to the combined function component according to the single function components and the execution sequence; loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file; and sending a target control command to the target equipment by the terminal in response to the operation received by the combined function component, wherein the target control command comprises the plurality of control commands.
Optionally, the obtaining a plurality of single function components in response to the received target configuration operation includes: responding to a received first configuration operation, and acquiring a first single-function component indicated by the first configuration operation, wherein the target configuration operation comprises the first configuration operation; screening a first number of single-function components which can coexist with the first single-function component according to a mutual exclusion logic corresponding to the first single-function component, wherein the mutual exclusion logic is used for indicating at least one single-function component which cannot coexist with the first single-function component; displaying the first number of single function components; and in response to the received first selection operation, acquiring a second number of single-function components of the first number of single-function components, wherein the target configuration operation comprises the first selection operation, and the first selection operation is used for indicating that the second number of single-function components are selected from the first number of single-function components.
Optionally, the determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components includes: determining the sequence of acquiring each single-function component in the single-function components in the process of acquiring the single-function components; determining the sequence as the execution sequence; or, after the obtaining of the plurality of single-function components, determining an order indicated in the received adjustment operation as the execution order.
Optionally, before the generating the resource file corresponding to the combined functional component according to the plurality of single functional components and the execution order, the method further includes: determining a data type corresponding to the combined function component, wherein the data type corresponds to a target user interface style; recording the data type in the resource file.
Optionally, the loading the resource file through the terminal, and rendering the combined function component in a control interface according to the resource file includes: and in the control interface, the combined function component is represented by using a graph corresponding to the target user interface style.
Optionally, the target control command further includes the execution order, and the target control command is used to instruct the target device to execute the plurality of control commands according to the execution order.
According to another embodiment of the present invention, there is provided a generation apparatus of a functional component, including: the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for responding to a received target configuration operation and acquiring a plurality of single-function components, and the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components; the determining module is used for determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling the target equipment; a generating module, configured to generate a resource file corresponding to the combined function component according to the single function components and the execution order; the rendering module is used for loading the resource file through a terminal and rendering the combined functional component in a control interface according to the resource file; a control module, configured to send, through the terminal, a target control command to the target device in response to an operation received through the combinational function component, where the target control command includes the plurality of control commands.
Optionally, the obtaining module is further configured to: responding to a received first configuration operation, and acquiring a first single-function component indicated by the first configuration operation, wherein the target configuration operation comprises the first configuration operation; screening a first number of single-function components which can coexist with the first single-function component according to mutual exclusion logic corresponding to the first single-function component, wherein the mutual exclusion logic is used for indicating at least one single-function component which cannot coexist with the first single function; displaying the first number of single function components; and in response to the received first selection operation, acquiring a second number of single-function components of the first number of single-function components, wherein the target configuration operation comprises the first selection operation, and the first selection operation is used for indicating that the second number of single-function components are selected from the first number of single-function components.
Alternatively, according to another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is arranged to perform the above method when executed.
Alternatively, according to another embodiment of the present invention, there is provided an electronic apparatus, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the above method.
By the method and the device, a plurality of single-function components are obtained in response to the received target configuration operation, wherein the configuration operation is used for indicating that the combined function component is generated according to the single-function components; determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device; generating a resource file corresponding to the combined function component according to the single function components and the execution sequence; loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file; and sending a target control command to the target equipment through the terminal in response to the operation received by the combined functional component, wherein the target control command comprises the plurality of control commands. The method has the advantages that the execution sequence between the acquired single-function components and the control commands corresponding to the single-function components can be automatically integrated into the combined function component, so the technical problem that the combined function component cannot be generated in the related technology is solved, the combined function component capable of performing combined function control on the target equipment is generated, and the equipment detail page is not required to be independently developed by developers for realizing the combined control of the functions of the intelligent equipment, so the cost for performing the combined function control on the equipment is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method of generating functional components according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a visualization configuration interface according to an embodiment of the invention;
FIG. 3 is a flow diagram of a method for generating functional components according to another embodiment of the present invention;
FIG. 4 is a flow diagram of a method for generating functional components according to yet another embodiment of the present invention;
FIG. 5 is a schematic diagram of a visualization configuration interface according to another embodiment of the invention;
FIG. 6 is a diagram illustrating a modular structure of functional components according to an embodiment of the present invention;
FIG. 7 is a flow diagram of a visualization combining function component generation method according to an embodiment of the present invention;
fig. 8 is a block diagram of a functional component generation apparatus according to an embodiment of the present invention.
Fig. 9 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
An embodiment of the present invention provides a method for generating a functional component, and fig. 1 is a flowchart of the method for generating a functional component according to the embodiment of the present invention, as shown in fig. 1, including:
step S102, responding to a received target configuration operation, obtaining a plurality of single-function components, wherein the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components;
step S104, determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device;
step S106, generating a resource file corresponding to the combined function component according to the single function components and the execution sequence;
step S108, loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file;
step S110, in response to the operation received by the combinational function component, sending a target control command to the target device through the terminal, where the target control command includes the plurality of control commands.
By the method and the device, a plurality of single-function components are obtained in response to the received target configuration operation, wherein the configuration operation is used for indicating that the combined function component is generated according to the single-function components; determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device; generating a resource file corresponding to the combined function component according to the single function components and the execution sequence; loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file; and sending a target control command to the target equipment by the terminal in response to the operation received by the combined function component, wherein the target control command comprises the plurality of control commands. The method has the advantages that the execution sequence between the acquired single-function components and the control commands corresponding to the single-function components can be automatically integrated into the combined function component, so the technical problem that the combined function component cannot be generated in the related technology is solved, the combined function component capable of performing combined function control on the target equipment is generated, and the equipment detail page is not required to be independently developed by developers for realizing the combined control of the functions of the intelligent equipment, so the cost for performing the combined function control on the equipment is reduced.
It should be noted that, in the above embodiment, the configuration of the combined function component may be performed by operating the visual configuration interface shown in fig. 2. As shown in FIG. 2, two display areas are included in the visualization configuration interface: region 1 and region 2, wherein a user searches for existing single-function components in the visualization configuration system by "searching components" in region 1, and displays the search results in region 2, e.g., component 1, component 2, component 3, etc. Alternatively, all the single-function components already in the visualization configuration system may be displayed in region 2.
The target configuration operation in the above embodiments may be a drag operation, that is, a user may select a plurality of single-function components by performing a drag operation on the plurality of single-function components in the visualization configuration interface (including but not limited to dragging to a certain display position in the visualization configuration interface). The method comprises the steps of responding to the dragging operation of a user, obtaining a plurality of functional components selected by the user, and obtaining the combined functional component based on the configuration of the single functional components selected by the user. For example, as shown in fig. 2, a user performs a drag operation on the component 2 and the component 3 to select the component 2 and the component 3, and a combined functional component can be obtained based on the configuration of the component 2 and the component 3.
In the above embodiment, a detail page resource package corresponding to the control interface may be loaded through a terminal, where the detail page resource package includes the resource file, the terminal generates the control interface according to rendering of the detail page resource package, and the control interface includes the combination function component.
In one embodiment, as shown in fig. 3, the obtaining the plurality of single function components in response to the received target configuration operation comprises the following steps:
step S302, in response to a received first configuration operation, taking a first single-function component indicated by the first configuration operation, wherein the target configuration operation comprises the first configuration operation;
step S304, screening out a first number of single-function components which can coexist with the first single-function component according to a mutual exclusion logic corresponding to the first single-function component, wherein the mutual exclusion logic is used for indicating at least one single-function component which cannot coexist with the first single-function component;
step S306, displaying the single-function components of the first quantity;
step S308, in response to a received first selection operation, acquiring a second number of single-function components of the first number of single-function components, where the target configuration operation includes the first selection operation, and the first selection operation is used to indicate that the second number of single-function components are selected from the first number of single-function components.
It should be noted that, in response to the received first configuration operation, the first single-function component indicated by the first configuration operation is obtained, including but not limited to that the user may select the first single-function component in the visual configuration interface provided by the visual interface configuration system, and the first configuration operation includes but not limited to that the user selects the first single-function component in the visual interface configuration interface (for example, clicking, dragging, and the like). In the above embodiment, the second functional component indicated by the second configuration operation may be further obtained in response to the received second configuration operation. That is, the user may select a single functional component or a plurality of single functional components. And screening a first number of single-function components which can coexist with the first single-function component according to the mutual exclusion logic corresponding to the first single-function component, and in actual operation, screening a certain number of single-function components which can coexist with the second single-function component according to the mutual exclusion logic corresponding to the second single-function component.
Based on the embodiment, if the user only selects the first single-function component, the visual interface configuration system screens out the single-function component which can coexist with the first single-function component according to the mutual exclusion logic; if the user selects the first single-function component and the second single-function component, the visual interface configuration system respectively screens out the single-function components which can coexist with the first single-function component and the single-function components which can coexist with the second single-function component according to the mutual exclusion logic. It should be noted that, there is no conflict between the functions of the first single-function component and the second single-function component selected by the user (i.e. the control command corresponding to the first single-function component and the control command corresponding to the second single-function component can coexist), and if the functions of the first single-function component and the second single-function component selected by the user conflict, the command of the second single-function component selected by the user is considered invalid. For example, the refrigeration and heating of the air conditioner correspond to two components respectively, if a user selects a refrigeration component, the user continues to select a heating component, and the mutual exclusion logic judges that a command of selecting the heating component by the user is invalid, so that the two components are forbidden to be combined to obtain a combined functional component.
It should be noted that, in response to the received first selection operation, a second number of single-function components may be obtained from the first number of single-function components displayed. Wherein the first selection operation may be a user selection operation of a second number of single-function components. And the visual interface configuration system acquires a plurality of single-function components required by the user to realize multifunctional combined control on the target equipment from the displayed first number of single-function components according to the first selection operation. Taking the target device in the above embodiment as an example of an air conditioner, the first single-function component selected by the user is a temperature component, and the mutex logic selects another component that can coexist with the temperature component: the humidity component and the wind speed component, in this case the first number is 2, it should be noted that the first number is not fixed, and the first number is determined by the mutex logic and the first single-function component, that is, the first number is the number of the single-function components selected by the mutex logic and related to the first single-function component. After the user continues to select the wind speed component (in this case, the second number is 1, and the second number is determined by the first selection operation based on the first number), other components coexisting with the wind speed component may continue to be displayed in the visual configuration interface; or the user may continue to add other functional components, such as a mute component, and continue to display other components in the visual configuration interface that co-exist with the mute component. Through the embodiment, the single-function components are finally obtained, and then the combined function component can be configured.
In step S104, the determining an execution sequence among the plurality of control commands corresponding to the plurality of single-function components includes: determining the sequence of acquiring each single-function component in the single-function components in the process of acquiring the single-function components; determining the sequence as the execution sequence; or, after the acquiring the plurality of single-function components, determining an order indicated in the received adjustment operation as the execution order.
It should be noted that there are two ways to determine the execution sequence among the control commands corresponding to the single function components. One way is to determine the obtained sequence of each of the plurality of single-function components as the execution sequence, for example: the method comprises the steps that a user selects (or adds) a first single-function component in a visual configuration interface, the first single-function component is a temperature component, the wind speed component is continuously selected (or added), and finally the temperature component and the wind speed component are acquired in a visual interface configuration system, so that the acquisition sequence (namely the selection sequence or the addition sequence) of the temperature component is before the wind speed component, and therefore the execution sequence between the temperature regulation control command corresponding to the temperature component and the wind speed regulation control command corresponding to the wind speed component is that the temperature regulation control command is executed first, and then the wind speed regulation control command is executed.
Another way is to determine the order indicated in the received adjustment operation as the execution order, that is, the execution order may be adjusted by itself. The user may send an adjustment operation command indicating the order to the visual interface configuration system, which determines the execution order according to the command. As an alternative embodiment, if the user selects the temperature component, the wind speed component and the humidity component in sequence and performs an adjustment operation in the visual configuration interface, the adjustment operation indicates that the three components of the temperature component, the wind speed component and the humidity component are in the order of the temperature component, the humidity component and the wind speed component, so as to determine that the control commands corresponding to the three components are performed in the order of: and sequentially executing control commands corresponding to the temperature component, the humidity component and the wind speed component. Through the technical means, the execution sequence of a plurality of components in the combined functional component can be determined.
Before executing step S106, that is, before generating the resource file corresponding to the combined functional component according to the plurality of single functional components and the execution order, as shown in fig. 4, the method further includes the following steps:
step S402, determining a data type corresponding to the combined functional component, wherein the data type corresponds to a target user interface style;
step S404, recording the data type in the resource file.
In the above embodiment, the visualization configuration system may automatically generate a detail page resource package according to all the combined functional components configured in the visualization configuration interface by the user, where the detail page resource package includes a detail page resource file, and the detail page resource file is used to describe the combined functional components configured by the user.
It should be noted that the data type corresponding to the combined functional component may be integer data, boolean data, or the like. The target user interface style includes, but is not limited to, the graphics used to present the combined functional component and the arrangement or format of the graphics. It should be noted that the data type corresponding to the combined function component is related to the target user interface style. For example, boolean data is 0 and 1, so the boolean data may be used to represent a switch, and the data type corresponding to a combination function component is boolean data, so the graph corresponding to the component may be a switch, and the switch combination function component corresponds to a target user interface style; the integer data is a plurality of integers, so the integer data can be used for representing gears, if the data type corresponding to the combined functional component is the integer data, the component can be a gear component, and the gear combined functional component corresponds to a target user interface pattern; the real data may represent intervals, and real numbers in the intervals may be continuous, so that the real data may represent volume adjustment, and if the data type corresponding to the combined function component is the real data, the component may be a volume adjustment component, and the volume adjustment combined function component corresponds to a target user interface style. It should be noted that, according to the execution sequence of the plurality of single function components and component control commands and the target user interface style, the corresponding resource file may be generated, so that the combined function component may be determined according to the generated resource file.
As shown in fig. 5, a user adds a component 2 and a component 3 in a visual configuration interface, and then a combined function component can be generated from the component 2 and the component 3 in the visual configuration interface.
In step S108, the loading the resource file through the terminal and rendering the combined function component in the control interface according to the resource file includes: and in the control interface, the combined function component is represented by using a graph corresponding to the target user interface style.
It should be noted that, according to the execution sequence of the plurality of single-function components and the component control command and the target user interface style, the corresponding resource file may be generated, and the terminal loads the resource file, and may determine the combined function component according to the generated resource file. The terminal comprises but is not limited to a client, and the client determines that the combined functional component is obtained in a rendering mode according to the generated resource file. And in the control interface, the combined function component is represented by using a graph corresponding to the target user interface style. The user generates a corresponding resource file in a visual interface configuration system, the terminal loads the resource file, the terminal renders a graph corresponding to the combined function component according to a target user interface style, the function which can be realized by the combined function component is determined by all single function components included in the combined function component, and the sequence of the function which can be realized by the combined function component is determined by the execution sequence of component control commands.
For example, the following steps are carried out: the combined functional component is a switch combined functional component, so that the switch combined functional component can realize the switches with the corresponding functions of all the single-function components included in the switch combined functional component, and the sequence of the switches with the corresponding functions of all the single-function components included in the switch combined functional component is determined by the execution sequence of the component control commands. If the combined functional component is a comfortable home component of an air conditioner, the comfortable home component comprises: temperature subassembly, wind speed subassembly, humidity subassembly. If comfortable house subassembly is a switch module, opens comfortable house subassembly, will open temperature subassembly, wind speed subassembly, humidity subassembly, comfortable house subassembly can be according to indoor environment and outdoor environment, intelligent regulation temperature subassembly, wind speed subassembly, humidity subassembly for the house environment is optimum. Through the technical means, the technical problem that multiple functions of the intelligent equipment cannot be directly and simultaneously realized on the user interface in the related technology is solved, and high cost caused by independently developing equipment detail pages for realizing the multiple functions of the intelligent equipment is avoided.
It should be noted that, although the present invention relates to the device detail page as well as the realization of multiple functions of the intelligent device, the present invention does not require a developer to manually and individually develop the device detail page, and only needs to select a required single-function component in the visual interface configuration system, the visual interface configuration system will automatically generate a corresponding resource file according to the single-function component, and the resource file is loaded through the terminal, so as to render the combined function component.
In an optional embodiment, the target control command further includes the execution order, and the target control command is configured to instruct the target device to execute the plurality of control commands according to the execution order.
It should be noted that the target control command includes the plurality of control commands and the execution sequence, and the target configuration operation includes the first selection operation and the first configuration operation. According to the invention, a user can configure the combined function component by executing the target configuration operation, and further realize the combined control of a plurality of functions of the target equipment by operating one combined function component.
It should be noted that the present invention can be used for implementing a plurality of functions of a device, and can also be used for implementing a plurality of functions of a plurality of devices. The user may obtain a plurality of single-function components of one device, or may obtain a plurality of single-function components of a plurality of devices. The visual interface configuration system screens out a first number of single-function components which can coexist with the first single-function component according to the mutual exclusion logic corresponding to the first single-function component, wherein the screened-out first number of single-function components can be one device or a plurality of devices.
In order to better understand the technical scheme, the invention also provides an alternative embodiment for explaining the technical scheme.
Fig. 6 is a block diagram of a combined functional module model structure according to an embodiment of the present invention, and as shown in fig. 6, the combined functional module model structure includes the following parts:
the device functions are as follows: the combined function component is composed of more than or equal to two device single functions, where each device single function corresponds to a single function component (as an example, a device function 1, a device function 2, a device function 3, and a device function 4 of the combined function component are shown in fig. 6).
Component configuration parameters: including but not limited to the chinese name, english name, and data type of the combined functional component.
The function mutual exclusion logic: for indicating at least one function that cannot coexist with an equipment function possessed in the combined function component.
The function execution sequence is as follows: for indicating an order of execution between the plurality of device functions in the combined functional component; the order of each acquired single-function component in the multiple single-function components may be determined as the execution order, or the order indicated in the received adjustment operation may be determined as the execution order.
A module mode template: and UI templates supported by data types of the combined function component.
It should be noted that the visualization configuration interface in the above embodiments may be provided by a system for visually dragging and configuring a combination function, and the system is mainly applied to configure a high-level function combined by multiple functions when visually configuring an operation interface of an intelligent device. The problem that the device detail page needs to be developed independently in the high-level combined function in reality is solved.
Fig. 7 is a flowchart of a method for generating a visual combined functional component according to an embodiment of the present invention, as shown in fig. 7, the method includes the following steps:
s702: defining single-function components and attribute values through a modeling system, and defining exclusive logic of each single-function component attribute, for example, when the A function state is on, the B function is not supported to be set, and it needs to be explained that the operation in the modeling system is the work done by a developer, and a user does not need to process the operation;
s704: synchronizing modeling system data to a visual component configuration system, selecting single-function components in combined functions, automatically judging the single-function components which can be added by the system through function mutual exclusion logic, for example, configuring intelligent temperature regulation, adding a temperature component, a humidity component and a wind speed component, wherein it needs to be explained that if a child lock value is on, the configuration of temperature, humidity and wind speed is not supported because the child lock and the mutual exclusion logic of temperature, humidity and wind speed are hit, after the combined functions are added, the execution sequence of the functions needs to be configured, and an interface configuration module can generate a detail page resource package of the equipment;
s706: opening a client, namely a mobile terminal, binding equipment, loading the equipment detail page resource package, and generating an equipment control interface according to the file rendering in the package, wherein the generated equipment control interface comprises a combined functional component;
s708: and clicking the combination function, sending a plurality of control commands to the equipment by the client in sequence, executing the commands by the equipment and returning an execution result.
By the method and the device, a plurality of single-function components are obtained in response to the received target configuration operation, wherein the configuration operation is used for indicating that the combined function component is generated according to the single-function components; determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device; generating a resource file corresponding to the combined function component according to the single function components and the execution sequence; loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file; and sending a target control command to the target equipment by the terminal in response to the operation received by the combined function component, wherein the target control command comprises the plurality of control commands. The method has the advantages that the execution sequence between the acquired single-function components and the control commands corresponding to the single-function components can be automatically integrated into the combined function component, so the technical problem that the combined function component cannot be generated in the related technology is solved, the combined function component capable of performing combined function control on the target equipment is generated, and the equipment detail page is not required to be independently developed by developers for realizing the combined control of the functions of the intelligent equipment, so the cost for performing the combined function control on the equipment is reduced.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another embodiment of the present invention, a functional component generating apparatus is provided, which is used for implementing the foregoing embodiment and preferred embodiments, and the description of which is already given is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a functional component generation apparatus according to an embodiment of the present invention, the apparatus including:
an obtaining module 82, configured to obtain a plurality of single-function components in response to a received target configuration operation, where the configuration operation is used to instruct generation of a combined function component according to the plurality of single-function components;
a determining module 84, configured to determine an execution order among a plurality of control commands corresponding to the plurality of single-function components, where each control command in the plurality of control commands is used to control a target device;
a generating module 86, configured to generate a resource file corresponding to the combined functional component according to the plurality of single functional components and the execution order;
the rendering module 88 is configured to load the resource file through a terminal, and render the combined functional component in a control interface according to the resource file;
a control module 810, configured to send, by the terminal, a target control command to the target device in response to an operation received through the combinational function component, where the target control command includes the plurality of control commands.
By the method and the device, a plurality of single-function components are obtained in response to received target configuration operation, wherein the configuration operation is used for indicating that a combined function component is generated according to the single-function components; determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device; generating a resource file corresponding to the combined function component according to the single function components and the execution sequence; loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file; and sending a target control command to the target equipment by the terminal in response to the operation received by the combined function component, wherein the target control command comprises the plurality of control commands. Since the obtained execution sequence between the plurality of single-function components and the plurality of control commands corresponding to the plurality of single-function components can be automatically integrated into the combined function component, the technical problem that the combined function component cannot be generated in the related art is solved, the combined function component capable of performing combined function control on the target device is generated, and the cost for performing combined function control on the device is reduced because a developer does not need to separately develop a device detail page for realizing the combined control on the plurality of functions of the intelligent device.
The obtaining module 82 is further configured to, in response to the received first configuration operation, obtain a first single-function component indicated by the first configuration operation, where the target configuration operation includes the first configuration operation; screening a first number of single-function components which can coexist with the first single-function component according to mutual exclusion logic corresponding to the first single-function component, wherein the mutual exclusion logic is used for indicating at least one single-function component which cannot coexist with the first single function; displaying the first number of single function components; and in response to the received first selection operation, acquiring a second number of single-function components of the first number of single-function components, wherein the target configuration operation comprises the first selection operation, and the first selection operation is used for indicating that the second number of single-function components are selected from the first number of single-function components.
It should be noted that the determining module 84 is further configured to determine, in the process of acquiring the multiple single-function components, a sequence of acquiring each single-function component in the multiple single-function components; determining the sequence as the execution sequence; or, after the acquiring the plurality of single-function components, determining an order indicated in the received adjustment operation as the execution order.
Based on the above embodiment, the generating module 86 is further configured to determine a data type corresponding to the combined functional component, where the data type corresponds to a target user interface style; and recording the data type in the resource file.
In the above embodiment, the rendering module 88 is further configured to represent the combined function component in the control interface by using the graphics corresponding to the target user interface style.
In an optional embodiment, the target control command further includes the execution order, and the target control command is configured to instruct the target device to execute the plurality of control commands according to the execution order.
It should be noted that the target control command includes the plurality of control commands and the execution sequence, and the target configuration operation includes the first selection operation and the first configuration operation. By the invention, the user can realize the required equipment function only by carrying out target configuration operation and sending the target control command.
An embodiment of the present invention further provides a storage medium including a stored program, wherein the program executes any one of the methods described above.
Alternatively, in this embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, responding to a received target configuration operation, and acquiring a plurality of single-function components, wherein the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components;
s2, determining an execution sequence among a plurality of control commands corresponding to the single-function components, wherein each control command in the plurality of control commands is used for controlling target equipment;
s3, generating a resource file corresponding to the combined functional component according to the single functional components and the execution sequence;
s4, loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file;
and S5, responding to the operation received by the combined functional component, and sending a target control command to the target equipment by the terminal, wherein the target control command comprises the plurality of control commands.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
Embodiments of the present invention further provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, responding to a received target configuration operation, and acquiring a plurality of single-function components, wherein the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components;
s2, determining an execution sequence among a plurality of control commands corresponding to the single-function components, wherein each control command in the plurality of control commands is used for controlling target equipment;
s3, generating a resource file corresponding to the combined function component according to the single function components and the execution sequence;
s4, loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file;
and S5, responding to the operation received by the combined functional component, and sending a target control command to the target equipment by the terminal, wherein the target control command comprises the plurality of control commands.
Fig. 9 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention. Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and the apparatus for generating functional components in the embodiment of the present invention, and the processor 904 executes various functional applications and data processing by executing the software programs and modules stored in the memory 902, so as to implement the data synchronization method. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory located remotely from the processor 904, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. As an example, the memory 902 may include, but is not limited to, the obtaining module 82, the determining module 84, the generating module 86, the rendering module 88, and the control module 810 of the generating apparatus including the functional components. In addition, the present invention may further include, but is not limited to, other module units in the generating apparatus of the foregoing functional components, which are not described in detail in this example.
Optionally, the transmitting device 906 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmitting device 906 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 906 is a Radio Frequency (RF) module used to communicate with the internet via wireless means.
In addition, the electronic device further includes: a display 908 for displaying a screen; and a connection bus 910 for connecting the respective module parts in the above-described electronic apparatus.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims (10)

1. A method for generating a functional component, comprising:
in response to a received target configuration operation, acquiring a plurality of single-function components, wherein the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components;
determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling a target device;
generating a resource file corresponding to the combined functional component according to the single functional components and the execution sequence;
loading the resource file through a terminal, and rendering the combined functional component in a control interface according to the resource file;
and sending a target control command to the target equipment through the terminal in response to the operation received by the combined functional component, wherein the target control command comprises the plurality of control commands.
2. The method of claim 1, wherein obtaining a plurality of single function components in response to the received target configuration operation comprises:
responding to a received first configuration operation, and acquiring a first single-function component indicated by the first configuration operation, wherein the target configuration operation comprises the first configuration operation;
screening a first number of single-function components which can coexist with the first single-function component according to mutual exclusion logic corresponding to the first single-function component, wherein the mutual exclusion logic is used for indicating at least one single-function component which cannot coexist with the first single function;
displaying the first number of single function components;
in response to the received first selection operation, obtaining a second number of single-function components of the first number of single-function components, wherein the target configuration operation comprises the first selection operation, and the first selection operation is used for indicating that the second number of single-function components are selected from the first number of single-function components.
3. The method of claim 1, wherein determining an execution order among the plurality of control commands corresponding to the plurality of single function components comprises:
determining the sequence of acquiring each single-function component in the plurality of single-function components in the process of acquiring the plurality of single-function components;
determining the sequence as the execution sequence; or,
determining an order indicated in the received adjustment operation as the execution order after the acquiring of the plurality of single function components.
4. The method of claim 1, wherein prior to the generating a resource file corresponding to the combined functional component from the plurality of single functional components and the execution order, the method further comprises:
determining a data type corresponding to the combined function component, wherein the data type corresponds to a target user interface style;
and recording the data type in the resource file.
5. The method of claim 4, wherein the loading the resource file through the terminal and rendering the combined function component in the control interface according to the resource file comprises:
and in the control interface, the combined function component is represented by using a graph corresponding to the target user interface style.
6. The method of claim 1, wherein the target control command further comprises the execution order, and wherein the target control command is configured to instruct the target device to execute the plurality of control commands in the execution order.
7. An apparatus for generating a functional component, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for responding to a received target configuration operation and acquiring a plurality of single-function components, and the configuration operation is used for indicating that a combined function component is generated according to the plurality of single-function components;
the determining module is used for determining an execution sequence among a plurality of control commands corresponding to the plurality of single-function components, wherein each control command in the plurality of control commands is used for controlling the target equipment;
a generating module, configured to generate a resource file corresponding to the combined function component according to the single function components and the execution order;
the rendering module is used for loading the resource file through a terminal and rendering the combined functional component in a control interface according to the resource file;
a control module, configured to send, by the terminal, a target control command to the target device in response to an operation received through the combined function component, where the target control command includes the plurality of control commands.
8. The apparatus of claim 7, wherein the obtaining module is further configured to:
responding to a received first configuration operation, and acquiring a first single-function component indicated by the first configuration operation, wherein the target configuration operation comprises the first configuration operation; screening a first number of single-function components which can coexist with the first single-function component according to a mutual exclusion logic corresponding to the first single-function component, wherein the mutual exclusion logic is used for indicating at least one single-function component which cannot coexist with the first single-function component; displaying the first number of single function components; in response to the received first selection operation, obtaining a second number of single-function components of the first number of single-function components, wherein the target configuration operation comprises the first selection operation, and the first selection operation is used for indicating that the second number of single-function components are selected from the first number of single-function components.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202011568983.0A 2020-12-25 2020-12-25 Method and device for generating functional component, storage medium and electronic device Active CN112596815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011568983.0A CN112596815B (en) 2020-12-25 2020-12-25 Method and device for generating functional component, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011568983.0A CN112596815B (en) 2020-12-25 2020-12-25 Method and device for generating functional component, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112596815A CN112596815A (en) 2021-04-02
CN112596815B true CN112596815B (en) 2023-02-03

Family

ID=75202319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011568983.0A Active CN112596815B (en) 2020-12-25 2020-12-25 Method and device for generating functional component, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112596815B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113176893B (en) * 2021-04-29 2023-06-16 华人运通(上海)云计算科技有限公司 Automobile control simulation method and device, storage medium and terminal equipment
CN114697150B (en) * 2022-02-25 2024-03-22 青岛海尔科技有限公司 Command issuing method and device, storage medium and electronic device
CN114911535B (en) * 2022-04-22 2023-12-19 青岛海尔科技有限公司 Application program component configuration method, storage medium and electronic device
CN115328483B (en) * 2022-08-22 2024-03-19 北京达佳互联信息技术有限公司 Management method and device for business function entry, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719406A (en) * 2004-07-09 2006-01-11 英华达(南京)科技有限公司 Method of proceeding visible allocation against interface in terminal equipment using personal computer
CN101833465A (en) * 2010-04-23 2010-09-15 中国科学院声学研究所 Embedded system supporting dynamic loading operation of application programs
CN106152426A (en) * 2016-09-06 2016-11-23 珠海格力电器股份有限公司 Air conditioning control method and device
CN108628598A (en) * 2018-05-03 2018-10-09 山东浪潮通软信息科技有限公司 A kind of the web development approaches and device of modularization
WO2019084861A1 (en) * 2017-11-02 2019-05-09 深圳市汇顶科技股份有限公司 Software testing method and device
CN110795649A (en) * 2019-09-18 2020-02-14 北京你财富计算机科技有限公司 Target page display method, device and system and electronic equipment
CN211575419U (en) * 2019-07-20 2020-09-25 宁波奥克斯电气股份有限公司 Individualized air conditioner remote controller and air conditioner

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719406A (en) * 2004-07-09 2006-01-11 英华达(南京)科技有限公司 Method of proceeding visible allocation against interface in terminal equipment using personal computer
CN101833465A (en) * 2010-04-23 2010-09-15 中国科学院声学研究所 Embedded system supporting dynamic loading operation of application programs
CN106152426A (en) * 2016-09-06 2016-11-23 珠海格力电器股份有限公司 Air conditioning control method and device
WO2019084861A1 (en) * 2017-11-02 2019-05-09 深圳市汇顶科技股份有限公司 Software testing method and device
CN108628598A (en) * 2018-05-03 2018-10-09 山东浪潮通软信息科技有限公司 A kind of the web development approaches and device of modularization
CN211575419U (en) * 2019-07-20 2020-09-25 宁波奥克斯电气股份有限公司 Individualized air conditioner remote controller and air conditioner
CN110795649A (en) * 2019-09-18 2020-02-14 北京你财富计算机科技有限公司 Target page display method, device and system and electronic equipment

Also Published As

Publication number Publication date
CN112596815A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN112596815B (en) Method and device for generating functional component, storage medium and electronic device
US10284705B2 (en) Method and apparatus for controlling smart device, and computer storage medium
CN109725901A (en) Development approach, device, equipment and the computer storage medium of front-end code
EP3441833B1 (en) Programming support device, control method of programming support device, and control program of programming support device
CN111984248A (en) Page editing method and device, storage medium and electronic device
CN110187953A (en) A kind of operation method and device of application program
CN107407923A (en) PLC control datas generating means, PLC control datas generation method and PLC control datas generation program
CN112416195A (en) Method and device for generating device control function
CN108198272A (en) A kind of data processing method and its equipment
CN112632444A (en) Visual website theme configuration method and device
CN111208924A (en) Navigation processing method and device of terminal, storage medium and processor
CN115857859B (en) Debugging method and device of element module, electronic equipment and storage medium
CN108538379A (en) The processing method of parameter and magnetic resonance parameters card interface in magnetic resonance parameters card
CN117938287A (en) Wireless channel simulation method, device, equipment and readable storage medium
CN115509493A (en) Interface configuration method, interface configuration device, interface configuration equipment and storage medium
CN117149611A (en) Test result determining method and device
CN117667644A (en) Application testing method, device, equipment and storage medium
CN112732296A (en) Software version updating method and device, storage medium and electronic equipment
CN115495000A (en) Picture display method and device of android terminal, electronic equipment and storage medium
CN113919278A (en) Design method and device of circuit board, electronic equipment, medium and product
CN118212327A (en) Character local animation realization method and device, storage medium and electronic device
CN114219086A (en) Deep learning model training method and device and related equipment
CN117591131A (en) Application deployment method, system, device, electronic equipment and readable medium
CN114491439A (en) User permission configuration method and device, storage medium and terminal
KR20150099141A (en) A method for providing an application developing environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant