Visual multi-interface design method, system and equipment of temperature controller and storage medium

By adopting a visual multi-interface design method in the thermostat, the control parameter configuration file is automatically generated, which solves the problems of long precompilation time and easy configuration parameters in the existing technology, and realizes a more efficient design and conversion process.

CN119473282APending Publication Date: 2025-02-18HAILIN ENERGY TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411447127.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art consumes a lot of time during the precompilation stage of the thermostat, and errors are prone to inefficient during the configuration of parameters.

Method used

Using a visual multi-interface design method, by obtaining interface control parameters, reading font library files and picture files, allocating storage areas, creating interface controls, and adding font libraries and picture files according to user needs, converting fonts and pictures, and automatically generating controls Parameter configuration file to reduce manual configuration and conversion steps.

Benefits of technology

Reduces code precompilation time, simplifies the font and image conversion process, improves the degree of automation of configuration files, saves memory, and improves overall design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473282A_ABST
    Figure CN119473282A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a visual multi-interface design method, system and equipment for a temperature controller and a storage medium, control creation and parameter configuration are carried out based on visual multi-interfaces, a control parameter configuration file is automatically generated, unused parameters are not directly written into the configuration file, a large amount of memory can be saved, and the design efficiency is improved. According to the method, the pre-compiling time is greatly shortened, font / picture conversion is integrated locally, conversion can be carried out under the condition that no network exists, font / picture information configured on each interface can be automatically obtained, files capable of being recognized by a temperature controller can be generated through one key, errors are avoided, and efficiency is improved; the control is created in a double-click mode, the state change of the control can be visually seen through parameter modification, the interface display / operation function of the temperature controller is effectively matched, and problems are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of thermostats, and in particular to a visualized multi-interface design method, system, device and storage medium for thermostats. Background Art

[0002] With the application of color screen technology in thermostats, it is increasingly favored by users for its aesthetic, dynamic and other performances. However, the complexity of its technical architecture places higher and higher requirements on engineers, which makes it particularly important to quickly and efficiently design a color screen interface. The current existing technical solution is to first modify the control parameters required by each interface in the control parameter configuration file according to the product technical documentation (such as control enable, position, size, background color, events, etc.), and then summarize the font size and picture information corresponding to the text on each interface as parameters, and export them as files that can be recognized by the program through the conversion tool. After the conversion is completed, the corresponding reference processing must be done in the program, and finally the program can be downloaded to the thermostat for operation after it is compiled.

[0003] The prior art has the following disadvantages:

[0004] 1) Parameters not used in the configuration file will occupy extra memory, resulting in memory waste. At the same time, a lot of time will be spent in the program pre-compilation stage, resulting in low compilation efficiency;

[0005] 2) The steps for converting fonts and pictures into files that can be recognized by the thermostat are cumbersome, and multiple parameters need to be entered. The conversion can only be done when there is a network connection, which results in low efficiency. Wrong parameter filling will also make the file unusable.

[0006] 3) When modifying parameters in the configuration file, the control status cannot be intuitively felt. At the same time, it is easy to make mistakes in the parameter configuration process, resulting in unknown problems in the display / operation interface. Moreover, when the parameters are modified in the subsequent requirements, it takes time to search in the configuration file. Summary of the invention

[0007] To this end, the embodiments of the present invention provide a visual multi-interface design method, system, device and storage medium for a temperature controller to solve the technical problems that the pre-compilation stage of the prior art takes a lot of time, and the configuration parameter process is prone to errors and low efficiency.

[0008] In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:

[0009] According to a first aspect of an embodiment of the present invention, a visual multi-interface design method for a thermostat is provided. The method is applied to a thermostat and includes:

[0010] S1, obtaining interface control parameters and reading font library files and image files, allocating storage areas for each interface control parameter and allocating storage areas for the read font library files and image files;

[0011] S2, creating an interface control and obtaining user requirements, adding a font library and an image file according to the user requirements, reading a control parameter configuration file and a font file to perform corresponding font conversion and image conversion, and generating a control parameter configuration file, a font file, and an image file required by the user;

[0012] S3. Copy the control parameter configuration file, font file and image file required by the user to the thermostat for compilation, and download the compiled thermostat multi-interface file to the local computer for operation.

[0013] Further, obtaining interface control parameters and reading font library files and image files, allocating storage areas for each interface control parameter and allocating storage areas for the read font library files and image files, including:

[0014] Allocate each interface control parameter storage area, font parameter storage area and image parameter storage area and determine whether the folder path for storing fonts is valid;

[0015] If valid, retrieve the file in the font library folder;

[0016] If it is invalid, create a font library folder under this path and determine whether the path to the folder storing the images is valid;

[0017] If invalid, create a picture folder under this path;

[0018] If it is valid, the image file in the image folder is retrieved and it is determined whether the image file conforms to the image format;

[0019] If it matches the picture format, add the picture information to the picture parameter storage area and continue to search for files in the picture folder until all picture files are retrieved.

[0020] Further, retrieve the files in the font library folder, including:

[0021] Determine whether the files in the font library folder conform to the font library format;

[0022] If it matches, add the font library information to the font parameter storage area and retrieve the next file in the font library folder;

[0023] If it does not match, search for the next file in the font library folder;

[0024] After the font library folder is retrieved, check whether the path to the folder storing the images is valid.

[0025] Furthermore, adding font libraries and image files according to the user's needs includes:

[0026] Adding font libraries includes:

[0027] Click the Add Font Library File button to open the font library folder interface and select the font library file to be added;

[0028] Determining whether the font library file conforms to the font library format;

[0029] If it is consistent, determine whether the font library parameter area contains this font library file;

[0030] If not, adding the font library file to the parameter storage area;

[0031] If included, the addition of the font library file is interrupted;

[0032] Adding image files includes:

[0033] Click the Add Image File button to open the image folder interface and select the image file you want to add;

[0034] Determine whether the image file conforms to the image format;

[0035] If it matches, determine whether the image parameter area contains this image file;

[0036] If not, the image file is added to the parameter storage area;

[0037] If included, the adding of the picture file is interrupted.

[0038] Furthermore, the control parameter configuration file and font file are read, including:

[0039] Click the Read Configuration File button and select the storage path of the configuration file;

[0040] Determine whether the control parameter configuration file exists;

[0041] If it exists, read the file data and save it to the control parameter storage area and read the corresponding control parameters according to the current interface;

[0042] Determine whether all controls have been read;

[0043] If the reading is completed, the font file is determined;

[0044] If the reading is not completed, determine whether the current control is enabled. Otherwise, read the corresponding space parameters according to the current interface;

[0045] If yes, create and configure parameters according to the control type and parameter data;

[0046] Determine whether the font file exists. If not, a pop-up window will pop up to prompt that the font file does not exist;

[0047] If the font file exists, read the file data and save it to the font storage area.

[0048] Furthermore, font files and image files are generated, including:

[0049] Click the button to generate font file in one click and search the font parameter storage area to determine whether the font parameters have been searched.

[0050] If the search is not complete, retrieve the uppercase and lowercase letters and numbers in the current font and convert other characters into corresponding uincode codes, call the font conversion function to generate a file and re-search the font parameter storage area;

[0051] If the retrieval is completed, the font parameter storage area is retrieved and it is determined whether the font parameter is retrieved. If the retrieval is not completed, it is determined whether the conversion is successful. If the conversion is successful, the font parameter storage area is retrieved again.

[0052] If the conversion fails, the name of the font that failed to be converted is recorded;

[0053] Determine whether all fonts are successfully converted. If not, a pop-up window will be displayed showing all unsuccessful font conversions. If yes, the process ends.

[0054] The generated image files include:

[0055] Click the button to generate a picture file with one click and search the picture parameter storage area to determine whether the picture parameters have been searched;

[0056] If the search is not completed, call the image conversion function to generate the file and search the image parameter storage area again;

[0057] If the retrieval is completed, the image parameter storage area is retrieved and it is determined whether the image parameters are retrieved. If the retrieval is not completed, it is determined whether the conversion is successful. If the conversion is successful, the image parameter storage area is retrieved again. If it is unsuccessful, the name of the image that was not successfully converted is recorded and the image parameter storage area is retrieved again.

[0058] If the search is completed, determine whether all images have been converted successfully. If there are any images that have not been converted successfully, a pop-up window will display all the images that have not been converted successfully. If all are converted successfully, the process ends.

[0059] Furthermore, a control parameter configuration file required by the user is generated, including:

[0060] Double-click the control on the interface to create a chart and determine the control creation type;

[0061] If the control creation type is not a button, picture or character, determine whether the current interface is a second / third level interface. If it is not a second / third level interface, retrieve and determine whether there is an unused control in the control parameter storage area.

[0062] If the control creation type is button, picture or character, then search and determine whether there is an unused control corresponding to the control parameter storage area;

[0063] If it does not exist, a pop-up window will appear to remind you that the control has been used up;

[0064] If it exists, create the control, fill in the control parameters and automatically synchronize them to the corresponding parameter storage area. Click the Generate Configuration File button to open the file stream to read the control parameter area for read and write operations and generate the control parameter configuration file.

[0065] According to a second aspect of an embodiment of the present invention, a visual multi-interface design system for a thermostat is provided, the system comprising:

[0066] An initialization module, used to obtain interface control parameters and read font library files and image files, allocate storage areas for each interface control parameter and allocate storage areas for the read font library files and image files;

[0067] The file operation module is used to create an interface control and obtain user requirements, add a font library and image files according to the user requirements, read the control parameter configuration file and the font file to perform corresponding font conversion and image conversion, and generate the control parameter configuration file, font file and image file required by the user;

[0068] The compilation module is used to copy the control parameter configuration files, font files and image files required by the user to the thermostat for compilation, and download the compiled thermostat multi-interface file to the local for operation.

[0069] According to a third aspect of an embodiment of the present invention, a visual multi-interface design device for a thermostat is provided, the device comprising: a processor and a memory;

[0070] The memory is used to store one or more program instructions;

[0071] The processor is used to run one or more program instructions to execute the steps of the visual multi-interface design method for the thermostat as described in any one of the above items.

[0072] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the visual multi-interface design method for a thermostat as described in any of the above items are implemented.

[0073] The embodiments of the present invention have the following advantages:

[0074] The embodiment of the present invention performs control creation and parameter configuration based on a visual multi-interface, automatically generates a control parameter configuration file, and does not directly write unused parameters into the configuration file, which can save a lot of memory and greatly shorten the pre-compilation time. The font / image conversion is integrated locally, and the conversion can be performed even without a network. At the same time, the font / image information configured on each interface can be automatically obtained, and a file recognizable by the thermostat can be generated with one click, which avoids errors and improves efficiency. Controls are created by double-clicking, and the state changes of the controls can be intuitively seen when the parameters are modified, which effectively cooperates with the interface display / operation function of the thermostat to avoid problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0076] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0077] Figure 1 A schematic diagram of the logical structure of a visual multi-interface design system for a temperature controller provided by an embodiment of the present invention;

[0078] Figure 2 A schematic diagram of a flow chart of a method for visualizing a multi-interface design of a temperature controller provided by an embodiment of the present invention;

[0079] Figure 3 A schematic diagram of the architecture of a visual multi-interface design system for a temperature controller provided by an embodiment of the present invention;

[0080] Figure 4 A schematic diagram of the initialization process in the visual multi-interface design method for a temperature controller provided by an embodiment of the present invention;

[0081] Figure 5 A schematic diagram of the process of adding a font library in the visual multi-interface design method for a thermostat provided by an embodiment of the present invention;

[0082] Figure 6 A schematic diagram of the process of adding image files in a method for visualizing a thermostat with multiple interfaces provided by an embodiment of the present invention;

[0083] Figure 7 A schematic diagram of a flow chart of writing a control parameter configuration file in a visual multi-interface design method for a thermostat provided by an embodiment of the present invention;

[0084] Figure 8 A schematic diagram of a flow chart of reading a control parameter configuration file and a font file in a method for designing a thermostat with a visualized multi-interface according to an embodiment of the present invention;

[0085] Fig. 9 A logical schematic diagram of one-key generation of font files in a visual multi-interface design method for a thermostat provided by an embodiment of the present invention;

[0086] Fig.10 A schematic diagram of a single font file conversion logic in a visual multi-interface design method for a thermostat provided by an embodiment of the present invention;

[0087] Fig.11 A schematic diagram of a logic of converting a picture file with one key in a method for designing a thermostat with multiple interfaces in a visualization provided by an embodiment of the present invention;

[0088] Fig.12 A schematic diagram of the logic of manually generating image file conversion in a visual multi-interface design method for a thermostat provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0089] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0090] With the application of color screen technology in thermostats, it is increasingly favored by users for its aesthetic, dynamic and other performances. However, the complexity of its technical architecture places higher and higher requirements on engineers, which makes it particularly important to quickly and efficiently design a color screen interface. The current existing technical solution is to first modify the control parameters required by each interface in the control parameter configuration file according to the product technical documentation (such as control enable, position, size, background color, events, etc.), and then summarize the font size and picture information corresponding to the text on each interface as parameters, and export them as files that can be recognized by the program through the conversion tool. After the conversion is completed, the corresponding reference processing must be done in the program, and finally the program can be downloaded to the thermostat for operation after it is compiled.

[0091] In order to solve the technical problems that the above-mentioned pre-compilation stage takes a lot of time, the configuration parameter process is prone to errors and low efficiency.

[0092] refer to Figure 1 The embodiment of the present invention discloses a visual multi-interface design system for a temperature controller, the system comprising: an initialization module 1; a file operation module 2; and a compilation module 3.

[0093] Corresponding to the above-disclosed visualized multi-interface design system for the thermostat, the embodiment of the present invention further discloses a visualized multi-interface design method for the thermostat. The visualized multi-interface design method for the thermostat disclosed in the embodiment of the present invention is described in detail below in conjunction with the above-described visualized multi-interface design system for the thermostat.

[0094] refer to Figure 2 and Figure 3 The present invention discloses a visual multi-interface design method for a thermostat, which is applied to a thermostat and includes: S1, obtaining interface control parameters and reading font library files and image files, allocating storage areas for each interface control parameter and allocating storage areas for the read font library files and image files; S2, creating an interface control and obtaining user requirements, adding font libraries and image files according to the user requirements, reading control parameter configuration files and font files to perform corresponding font conversion and image conversion, and generating control parameter configuration files, font files and image files required by the user; S3, copying the control parameter configuration files, font files and image files required by the user to the thermostat for compilation, and downloading the compiled thermostat multi-interface file to the local for operation.

[0095] Depend on Figure 3 It can be seen that the visual multi-interface system mainly consists of four parts: initialization module, file operation module, font conversion module, and image conversion module:

[0096] Initialization module: It mainly allocates storage areas for each interface control parameter after the system starts, which is used to store the parameters when creating the control so as to generate the control parameter configuration file later; secondly, it allocates storage areas for the read font library files and image files, which are used to display text and images of corresponding sizes when the control is created, so as to generate font files and image files later.

[0097] Font conversion module: One-click font file generation function, mainly used for unified processing after completing control parameter configuration; single font file generation function, mainly used to modify font content.

[0098] Image conversion module: One-click image file generation function, mainly used for unified processing after completing control parameter configuration; manual image file generation function, mainly used for new image processing.

[0099] Further, refer to Figure 4 , obtain interface control parameters and read font library files and image files, allocate storage areas for each interface control parameter and allocate storage areas for the read font library files and image files, including: allocating each interface control parameter storage area, font parameter storage area and image parameter storage area and judging whether the folder path for storing fonts is valid; if valid, retrieving files in the font library folder; if invalid, creating a font library folder under this path and judging whether the folder path for storing images is valid; if invalid, creating an image folder under this path; if valid, retrieving image files in the image folder and judging whether the image files conform to the image format; if conforming to the image format, adding image information to the image parameter storage area and continuing to retrieve files in the image folder until all image files are retrieved.

[0100] The logic for determining whether the retrieval of files is complete is as follows:

[0101]

[0102] Among them, 1 means yes, 0 means no, x means the number of files currently being retrieved, d sum Indicates the total number of files retrieved under the path.

[0103] The logic for determining whether a file conforms to the font library format is as follows:

[0104]

[0105] Among them, 1 means yes, 0 means no, x means the suffix of the current search file, *.ttf, *.woff, *.otf represent the three supported font library formats, and the value is 1 if the suffix of the current search font library file meets one of the above three formats, otherwise it is 0.

[0106] The logic for determining whether a file conforms to the image format is as follows:

[0107]

[0108] Among them, 1 means yes, 0 means no, x means the current search file suffix, *.png, *.jpg, *.svg, *.bmp represent the four supported image formats, and the value is 1 if the current search image file suffix meets one of the above four formats, otherwise it is 0.

[0109] Further, refer to Figure 4 , searching for files in the font library folder, including: determining whether the files in the font library folder conform to the font library format; if so, adding the font library information to the font parameter storage area and searching for the next file in the font library folder; if not, searching for the next file in the font library folder; after the font library folder is searched, detecting whether the path of the folder storing the pictures is valid.

[0110] Further, refer to Figure 5 , adding font library and picture files according to the user's needs, including: adding font library includes: clicking the add font library file button to open the font library folder interface and selecting the font library file to be added; judging whether the font library file conforms to the font library format; if it conforms, judging whether the font library parameter area contains this font library file; if it does not contain, adding the font library file to the parameter storage area; if it contains, interrupting the addition of the font library file.

[0111] The logic for determining whether a file conforms to the font library format is:

[0112]

[0113] Among them, 1 means yes, 0 means no, x means the suffix of the current search file, *.ttf, *.woff, *.otf represent the three supported font library formats, and if the suffix meets one of the above three formats, it is 1, otherwise it is 0.

[0114] The logical formula for determining whether the font library parameter storage area contains this file is as follows:

[0115]

[0116] Among them, 1 means yes, 0 means no, x means the current file name, p names Indicates all related file names in the parameter storage area.

[0117] refer to Figure 6, adding a picture file includes: clicking the add picture file button to open the picture folder interface and selecting the picture file to be added; judging whether the picture file conforms to the picture format; if it conforms, judging whether the picture parameter area contains this picture file; if it does not contain, adding the picture file to the parameter storage area; if it contains, interrupting the addition of the picture file.

[0118] The logic for determining whether a file conforms to the image format is as follows:

[0119]

[0120] Among them, 1 means yes, 0 means no, x means the current search file suffix, *.png, *.jpg, *.svg, *.bmp represent the four supported image formats, and the value is 1 if the current search image file suffix meets one of the above four formats, otherwise it is 0.

[0121] The logical formula for determining whether the image parameter storage area contains this file is as follows:

[0122]

[0123] Among them, 1 means yes, 0 means no, x means the current file name, p names Indicates all related file names in the parameter storage area.

[0124] Further, refer to Figure 8 , read the control parameter configuration file and font file, including: click the read configuration file button and select the storage path of the configuration file; determine whether the control parameter configuration file exists; if it exists, read the file data and save it to the control parameter storage area and read the corresponding control parameters according to the current interface; determine whether all controls have been read; if the reading is completed, determine the font file; if not, determine whether the current control is enabled, if not, read the corresponding space parameters according to the current interface; if yes, create and configure parameters according to the control type and parameter data; determine whether the font file exists, if not, pop up a window to prompt that the font file does not exist; if the font file exists, read the file data and save it to the font storage area.

[0125] Determine whether the control configuration file has a logical formula:

[0126]

[0127] Among them, 1 means existence, 0 means non-existence, and x represents the file name under the path. Its content cannot be empty and must match the specified content to be valid.

[0128] The logical formula for determining the existence of a font file is as follows:

[0129]

[0130] Among them, 1 means existence, 0 means no, x means the font file name in the path, and its name suffix is ​​.c format to be valid.

[0131] The logical formula for judging that all controls have been read is as follows:

[0132]

[0133] Among them, 1 means yes, 0 means no, x means the interface where the control is located, and d means the current interface.

[0134] The logic formula for judging whether the current control is enabled is as follows:

[0135]

[0136] Among them, 1 means yes, 0 means no, and x represents the control enable value.

[0137] Further, refer to Fig. 9 , generate font files and image files, including: click a one-click font file generation button and search the font parameter storage area to determine whether the font parameters have been retrieved; if the retrieval is not complete, retrieve the uppercase and lowercase letters and numbers in the current font and convert other characters into corresponding uincode codes, call the font conversion function to generate files and re-retrieve the font parameter storage area; if the retrieval is complete, search the font parameter storage area and determine whether the font parameters have been retrieved, if the retrieval is not complete, determine whether the conversion is successful, if the conversion is successful, re-retrieve the font parameter storage area; if the conversion is not successful, record the name of the font that has not been successfully converted; determine whether all fonts have been successfully converted, if not, pop up a window of all the fonts that have not been successfully converted, if yes, end.

[0138] After clicking the one-click generate button, the automatic conversion logic starts to run. The font parameter storage area is retrieved, which mainly includes the font library file name, path, font name to be converted, size, character content to be converted and other information. These will be used as parameters to participate in the function of generating files. The logic for judging whether the font parameter retrieval is completed is the same as the logic formula for judging whether the file retrieval is completed. After each font type is retrieved, the number of font parameters increases by 1, and it is compared with the total number of font parameters to determine whether it is completed. After completion, it is necessary to check again whether all font parameter storage areas have been converted. The logic for judging whether the conversion is successful is to check whether the font name to be converted in the parameter storage area has the same name in the generated file. The logic can refer to the logic formula for judging whether the font library parameter storage area contains this file.

[0139] For unsuccessful conversions, the file names will be recorded to determine whether the conversion is successful. The logical formula is as follows:

[0140]

[0141] Among them, 1 means yes, 0 means no, and x means the name of the font that was not successfully converted. If the value is empty, it means that all the conversions are successful. Otherwise, a pop-up window will prompt all the fonts that were not successfully converted, which is used by the operator to locate which type of fonts were not successfully converted and quickly solve the problem.

[0142] refer to Fig.10 , click the single Generate Font File button to open the font conversion interface, click to select the font library file and enter the font size and the character content to be converted, click the Start Conversion button, determine whether the parameters are correct, if the parameters are wrong, terminate the conversion, if the parameters are correct, retrieve the uppercase and lowercase letters and numbers in the current font and convert other characters to corresponding uincode codes, call the font conversion function to generate a file for conversion and determine whether the conversion is successful, if successful, end, if failed, a pop-up window will prompt that the font conversion failed.

[0143] After clicking the single button to generate font files, the logic starts. The difference from one-click generation is that the operator needs to enter the required parameters before conversion. At this time, it is necessary to judge the correctness of the parameters, as follows:

[0144]

[0145] Among them, 1 means yes, 0 means no, x1 means input font library file, x2 means input character content, and x3 value means font size and is a number. Only when all three conditions are met can it be correct.

[0146] refer to Fig.11 , generating an image file includes: clicking a one-click image file generation button and searching the image parameter storage area to determine whether the image parameters have been retrieved; if the retrieval has not been completed, calling the image conversion function to generate a file and re-retrieve the image parameter storage area; if the retrieval is complete, searching the image parameter storage area and determining whether the image parameters have been retrieved; if the retrieval has not been completed, determining whether the conversion is successful; if the conversion is successful, re-searching the image parameter storage area; if not, recording the names of the unconverted images and re-searching the image parameter storage area; if the retrieval is complete, determining whether all images have been converted successfully; if there are unconverted images, a pop-up window will be displayed for all unconverted images; if all conversions are successful, the process ends.

[0147] After clicking the button of one-click generation of image file, the logic starts, and the image parameter storage area is retrieved, which mainly includes the image file name, path and other information. These will be used as parameters to participate in the function of generating image files. The logic of judging whether the image parameter retrieval is completed is the same as the logic formula of file retrieval completion. After each image is retrieved, the number of image parameters increases by 1, and it is compared with the total number of image parameters to determine whether it is completed. After completion, it is necessary to check again whether all image parameter storage areas have been converted. The logic of judging whether the conversion is successful is the same as the logic formula of file conversion success. For subsequent logic, please refer to the logic of one-click generation of font files.

[0148] refer to Fig.12 , click the Manually Generate Image File button, a pop-up window of image conversion interface will appear and click to select an image file, enter the image conversion format and click the Start Conversion button. At this time, determine whether the parameters are correct. If not, end. If correct, call the image conversion function to generate the file and determine whether the conversion is successful. If successful, end. If not, a pop-up window of image conversion failure will appear.

[0149] The formula for judging the correctness of the parameters is as follows:

[0150]

[0151] Among them, 1 means yes, 0 means no, x1 means the input image file, and x2 means the input image format. Only when both conditions are met can it be correct.

[0152] Further, refer to Figure 7 , generate the control parameter configuration file required by the user, including: double-clicking the control on the interface to create a chart and determine the control creation type; if the control creation type is not a button, picture or character, determine whether the current is a second / third level interface, if it is not a second / third level interface, retrieve and determine whether there are unused controls in the control corresponding to the control parameter storage area; if the control creation type is a button, picture or character, retrieve and determine whether there are unused controls in the control corresponding to the control parameter storage area; if not, a pop-up window will be displayed to prompt that the control has been used up; if it exists, create the control, fill in the control parameters and automatically synchronize them to the corresponding parameter storage area, click the Generate Configuration File button to open the file stream to read the control parameter area for read and write operations, and generate the control parameter configuration file.

[0153] Determine the logical formula for creating a control type:

[0154]

[0155] Among them, 1-14 represent the type value of the control created, and x represents the flag of creating the control. The type value of the control to be created is determined according to the name attribute value of the double-clicked icon, and the corresponding control is created according to this value;

[0156] The logical formula for retrieving the unused control corresponding to the control parameter storage area is as follows:

[0157]

[0158] Among them, 1 means yes, 0 means no, and x represents the enable value of the parameter area of ​​the control. When a disabled control of this type is retrieved, it is enabled. If all are 0, it means that the control of this type has been used up and a pop-up prompt is issued.

[0159] The logic formula for judging whether the current interface is the second or third level interface is as follows:

[0160]

[0161] Among them, 1 means yes, 0 means no, x means the current interface value, d2 min Indicates the minimum value of the secondary interface, d3 min Indicates the minimum value of the three-level interface, and is valid only when the interface is in the middle range of these two.

[0162] The embodiments of the present invention have the following advantages:

[0163] 1) Reduce code precompilation time;

[0164] 2) Reduce the tedious steps of font and image conversion and generate with one click;

[0165] 3) The configuration file is automatically generated to save memory;

[0166] 4) Visual interface experience is conducive to the layout of controls.

[0167] In addition, an embodiment of the present invention also provides a visual multi-interface design device for a thermostat, the device comprising: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of the visual multi-interface design method for a thermostat as described in any of the above items.

[0168] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the visual multi-interface design method for a thermostat as described in any of the above items are implemented.

[0169] In the embodiment of the present invention, the processor may be an integrated circuit chip having the signal processing capability. The processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0170] The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The processor reads the information in the storage medium and completes the steps of the above method in combination with its hardware.

[0171] The storage medium may be a memory, which may be, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory.

[0172] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.

[0173] The volatile memory may be a random access memory (RAM) which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus DRAM (DRRAM).

[0174] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.

[0175] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention can be implemented using a combination of hardware and software. When software is used, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.

[0176] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.

Claims

1. A visual multi-interface design method for a temperature controller, characterized in that: The method is applied to a thermostat and comprises: S1, obtaining interface control parameters and reading font library files and image files, allocating storage areas for each interface control parameter and allocating storage areas for the read font library files and image files; S2, creating an interface control and obtaining user requirements, adding a font library and an image file according to the user requirements, reading a control parameter configuration file and a font file to perform corresponding font conversion and image conversion, and generating a control parameter configuration file, a font file, and an image file required by the user; S3. Copy the control parameter configuration file, font file and image file required by the user to the thermostat for compilation, and download the compiled thermostat multi-interface file to the local computer for operation.

2. A visual multi-interface design method for a temperature controller as claimed in claim 1, characterized in that: Obtain interface control parameters and read font library files and image files, allocate storage areas for each interface control parameter and allocate storage areas for the read font library files and image files, including: Allocate each interface control parameter storage area, font parameter storage area and image parameter storage area and determine whether the folder path for storing fonts is valid; If valid, retrieve the file in the font library folder; If it is invalid, create a font library folder under this path and determine whether the path to the folder storing the images is valid; If invalid, create a picture folder under this path; If it is valid, the image file in the image folder is retrieved and it is determined whether the image file conforms to the image format; If it matches the picture format, add the picture information to the picture parameter storage area and continue to search for files in the picture folder until all picture files are retrieved.

3. A visual multi-interface design method for a temperature controller as claimed in claim 2, characterized in that: Retrieve the files in the font library folder, including: Determine whether the files in the font library folder conform to the font library format; If it matches, add the font library information to the font parameter storage area and retrieve the next file in the font library folder; If it does not match, search for the next file in the font library folder; After the font library folder is retrieved, check whether the path to the folder storing the images is valid.

4. A visual multi-interface design method for a temperature controller as claimed in claim 3, characterized in that: Add font library and image files according to the user's needs, including: Adding font libraries includes: Click the Add Font Library File button to open the font library folder interface and select the font library file to be added; Determining whether the font library file conforms to the font library format; If it is consistent, determine whether the font library parameter area contains this font library file; If not, adding the font library file to the parameter storage area; If included, the addition of the font library file is interrupted; Adding image files includes: Click the Add Image File button to open the image folder interface and select the image file you want to add; Determine whether the image file conforms to the image format; If it matches, determine whether the image parameter area contains this image file; If not, the image file is added to the parameter storage area; If included, the adding of the picture file is interrupted.

5. A visual multi-interface design method for a temperature controller as claimed in claim 4, characterized in that: Read control parameter configuration files and font files, including: Click the Read Configuration File button and select the storage path of the configuration file; Determine whether the control parameter configuration file exists; If it exists, read the file data and save it to the control parameter storage area and read the corresponding control parameters according to the current interface; Determine whether all controls have been read; If the reading is completed, the font file is determined; If the reading is not completed, determine whether the current control is enabled. Otherwise, read the corresponding space parameters according to the current interface; If yes, create and configure parameters according to the control type and parameter data; Determine whether the font file exists. If not, a pop-up window will pop up to prompt that the font file does not exist; If the font file exists, read the file data and save it to the font storage area.

6. A visual multi-interface design method for a temperature controller as claimed in claim 5, characterized in that: Generate font files and image files, including: Click the button to generate font file in one click and search the font parameter storage area to determine whether the font parameters have been searched. If the search is not complete, retrieve the uppercase and lowercase letters and numbers in the current font and convert other characters into corresponding uincode codes, call the font conversion function to generate a file and re-search the font parameter storage area; If the retrieval is completed, the font parameter storage area is retrieved and it is determined whether the font parameter is retrieved. If the retrieval is not completed, it is determined whether the conversion is successful. If the conversion is successful, the font parameter storage area is retrieved again. If the conversion fails, the name of the font that failed to be converted is recorded; Determine whether all fonts are successfully converted. If not, a pop-up window will be displayed showing all unsuccessful font conversions. If yes, the process ends. The generated image files include: Click the button to generate a picture file with one click and search the picture parameter storage area to determine whether the picture parameters have been searched; If the search is not completed, call the image conversion function to generate the file and search the image parameter storage area again; If the retrieval is completed, the image parameter storage area is retrieved and it is determined whether the image parameters are retrieved. If the retrieval is not completed, it is determined whether the conversion is successful. If the conversion is successful, the image parameter storage area is retrieved again. If it is unsuccessful, the name of the image that was not successfully converted is recorded and the image parameter storage area is retrieved again. If the search is completed, determine whether all images have been converted successfully. If there are any images that have not been converted successfully, a pop-up window will display all the images that have not been converted successfully. If all are converted successfully, the process ends.

7. A visual multi-interface design method for a temperature controller as claimed in claim 6, characterized in that: Generate the control parameter configuration file required by the user, including: Double-click the control on the interface to create a chart and determine the control creation type; If the control creation type is not a button, picture or character, determine whether the current interface is a second / third level interface. If it is not a second / third level interface, retrieve and determine whether there is an unused control in the control parameter storage area. If the control creation type is button, picture or character, then search and determine whether there is an unused control corresponding to the control parameter storage area; If it does not exist, a pop-up window will appear to remind you that the control has been used up; If it exists, create the control, fill in the control parameters and automatically synchronize them to the corresponding parameter storage area. Click the Generate Configuration File button to open the file stream to read the control parameter area for read and write operations and generate the control parameter configuration file.

8. Visual multi-interface design system for thermostat, characterized by: The system comprises: An initialization module, used to obtain interface control parameters and read font library files and image files, allocate storage areas for each interface control parameter and allocate storage areas for the read font library files and image files; The file operation module is used to create an interface control and obtain user requirements, add a font library and image files according to the user requirements, read the control parameter configuration file and the font file to perform corresponding font conversion and image conversion, and generate the control parameter configuration file, font file and image file required by the user; The compilation module is used to copy the control parameter configuration files, font files and image files required by the user to the thermostat for compilation, and download the compiled thermostat multi-interface file to the local for operation.

9. Visual multi-interface design equipment for thermostat, characterized in that: The device comprises: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of the visual multi-interface design method for a thermostat as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the visual multi-interface design method for a temperature controller according to any one of claims 1 to 7 are implemented.